The service is a straightforward store. It will provide APIs for the frontend to perform the following tasks:
- Create/Read/Update/Delete Products
- Create/Read/Update/Delete Users
- Create/Read/Delete Orders
- Login Users
- Docker desktop for building, testing, and deploying containerized applications quickly
- TablePlus as DB UI
- Golang
- Homebrew
- Migrate for DB migrations
- Jq for JSON output representation
TODOs:
- Add more cases for api endpoints
- Implement and improve READ/UPDATE orders
- Implement the option for users to follow each other
-
Create docker network
make docker-network
-
Start project in docker compose:
make docker_compose
-
Start postgres container:
make postgres
-
Create apple_store database:
make createdb
-
Run db migration up all versions:
make migrateup
-
Start api server:
make server
-
Run all tests:
make test
-
Drop apple_store database:
make dropdb
-
Run db migration down all versions:
make migratedown1ver
-
Run db migration up 1 version:
make migrateup1ver
-
Run db migration down 1 version:
make migratedown1