- Backend: ASP.NET Core Web API with MongoDB, Redis cache, Hangfire jobs, JWT auth, Swagger, AutoMapper, MediatR; service wiring in server/src/API/Startup.cs.
- Infrastructure: MongoDB connection and repositories for each bounded context; see server/src/API/appsettings.json for Mongo/Hangfire/Redis configuration and server/src/Agencias/Agencias.Infra.Data/Repository/Repository.cs for the Mongo repository base.
- Background processing: Hangfire with Mongo storage and a recurring job
VerificarPedidosParadosCommand; setup in server/src/API/Configurations/HangfireConfiguration.cs. - AuthN/AuthZ: JWT bearer with role-based policies (
Turista,Agencia,Agente) in server/src/API/Configurations/ApiSecurityConfiguration.cs; tokens generated viaGerarTokenhelper. - Clients: Angular 8 management SPA (client/web/management/angular.json, client/web/management/package.json) and two Flutter apps (agents and customers) defined by client/mobile/agents/pubspec.yaml and client/mobile/customers/pubspec.yaml.
- Containerization: local dev stack with API, Mongo, Redis, and S3-compatible MinIO via server/docker-compose.dev.yml; standalone Mongo/Redis compose in server/docker-compose.yml.
| Component | Tech | Responsibility | Evidence |
|---|---|---|---|
| API | ASP.NET Core, MediatR | HTTP endpoints, auth, domain orchestration | server/src/API/Startup.cs |
| Data | MongoDB | Persistence for domains and Hangfire storage | server/src/API/appsettings.json, server/src/Agencias/Agencias.Infra.Data/Repository/Repository.cs |
| Cache | Redis | Distributed cache and health checks | server/src/API/Configurations/CacheConfiguration.cs, server/src/API/appsettings.json |
| Background Jobs | Hangfire | Recurring jobs (orders check) and dashboard | server/src/API/Configurations/HangfireConfiguration.cs |
| Logging | EnterpriseLog over Rabbit/ELK | Centralized structured logging | server/src/API/Configurations/LoggerConfiguration.cs, server/src/API/appsettings.json |
| File Storage | Amazon S3 / MinIO (dev) | Media storage, demo endpoints | server/src/API/appsettings.json, server/docker-compose.dev.yml |
| Payments | PagarMe | Receiver and card handling | server/src/API/appsettings.json |
| Amazon SES / SMTP fallback | Transactional emails | server/src/API/Configurations/DependencyInjectionConfiguration.cs, server/src/API/appsettings.json | |
| Social Login | Facebook/Google/Apple | OAuth integrations | server/src/API/appsettings.json |
| Web Client | Angular 8 | Management SPA | client/web/management/angular.json |
| Mobile – Agents | Flutter | Agent-facing app | client/mobile/agents/pubspec.yaml |
| Mobile – Customers | Flutter | Customer-facing app | client/mobile/customers/pubspec.yaml |
- server/src/API: API host, middleware, security, caching, logging, health checks, Hangfire, DI wiring.
- server/src/: Bounded contexts (Agencias, Turistas, Ingressos, etc.) split into Commands, CommandStack (handlers/events), Domain (entities/validations), Infra.CrossCutting (IoC), Infra.Data (repositories).
- server/tests: Automated tests per bounded context.
- client/web/management: Angular SPA sources and build config.
- client/mobile/agents and client/mobile/customers: Flutter apps and assets.
- resources/: shared assets (e.g., logo used above).
- Local API run: open the solution and run the API project; configuration defaults in server/src/API/appsettings.json (Mongo at
127.0.0.1:27017, Redis at127.0.0.1:6379). - Containers (full dev stack):
docker-compose -f server/docker-compose.dev.yml up --buildbrings API on port 5000 plus Mongo, Redis, and MinIO (environment variables for AWS/PagarMe/SES injected there). - Dependencies only:
docker-compose -f server/docker-compose.yml upstarts Mongo and Redis for local development. - Swagger UI exposed by the API (configured in server/src/API/Startup.cs) when running.
- Angular management SPA:
npm installthennpm startin client/web/management; targets the API configured insrc/environments(see client/web/management/angular.json). - Flutter apps:
flutter pub getthenflutter runinside each app folder (client/mobile/agents, client/mobile/customers).
flowchart LR
A[Angular SPA] -->|HTTPS| B(API)
A2[Flutter Customers] -->|HTTPS| B
A3[Flutter Agents] -->|HTTPS| B
B -->|Read/Write| M[(MongoDB)]
B -->|Cache| R[(Redis)]
B -->|Jobs| H[Hangfire]
H -->|Schedule/Run| B
B -->|Media| S[S3 / MinIO]
B -->|Payments| P[PagarMe]
B -->|Email| E[SES/SMTP]
B -->|Social Auth| O[Facebook/Google/Apple]
- Structured logging via EnterpriseLog with RabbitMQ/ELK sinks (config toggled by
Logging:EnterpriseLog:Disabled) in server/src/API/Configurations/LoggerConfiguration.cs and server/src/API/Program.cs. - Health checks for Mongo and Redis with UI at
/api/healthchecks-ui; endpoints registered in server/src/API/Configurations/HealthCheckConfiguration.cs and wired in server/src/API/Configurations/ApiConfiguration.cs. - Hangfire dashboard enabled when Mongo is reachable (see server/src/API/Configurations/HangfireConfiguration.cs).