Modular Go backend with Clean Architecture for building flexible and scalable API services.
- ✅ Clean Architecture - Separation into layers (Domain, UseCase, Repository, API)
- ✅ High Performance - Using fasthttp for minimal latency
- ✅ Offline Resilience - Automatic buffering of operations when DB is unavailable
- ✅ Modularity - Easy addition of new modules without changing the core
- ✅ Production Ready - Docker, health checks, graceful shutdown
- ✅ Scalability - Support for horizontal and vertical scaling
Full documentation is available in the docs/ directory:
- Quick Start - Get started in 5 minutes
- Architecture - Project structure and design principles
- Development - Development guide
- Deployment - Deployment instructions
- Usage Examples - Ready-to-use scenarios for different application types
- Language: Go 1.21+
- HTTP Server: fasthttp
- Database: PostgreSQL (pgx/v5)
- Cache/Sessions: Redis
- Buffer: BoltDB (for offline operations)
- Logging: Zap
- Migrations: golang-migrate
# Clone repository
git clone <repo-url> backend
cd backend
# Install dependencies
go mod tidy
# Setup environment
cp .env.example .env
# Edit .env file with your settings
# Run with Docker Compose
docker-compose up -d
# Or run locally
make runCheck if it's working:
curl http://localhost:8080/healthThe project is ready for various types of applications:
- CRM Systems - Web Studio, Coffee Shop
- CMS Systems - Blog, Furniture Store
- Chats - Simple Chat, Chat with Roles
- Dashboards - Project and Task Management
backend/
├── cmd/server/ # Application entry point
├── internal/ # Internal code
│ ├── config/ # Configuration
│ ├── infrastructure/ # DB, Redis connections
│ ├── middleware/ # HTTP middleware
│ └── router/ # Routing
├── api/ # HTTP interface
├── usecase/ # Business logic
├── repository/ # Data access
├── domain/ # Domain entities
└── docs/ # Documentation
| Command | Description |
|---|---|
make build |
Build the project |
make run |
Run the server |
make test |
Run tests |
make lint |
Check code |
make docker-build |
Build Docker image |
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please read CONTRIBUTING.md before submitting a PR.
If you have any questions:
- Check the documentation
- Review the examples
- Create an issue in the repository
Made with ❤️ for Go developers