filippocam / go-pos

Simple RESTful Point of Sale (POS) Service API written in Go using Gin web framework, PostgreSQL database, and Redis cache.
https://gopos.bagashiz.me/docs/index.html
MIT License
0 stars 0 forks source link

Go POS

Description

A simple RESTful Point of Sale (POS) web service written in Go programming language. This project is a part of my learning process in understanding Hexagonal Architecture in Go.

It uses Gin as the HTTP framework and PostgreSQL as the database with pgx as the driver and Squirrel as the query builder. It also utilizes Redis as the caching layer with go-redis as the client.

This project idea was inspired by the Ide Project untuk Upgrade Portfolio Backend Engineer video on YouTube by Asdita Prasetya, which provided valuable guidance and inspiration for its development.

Getting Started

  1. Ensure you have Go 1.21 or higher and Task installed on your machine:

    go version && task --version
  2. Install all required tools for the project:

    task install
  3. Create a copy of the .env.example file and rename it to .env:

    cp .env.example .env

    Update configuration values as needed.

  4. Run the service containers:

    task service:up
    task migrate:up

    NOTE: the command use podman and podman-compose by default. If you want to use docker or docker compose, manually run docker commands instead or replace podman and podman-compose with docker or docker compose in the tasks inside Taskfile.yml file.

  5. Run the project in development mode:

    task dev

Documentation

For database schema documentation, see here, powered by dbdocs.io.

API documentation can be found in docs/ directory. To view the documentation, open the browser and go to http://localhost:8080/docs/index.html. The documentation is generated using swaggo with gin-swagger middleware.

Contributing

Developers interested in contributing to Go POS project can refer to the CONTRIBUTING file for detailed guidelines and instructions on how to contribute.

License

Go POS project is licensed under the MIT License, providing an open and permissive licensing approach for further development and usage.

Learning References