MCPcopy Index your code
hub / github.com/bagashiz/go-pos

github.com/bagashiz/go-pos @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
502 symbols 1,593 edges 59 files 438 documented · 87%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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. If you do not use devcontainer, ensure you have Go 1.23 or higher and Task installed on your machine:

    bash go version && task --version

  2. Create a copy of the .env.example file and rename it to .env:

    bash cp .env.example .env

    Update configuration values as needed.

  3. Install all dependencies, run docker compose, create database schema, and run database migrations:

    bash task

  4. Run the project in development mode:

    bash 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

Extension points exported contracts — how you extend this code

OrderService (Interface)
OrderService is an interface for interacting with order-related business logic [4 implementers]
internal/core/port/order.go
PaymentService (Interface)
PaymentService is an interface for interacting with payment-related business logic [4 implementers]
internal/core/port/payment.go
CategoryService (Interface)
CategoryService is an interface for interacting with category-related business logic [4 implementers]
internal/core/port/category.go
AuthService (Interface)
UserService is an interface for interacting with user authentication-related business logic [4 implementers]
internal/core/port/auth.go
UserService (Interface)
UserService is an interface for interacting with user-related business logic [4 implementers]
internal/core/port/user.go

Core symbols most depended-on inside this repo

EXPECT
called by 148
internal/core/port/mock/cache.go
Set
called by 81
internal/core/port/cache.go
Get
called by 60
internal/core/port/cache.go
EXPECT
called by 59
internal/core/port/mock/category.go
GetCategoryByID
called by 53
internal/core/port/category.go
Delete
called by 44
internal/core/port/cache.go
GenerateCacheKey
called by 43
internal/core/util/cache.go
EXPECT
called by 42
internal/core/port/mock/product.go

Shape

Method 261
Struct 137
Function 89
Interface 13
TypeAlias 2

Languages

Go100%

Modules by API surface

internal/core/port/mock/user.go30 symbols
internal/core/port/mock/product.go28 symbols
internal/core/port/mock/payment.go28 symbols
internal/core/port/mock/category.go28 symbols
internal/adapter/handler/http/response.go25 symbols
internal/core/port/mock/order.go20 symbols
internal/core/service/user_test.go15 symbols
internal/core/service/product_test.go15 symbols
internal/core/service/payment_test.go15 symbols
internal/core/service/category_test.go15 symbols
internal/core/port/mock/cache.go14 symbols
internal/core/port/mock/auth.go14 symbols

For agents

$ claude mcp add go-pos \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact