How avotexs/interventions_aireport works
Project Type & Purpose
• This is a full-stack web application named “Airport Intervention Management Platform.”
• Frontend: Angular 20 single-page app for role-aware user interfaces (admins vs technicians).
• Backend: Spring Boot 3.5 REST API providing CRUD and reporting over MySQL.
• Containerized with Docker (Angular in Nginx), Spring Boot in its own container, and MySQL via docker-compose.
File-Structure Analysis
• Top-level:
• backend/ – Spring Boot service (Maven wrapper, Dockerfile, controllers, services, repositories, models, DTOs, application.properties)
• frontend/ – Angular workspace (standalone components, routes, guards, interceptors, services, public assets, Dockerfile)
• docker-compose.yml – definition for MySQL, backend, and frontend stacks.
• Backend layers reflect a classic layered architecture:
• controller/ – REST endpoints (AuthController, ReportingController, entity controllers)
• service/ – business logic & reporting calculations
• repository/ – Spring Data JPA interfaces
• model/ – JPA entities
• dto/ – data transfer objects
• Frontend modules:
• src/app/* – standalone components grouped by feature (aeroport, campagny, equipement, zones, etc.), guard/interceptor for auth, shared services (ThemeService, LangService).
• app.routes.ts – route definitions and guard wiring.
• Deployment artifacts: Dockerfiles in both subprojects and top-level docker-compose.yml.
Key Insights from README
• Role-based UX with Angular Guards and token-based session handling.
• Reporting module with DTOs for chart data and CSV export.
• CORS config in backend to allow calls from Angular dev server.
• In-memory session store in dev, planned to swap to persistent.
• Dev vs Prod: Angular dev server on 4200 proxies to 9090; production build served by Nginx.
• MySQL 8 container with named volume persists data.
a. Main Components
• User Agents (Browser) – Admin and Technician roles
• Angular Frontend Container (Nginx)
• API Gateway/Proxy (Optional: Nginx reverse proxy)
• Spring Boot Backend Container
• MySQL Database Container
• (Optional) External Services: e.g., SMTP for notifications, external storage for CSV exports
b. Relationships & Data Flows
1. Browser → HTTP(S) → Nginx/Angular (ports 80/4200)
2. Angular Services → HTTP API calls → Spring Boot controllers (/api/*)
3. Controllers → Service Layer → Repository → MySQL
4. Service Layer uses DTOs to map Entities → Controllers → JSON → Angular
5. Interceptors attach X-Auth-Token; Guards enforce route access.
6. ReportingService fetches aggregated stats & streams CSV exports.
c. Architectural Patterns & Principles
• Layered Architecture (Controller → Service → Repository)
• RESTful API design
• Token-based Authentication & Authorization
• Component-based frontend with Angular standalone components & router
• Internationalisation via LangService
• Containerization (Dockerfile + Docker Compose as orchestration)
d. Technologies & Frameworks
• Frontend: Angular 20, RxJS, Angular Router, Karma/Jasmine
• Backend: Spring Boot 3.5, Spring Data JPA, Maven, Java 21
• Database: MySQL 8
• DevOps: Docker, Docker Compose, Nginx