Synapsis Marketplace is an online store application backend, focusing on providing RESTful APIs for managing products, carts, orders, and user authentication.
- User Management:
- Register:
POST /user/register
- Login:
POST /user/login
- Register:
- Product Management:
- Add Product:
POST /product/store
- Get Products by Category:
GET /product/category/{categoryID}
- Get Product by ID:
GET /product/{productID}
- Add Product:
- Cart Management:
- Add Item to Cart:
POST /cart/add
- Get Cart Items:
GET /cart/items/{userID}
- Add Item to Cart:
- Order Management:
- Checkout Cart:
POST /order/checkout
- Get Order Details:
GET /order/details/{orderID}
- Pay for Order:
PUT /order/pay/{orderID}
- Cancel Order:
PUT /order/cancel/{orderID}
- Checkout Cart:
- Mux: https://github.com/gorilla/mux
- JWT Authentication: https://github.com/dgrijalva/jwt-go
- Password Encryption: https://pkg.go.dev/golang.org/x/crypto/bcrypt
- Postgres: https://github.com/lib/pq
- sqlx: https://github.com/jmoiron/sqlx
- Redis Caching: https://github.com/gomodule/redigo
- In-Memory Caching: https://pkg.go.dev/github.com/patrickmn/go-cache
- Singleflight: For duplicate function call suppression mechanism
- Database Indexing: Implemented to improve performance
Dockerfile and docker-compose files are provided for containerization, build and run the image:
docker-compose up --build
Open API Documentation Import to your Postman account or export to JSON format.
The project is deployed to GCP platforms.