go-pos
Simple RESTful Point of Sale (POS) Service API written in Go using Gin web framework, PostgreSQL database, and Redis cache. Proof of concept of implementing Hexagonal Architecture in Go.
File Explorer
Download Latest Version (.zip)- devcontainer.json
- ci.yml
- publish-image.yaml
- dependabot.yml
- main.go
- docs.go
- swagger.json
- swagger.yaml
- paseto.go
- config.go
- auth.go
- category.go
- helper.go
- middleware.go
- order.go
- payment.go
- product.go
- response.go
- router.go
- user.go
- validator.go
- slog.go
- 000001_create_users_table.down.sql
- 000001_create_users_table.up.sql
- 000002_create_payments_table.down.sql
- 000002_create_payments_table.up.sql
- 000003_create_orders_table.down.sql
- 000003_create_orders_table.up.sql
- 000004_create_categories_table.down.sql
- 000004_create_categories_table.up.sql
- 000005_create_products_table.down.sql
- 000005_create_products_table.up.sql
- 000006_create_order_products_table.down.sql
- 000006_create_order_products_table.up.sql
- category.go
- helper.go
- order.go
- payment.go
- product.go
- user.go
- db.go
- redis.go
- category.go
- error.go
- order.go
- orderProduct.go
- payment.go
- product.go
- tokenPayload.go
- user.go
- auth.go
- cache.go
- category.go
- order.go
- payment.go
- product.go
- user.go
- auth.go
- cache.go
- category.go
- order.go
- payment.go
- product.go
- user.go
- auth.go
- auth_test.go
- category.go
- category_test.go
- order.go
- payment.go
- payment_test.go
- product.go
- product_test.go
- user.go
- user_test.go
- cache.go
- password.go
- .air.toml
- .dockerignore
- .env.example
- .gitignore
- .golangci.yml
- CONTRIBUTING.md
- docker-compose.yml
- Dockerfile
- go.mod
- go.sum
- LICENSE
- README.md
- schema.dbml
- Taskfile.yml
# Installation Guide
1. Get the code
git clone https://github.com/bagashiz/go-pos
Downloads the entire project code from GitHub to your computer.
cd go-pos
Moves into the project folder you just downloaded.
2. Docker
Easy RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker compose up -d --build
Builds and starts all defined containers (server, database, etc.) at once, in the background.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
3. Go
MediumPrerequisites
go build ./...
Compiles the Go program into an executable.
go run .
Runs the Go program directly without a separate build step.
If the build finishes without errors, it worked. If you used go run ., check the terminal output.
// repository documentation
Was this content helpful?
(0 ratings)
