{"id":15324321,"url":"https://github.com/nikhilnarayanan623/ecommerce-gin-clean-arch","last_synced_at":"2025-04-14T23:34:45.966Z","repository":{"id":146245362,"uuid":"609433110","full_name":"nikhilnarayanan623/ecommerce-gin-clean-arch","owner":"nikhilnarayanan623","description":"My First Project As Ecommerce  Backend Api Using Go Programing Language","archived":false,"fork":false,"pushed_at":"2023-11-20T08:19:25.000Z","size":105287,"stargazers_count":76,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T11:39:40.582Z","etag":null,"topics":["aws","clean-architecture","ecommerce","gin","go","golang","gorm","jwt","postgresql","razorpay","s3","s3-bucket","stripe","swagger","swagger-documentation","viper","wire"],"latest_commit_sha":null,"homepage":"https://nikhil623.online/ec/swagger/index.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikhilnarayanan623.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-04T06:36:56.000Z","updated_at":"2025-03-24T18:30:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c08e074a-25ff-464a-bb74-e1c2fd02ee7d","html_url":"https://github.com/nikhilnarayanan623/ecommerce-gin-clean-arch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilnarayanan623%2Fecommerce-gin-clean-arch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilnarayanan623%2Fecommerce-gin-clean-arch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilnarayanan623%2Fecommerce-gin-clean-arch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilnarayanan623%2Fecommerce-gin-clean-arch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhilnarayanan623","download_url":"https://codeload.github.com/nikhilnarayanan623/ecommerce-gin-clean-arch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248980366,"owners_count":21193131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","clean-architecture","ecommerce","gin","go","golang","gorm","jwt","postgresql","razorpay","s3","s3-bucket","stripe","swagger","swagger-documentation","viper","wire"],"created_at":"2024-10-01T09:25:54.476Z","updated_at":"2025-04-14T23:34:45.949Z","avatar_url":"https://github.com/nikhilnarayanan623.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ecommerce Project using Go Programming with Gin Framework\nThis project is an ecommerce application built using Go programming language and the Gin framework. It follows the clean code architecture, which promotes separation of concerns and maintainability.\n\n## Project Overview\nThe ecommerce-gin-clean-arch project is designed to provide a performant and feature-rich ecommerce solution. It includes functionalities such as user authentication, product management, shopping cart, order processing, and payment integration.\n\n## Used Packages\nThe project utilizes the following packages:\n1. [GIN](github.com/gin-gonic/gin): A web framework written in Go that combines high performance with an API similar to Martini.\n2. [JWT](github.com/golang-jwt/jwt): A Go implementation of JSON Web Tokens for secure authentication and authorization.\n3. [GORM](https://gorm.io/index.html) with [PostgreSQL](https://gorm.io/docs/connecting_to_the_database.html#PostgreSQL): A powerful ORM library for Go that simplifies database operations.\n4. [Wire](https://github.com/google/wire): A code generation tool for dependency injection, making it easier to connect components.\n5. [Viper](https://github.com/spf13/viper): A configuration solution for Go applications, supporting various formats and 12-Factor app principles.\n6. [swag](https://github.com/swaggo/swag) with [gin-swagger](https://github.com/swaggo/gin-swagger) and [swaggo files](github.com/swaggo/files): Converts Go annotations to Swagger Documentation 2.0 for API documentation.\n7. [Stripe](https://github.com/stripe/stripe-go): A Go client library for the Stripe API, allowing seamless integration with Stripe's payment platform.\n8. [Google Auth][https://github.com/google/google-auth-library-go](https://pkg.go.dev/github.com/markbates/goth@v1.77.0/providers/google): A Go library for handling authentication and authorization with Google services.\n9. [Twilio](https://github.com/twilio/twilio-go): A Go client library for the Twilio API, enabling communication via SMS, voice, and other channels.\n10. [Razorpay](https://github.com/razorpay/razorpay-go): A Go client library for the Razorpay API, facilitating payment processing and \nmanagement.\n11. [AWS SDK](https://github.com/aws/aws-sdk-go): A comprehensive SDK for integrating Go applications with Amazon Web Services, providing functionalities for interacting with Amazon S3 and other AWS services.\n\nPlease refer to the respective package documentation for more information on how to use and integrate these packages into your Go application.\n\n# Setup Instructions\nTo use and test the ecommerce-gin-clean-arch project, please follow these steps:\n\n### Prerequisites\nMake sure you have the following installed on your system:\n- Go (https://golang.org/doc/install)\n- PostgreSQL (https://www.postgresql.org/download/)\n- Twillio Account (https://www.twilio.com/en-us)\n- AWS account and S3 bucket (https://aws.amazon.com/s3/)\n\n### 1. Clone the Repository\nClone the ecommerce-gin-clean-arch repository to your local system:\n```bash\ngit clone https://github.com/nikhilnarayanan623/ecommerce-gin-clean-arch.git\ncd ecommerce-gin-clean-arch\n```\n### 2. Install Dependencies\nInstall the required dependencies using either the provided Makefile command or Go's built-in module management:\n```bash\n# Using Makefile\nmake deps\n# OR using Go\ngo mod tidy\n```\n### 3. Configure Environment Variables\ndetails provided at the end of the file\n### 4. Make Swagger Files (For Swagger API Documentation)\n```bash\nmake swag\n```\n# To Run The Application\n```bash\nmake run\n```\n### To See The API Documentation\n1. visit [swagger] ***http://localhost:8000/swagger/index.html***\n\n# To Test The Application\n### 1. Generate Mock Files\n```bash\nmake mockgen\n```\n### 2. Run The Test Functions\n```bash\nmake test\n```\n\n# Set up Environment Variables\nSet up the necessary environment variables in a .env file at the project's root directory. Below are the variables required:\n```.env\n### PostgreSQL database details\nDB_NAME=\"your database name\"\nDB_USER=\"your database user name\"\nDB_PASSWORD=\"your database owner password\"\nDB_PORT=\"your database running port number\"\n### JWT\nADMIN_AUTH_KEY=\"secret code for signing admin JWT token\"\nUSER_AUTH_KEY=\"secret code for signing user JWT token\"\n### Twilio\nAUTH_TOKEN=\"your Twilio authentication token\"\nACCOUNT_SID=\"your Twilio account SID\"\nSERVICE_SID=\"your Twilio messaging service SID\"\n### Razorpay\nRAZOR_PAY_KEY=\"your Razorpay API test key\"\nRAZOR_PAY_SECRET=\"your Razorpay API test secret key\"\n### Stripe\nSTRIPE_SECRET=\"your Stripe account secret key\"\nSTRIPE_PUBLISH_KEY=\"your Stripe account publish key\"\nSTRIPE_WEBHOOK=\"your Stripe account webhook key\"\n### Google Auth\nGOAUTH_CLIENT_ID=\"your Google auth client ID\"\nGOAUTH_CLIENT_SECRET=\"your Google auth secret key\"\nGOAUTH_CALL_BACK_URL=\"your registered callback URL for Google Auth\"\n### AWS S3 Service\nAWS_ACCESS_KEY_ID=\"your aws access key id\"\nAWS_SECRET_ACCESS_KEY=\"your AWS secret access key\"\nAWS_REGION=\"your AWS region\"\nAWS_BUCKET_NAME=\"your AWS s3 bucket name\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilnarayanan623%2Fecommerce-gin-clean-arch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhilnarayanan623%2Fecommerce-gin-clean-arch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilnarayanan623%2Fecommerce-gin-clean-arch/lists"}