My First Project As Ecommerce Backend Api Using Go Programing Language
MIT License
This 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.
The 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.
The project utilizes the following packages:
Please refer to the respective package documentation for more information on how to use and integrate these packages into your Go application.
To use and test the ecommerce-gin-clean-arch project, please follow these steps:
Make sure you have the following installed on your system:
Clone the ecommerce-gin-clean-arch repository to your local system:
git clone https://github.com/nikhilnarayanan623/ecommerce-gin-clean-arch.git
cd ecommerce-gin-clean-arch
Install the required dependencies using either the provided Makefile command or Go's built-in module management:
# Using Makefile
make deps
# OR using Go
go mod tidy
details provided at the end of the file
make swag
make run
make mockgen
make test
Set up the necessary environment variables in a .env file at the project's root directory. Below are the variables required:
### PostgreSQL database details
DB_NAME="your database name"
DB_USER="your database user name"
DB_PASSWORD="your database owner password"
DB_PORT="your database running port number"
### JWT
ADMIN_AUTH_KEY="secret code for signing admin JWT token"
USER_AUTH_KEY="secret code for signing user JWT token"
### Twilio
AUTH_TOKEN="your Twilio authentication token"
ACCOUNT_SID="your Twilio account SID"
SERVICE_SID="your Twilio messaging service SID"
### Razorpay
RAZOR_PAY_KEY="your Razorpay API test key"
RAZOR_PAY_SECRET="your Razorpay API test secret key"
### Stripe
STRIPE_SECRET="your Stripe account secret key"
STRIPE_PUBLISH_KEY="your Stripe account publish key"
STRIPE_WEBHOOK="your Stripe account webhook key"
### Google Auth
GOAUTH_CLIENT_ID="your Google auth client ID"
GOAUTH_CLIENT_SECRET="your Google auth secret key"
GOAUTH_CALL_BACK_URL="your registered callback URL for Google Auth"
### AWS S3 Service
AWS_ACCESS_KEY_ID="your aws access key id"
AWS_SECRET_ACCESS_KEY="your AWS secret access key"
AWS_REGION="your AWS region"
AWS_BUCKET_NAME="your AWS s3 bucket name"