Project test simple ecommerce using golang
This project has 2 user access :
- Admin
- Buyer
- can access login endpoint. use username:
admin
and password:admin123
- can access list product endpoints
- can access detail product endpoints
- can access add product endpoints
- can access update product endpoints
- can access delete product endpoints
- buyer can access endpoint using
secret_key
provided into seed data indb.sql
file - can view products list
- can view product detail
- can add product to cart
- can update cart
- can checkout (order and pay)
- clone the project
- copy file .env-example to .env
$ cp .env-example .env
- run the sql in
db.sql
file to your database - install modules
$ go mod tidy
#or
$ go mod download
- run the application into development mode
$ make dev
# run build command
$ make build
# execute
$ ./target/stealth-commerce
TODO:
- auto cancel order if not paid after 30 minute
- migration