How alexsiilvaa/pequibank works
Main Components
• Client layers (e.g., REST clients, load‐test tools)
• Nginx reverse proxy / API gateway
• .NET WebAPI service, comprised of:
– Presentation (endpoints, exception handlers, health checks)
– Application (use‐case handlers, interfaces)
– Domain (entities, business rules, exceptions)
– Infrastructure (data access, background services, settings)
• PostgreSQL database
• Docker & Docker‐Compose orchestration
• Load‐testing setup (Bruno scripts, Gatling simulation results)
Relationships & Data Flows
1. External clients (or load‐test tools) → HTTP requests → Nginx
2. Nginx routes to .NET service (Presentation)
3. Presentation invokes Application features (CreateFinancialTransaction, GetBankStatement)
4. Application layer calls Repository interfaces (ICustomerRepository, IFinancialTransactionRepository)
5. Infrastructure implements repositories → Database
6. BackgroundServices (CreateFinancialTransactionBackgroundService) subscribe/poll and perform async work → Repositories → DB
7. HealthCheck endpoint → Infrastructure health checks (DatabaseHealthCheck) → DB
8. Docker‐Compose manages containers: nginx, api service, postgres; init.sql seeds DB
9. Load‐testing scripts (Bruno .bru) and Gatling results connect to Nginx to simulate traffic
Architectural Patterns & Key Technologies
• Layered (Onion/Clean) architecture: Presentation → Application → Domain → Infrastructure
• Dependency inversion: interfaces in Application (ICustomerRepository, etc.) injected into Infrastructure
• Hosted background service for asynchronous transaction creation
• Health check endpoints for liveness/readiness
• Containerization: Dockerfile for app, docker-compose.yml for multi‐container setup
• Configuration: appsettings.{Development,Production}.json, DatabaseOptions + validator
• Reverse proxy: nginx.conf for SSL/traffic management
• Persistence: PostgreSQL with init.sql seeding
Detailed Elements to Capture
– Docker orchestration: show docker-compose linking containers
– init.sql seeder as part of DB container initialization
– Bruno scripts (.bru) and environments (Dev, Live) as load‐test definitions
– Gatling output directory under load‐test for performance reporting
– BackgroundServices block inside the API container interacting with the Application/Repository
– HealthCheck endpoint feeding into Nginx health checks (if configured)