GoCart

command module
v0.0.0-...-0874fcc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 5 Imported by: 0

README

GooCart

GooCart is a high-performance e-commerce platform backend written in Go language. It is designed to handle a large number of requests and transactions efficiently, making it ideal for large-scale e-commerce operations!

Technologies and tools used

  • Language : Go
  • Framwork : Fiber
  • Database : Postgresql GORM
  • JSON Web Token (JWT) authentication for secure user authentication
  • Amazon S3 bucket for storing data
  • Stripe Payment API for handling transactions
  • Twilio API for OTP verification
  • Docker

Run On local machine

clone this project

git clone https://github.com/mohdjishin/GooCart

open GooCart Directory

cd GooCart

download dependencies

go get

run

go run *.go

app is listening on port 8080

Run using makefile

clone this project

git clone https://github.com/mohdjishin/GooCart

open GooCart Directory

cd GooCart

run makefile

make all

Run using Docker

docker run -p 8080:3000 mohdjishin/goocart:latest

Adding .env file

  • Create a new file in the root of your project directory and name it .env.
  • Add the following information to the file:
#port
PORT=8080
#database
DNS= "host=<host> user=<username> password=<password> dbname=<databsename> port=5432 sslmode=disable"

#JWT encryption key
SECRET= <SecretKey>

#Twilio
TWILIO_ACCOUNT_SID=<TWILIO_ACCOUNT_SID>
TWILIO_AUTH_TOKEN = <TWILIO_AUTH_TOKEN >
VERIFY_SERVICE_SID= <VERIFY_SERVICE_SID >

#AWS
AWS_REGION=<AWS_REGION>
AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>

#Stripe
PAYMENT_SEC_KEY=<Stripe PAYMENT_SEC_KEY>

File Structure

GooCart/
├── controller/
│   ├── adminController.go
│   ├── productController.go
│   ├── productController_test.go
│   ├── UserController.go
│   └── UserController_test.go
├── database/
│   ├── connectToDB.go
│   └── syncDataBase.go
├── interfaces/
│   ├── IAdmin.go
│   ├── IBill.go
│   ├── IDatabase.go
│   ├── IProduct.go
│   ├── IToken.go
│   └── IUser.go
├── k8s/
│   ├── gocart-deployment.yml
│   ├── gocart-Persistent.yml
│   └── gocart-service.yml
├── media/
│   └── images/
│       └── logo.png
├── middleware/
│   └── requireAuth.go
├── model/
│   ├── admin.go
│   ├── orders.go
│   ├── products.go
│   └── user.go
├── routes/
│   ├── admin.go
│   └── user.go
├── utils/
│   ├── billGen.go
│   ├── billGEn_test.go
│   ├── error.go
│   ├── GraceFullShutdown.go
│   ├── GraceFullShutdown_test.go
│   ├── helpers.go
│   ├── helpers_test.go
│   ├── jwt.go
│   ├── jwt_test.go
│   ├── otp.go
│   └── payment.go
│
├── Dockerfile
├── DockerfileSingle
├── docker-compose.yml 
├── go.sum
├── go.mod
├── main.go 
├── LICENSE 
├── makefile
└── README.md

Contributing

We welcome contributions to this project. Please fork the repository and submit a pull request with your changes.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL