Skip to content

zonafirmann/go-cloud-inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☁️ Go Cloud Inventory: Enterprise API Boilerplate

Go Version PostgreSQL Docker License

A high-performance, production-ready REST API built for scalable inventory management. Designed with Clean Architecture principles and containerized using Docker Multi-Stage Builds for seamless cloud deployment.

🚀 Key Features

  • Enterprise Architecture: Strict separation of concerns (Models, Repository, Handlers, Config).
  • ACID Transactions: Financial-grade checkout logic utilizing PostgreSQL row-level locking (FOR UPDATE) to prevent race conditions during high-concurrency sales.
  • Smart Analytics Engine: Built-in rule-based algorithm generating automated stock alerts (Critical/Overstock) without relying on paid third-party APIs.
  • Cloud-Native Deployment: Fully orchestrated with docker-compose, decoupling the Go API and PostgreSQL into isolated, secure containers.

🛠️ Tech Stack

  • Language: Golang (Go 1.22)
  • Database: PostgreSQL 18
  • Driver: pgx/v5 (High-performance native driver)
  • DevOps: Docker & Docker Compose (Multi-stage lightweight image)

📂 Project Structure

.
├── config/                  # Environment & Database connections
├── handlers/                # HTTP routing and API endpoints
├── models/                  # Domain entities and JSON definitions
├── repository/              # Direct database interactions and business rules
├── Dockerfile               # Multi-stage image build instructions
├── docker-compose.yml       # Container orchestration (API + DB)
└── main.go                  # Application entry point

About

Enterprise-grade Golang REST API boilerplate. Features Clean Architecture, ACID-compliant transactions, rule-based analytics engine, and multi-stage Docker Compose orchestration for cloud deployments.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors