This repository demonstrates various architectural patterns and design principles for building scalable backend systems in Go. The codebase showcases architectural patterns, database design techniques, and SaaS-specific implementations through a practical car rental platform example.
For more details about the architecture, see Software Architecture. For the data model and relationships, see Entity Relationship Diagram.
This repository demonstrates the following software engineering concepts:
- Value Object:
- Definition: See Email value object with tests
- Usage: See Individual entity using the Email value object
- Class Table Inheritance: See Renter entity as the base class with Company and Individual as specialized subclasses
- Outbox Pattern: Reliable event publishing for distributed systems. See documentation and implementation
- PostgreSQL Row-Level Security: Multi-tenant data isolation (Coming Soon)
Find specific documentation in the docs/ folder:
- Software Architecture
- Entity Relationship Diagram
- Installation Guide
- Go Development Guide
- Database Schema Updates
- Ent ORM Setup
- Outbox Pattern Implementation
- API (gRPC with gRPC Connect) Documentation
- Adding New Services
This repository is intended for educational and demonstration purposes. It is not recommended for production use without significant modifications.
-
Database Schema Management: The project uses Ent's auto migration feature to manage database schema changes for convenience. Proper migration strategies should be implemented for production environments. For more details on how database schema updates are handled, see Database Schema Updates.
-
Database Security: SSL mode is disabled for database access (see internal/infrastructure/postgres/migrate/main.go). This configuration is insecure and should be enabled in production environments.