How majdeddine-oumanni/delivery-match works
Project type and purpose
• DeliveryMatch is a full-stack, web-based platform connecting Drivers and Senders to share vehicle space.
• Frontend: Angular 19 single-page application.
• Backend: Spring Boot REST API, Spring Data JPA, Spring Security, MySQL datastore.
• Docker is used for containerization; Postman for API docs; Chart.js on the frontend for statistics.
Top-level structure analysis
• /backend: Spring Boot monolith
• src/main/java/com/delivery/backend – controllers, services, models, repos, DTOs, mappers, security config
• application.properties for JDBC / security settings
• Dockerfile, Maven wrapper, pom.xml
• /frontend: Angular project
• src/app: pages (login/register), components (home, users, trips, requests)
• guards, interceptors, services (auth, trip, request)
• Angular Material, Bootstrap, Chart.js integration via components
Key insights from README
• Four user roles: User, Driver, Sender, Admin
• Core flows: authentication (JWT), trip posting/searching, package requests, admin moderation, statistics
• Technical stack confirms RESTful API with JWT filter and role-based access
Main components and interactions
a. Components
1. Browser / Angular Client
2. Auth Layer (JWT filter + Spring Security)
3. REST Controllers (AuthenticationController, UserController, TripController, PackageRequestController)
4. Service Layer (UserService, TripService, PackageRequestService, AuthenticationService)
5. Data Layer (Spring Data Repositories + JPA Entities against MySQL)
6. MySQL Database
7. External Libraries/Services (Chart.js on frontend, Docker container registry, optional email or map services if used)
b. Relationships & Data‐flow
• User interacts with Angular UI → HTTP(S) calls to backend endpoints via HttpClient
• Interceptor logs requests; guard protects routes → attaches JWT
• Spring Security’s JwtAuthenticationFilter extracts/validates token → forwards to controllers
• Controller invokes Service business logic → Service calls Repository to query/update MySQL
• Responses (DTOs) propagate back to Angular → components render results or update UI
c. Architectural patterns
• Layered architecture: Presentation (Angular) → API Layer → Service Layer → Repository Layer → Database
• DTOs & Mappers isolate entity model from API contracts
• JWT‐based stateless authentication, role‐based access control
• Docker containers to package frontend and backend independently
d. Technologies
• Angular 19, Angular Material, Bootstrap, Chart.js
• Spring Boot, Spring Data JPA, Spring Security, JUnit
• MySQL, Docker
Additional notes
• For each user role, annotate which API endpoints they call.