- Notifications
You must be signed in to change notification settings - Fork41
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.
License
bagashiz/go-pos
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple RESTful Point of Sale (POS) web service written in Go programming language. This project is a part of my learning process in understandingHexagonal Architecture in Go.
It usesGin as the HTTP framework andPostgreSQL as the database withpgx as the driver andSquirrel as the query builder. It also utilizesRedis as the caching layer withgo-redis as the client.
This project idea was inspired by theIde Project untuk Upgrade Portfolio Backend Engineer video on YouTube byAsdita Prasetya, which provided valuable guidance and inspiration for its development.
If you do not use devcontainer, ensure you haveGo 1.23 or higher andTask installed on your machine:
go version&& task --version
Create a copy of the
.env.example
file and rename it to.env
:cp .env.example .env
Update configuration values as needed.
Install all dependencies, run docker compose, create database schema, and run database migrations:
task
Run the project in development mode:
task dev
For database schema documentation, seehere, powered bydbdocs.io.
API documentation can be found indocs/
directory. To view the documentation, open the browser and go tohttp://localhost:8080/docs/index.html
. The documentation is generated usingswaggo withgin-swagger middleware.
Developers interested in contributing to Go POS project can refer to theCONTRIBUTING file for detailed guidelines and instructions on how to contribute.
Go POS project is licensed under theMIT License, providing an open and permissive licensing approach for further development and usage.
- Hexagonal Architecture by Alistair Cockburn
- Ready for changes with Hexagonal Architecture by Netflix Technology Blog
- Hexagonal Architecture in Go by Matias Varela
About
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.