How threedotslabs/wild-workouts-go-ddd-example works
Main System Components
a) Frontend Layer:
• Vue.js web application (in /web directory)
• Firebase Authentication integration
• OpenAPI clients for service communication
b) Backend Services:
• Trainer Service (internal/trainer)
• Trainings Service (internal/trainings)
• Users Service (internal/users)
c) Infrastructure:
• Google Cloud Run (for hosting services)
• Firebase/Firestore (for data storage)
• gRPC and HTTP communication layers
Architecture Patterns to Highlight
a) Clean Architecture layers (for each service):
• Ports (API layer)
• Application (use cases)
• Domain (business logic)
• Adapters (infrastructure)
b) CQRS Pattern:
• Command handlers (command/)
• Query handlers (query/)
• Separate read/write models
Component Relationships
a) External Communication:
• Web Frontend → Firebase Auth
• Web Frontend → Backend Services (via OpenAPI)
• Service-to-Service communication (via gRPC)
b) Internal Service Structure:
• HTTP/gRPC Controllers → Application Layer
• Application Layer → Domain Layer
• Domain Layer → Repositories
• Repositories → Firestore
Specific Implementation Details
Technical elements:
a) Service Components:
[Web Frontend] → [Firebase Auth]
• ↓
[API Gateway/Load Balancer]
• ↓
[HTTP/gRPC Ports] → [Application Services]
• ↓
[Domain Models] → [Repositories]
• ↓
[Firestore/Database]
b) Cross-Cutting Concerns:
• Authentication middleware
• Logging decorators
• Metrics collection
• Error handling
Additional Elements
Supporting components:
• OpenAPI/Protobuf definitions
• Docker containers
• Cloud Run services
• Firebase services
• Terraform infrastructure
• User Interface Layer
• API Gateway Layer
• Service Layer
• Domain Layer
• Infrastructure Layer
This system design should reflect the application's evolution through the various stages described in the README's articles, showing both the microservices architecture and the DDD implementation patterns.