How cardosojse/fsph-fleet-management works
fsph-fleet-management is a Spring Boot fleet-management backend. Users submit and manage trip requests; the system checks vehicle and driver availability, supports approval and scheduling, and exposes fleet-calendar information. Separate operational areas cover maintenance and preventive schedules, fueling, drivers, vehicles, SVO team coverage, user access, notifications, and audit history. The sampled code confirms the trip-request and maintenance API-to-service paths and selected persistence calls; other branches are shown as product areas, but their internal wiring was not sampled.
Main entry points: AuthService.java Authentication · TripRequestService.java Request availability · MaintenanceService.java Maintenance schedules · SvoDutyShiftController.java SVO shift API
Components 33
API and access
- Trip request API
src/main/java/br/com/gestaofrota/api/v1/controllers/TripRequestController.java - Trip API
src/main/java/br/com/gestaofrota/api/v1/controllers/TripController.java - Driver API
src/main/java/br/com/gestaofrota/api/v1/controllers/DriverController.java - Vehicle API
src/main/java/br/com/gestaofrota/api/v1/controllers/VehicleController.java - Maintenance API
src/main/java/br/com/gestaofrota/api/v1/controllers/MaintenanceController.java - Fueling API
src/main/java/br/com/gestaofrota/api/v1/controllers/FuelingController.java - Authentication API
src/main/java/br/com/gestaofrota/api/v1/controllers/AuthController.java - Authentication
src/main/java/br/com/gestaofrota/application/services/AuthService.java - JWT service
src/main/java/br/com/gestaofrota/infra/security/jwt/JwtService.java - User loading
src/main/java/br/com/gestaofrota/infra/security/services/CustomUserDetailsService.java - SVO shift API
src/main/java/br/com/gestaofrota/api/v1/controllers/SvoDutyShiftController.java - Notifications API
src/main/java/br/com/gestaofrota/api/v1/controllers/NotificationController.java - Audit API
src/main/java/br/com/gestaofrota/api/v1/controllers/AuditLogController.java
Trip operations
- Request availability
src/main/java/br/com/gestaofrota/application/services/TripRequestService.java - Trip requests
src/main/java/br/com/gestaofrota/infra/repositories/TripRequestRepository.java - Request lifecycle
src/main/java/br/com/gestaofrota/domain/models/TripRequest.java - Trip operations
src/main/java/br/com/gestaofrota/application/services/TripService.java
Fleet operations
- Driver management
src/main/java/br/com/gestaofrota/application/services/DriverService.java - Vehicle management
src/main/java/br/com/gestaofrota/application/services/VehicleService.java - Vehicle records
src/main/java/br/com/gestaofrota/infra/repositories/VehicleRepository.java - Maintenance schedules
src/main/java/br/com/gestaofrota/application/services/MaintenanceService.java - Maintenance records
src/main/java/br/com/gestaofrota/infra/repositories/VehicleMaintenanceRepository.java - Fueling records
src/main/java/br/com/gestaofrota/application/services/FuelingService.java
Administration and oversight
- SVO coverage
src/main/java/br/com/gestaofrota/application/services/SvoDutyShiftService.java - Shift records
src/main/java/br/com/gestaofrota/infra/repositories/SvoDutyShiftRepository.java - SVO teams
src/main/java/br/com/gestaofrota/application/services/SvoTeamService.java - Notifications
src/main/java/br/com/gestaofrota/application/services/NotificationService.java - Email delivery
src/main/java/br/com/gestaofrota/application/services/NotificationEmailSender.java - Audit history
src/main/java/br/com/gestaofrota/application/services/AuditLogService.java - Audit records
src/main/java/br/com/gestaofrota/infra/repositories/AuditLogRepository.java - User administration
src/main/java/br/com/gestaofrota/application/services/UserService.java - Role permissions
src/main/java/br/com/gestaofrota/application/services/RolePermissionService.java
Other components
- Fleet user
Connections 23
- Fleet user → Trip request API: submits requests
- Trip request API → Request availability: delegates to
src/main/java/br/com/gestaofrota/api/v1/controllers/TripRequestController.java - Request availability → Trip requests: queries
src/main/java/br/com/gestaofrota/application/services/TripRequestService.java - Request availability → Request lifecycle: updates lifecycle
src/main/java/br/com/gestaofrota/application/services/TripRequestService.java - Trip API → Trip operations: delegates to
- Driver API → Driver management: delegates to
- Vehicle API → Vehicle management: delegates to
src/main/java/br/com/gestaofrota/api/v1/controllers/VehicleController.java - Vehicle management → Vehicle records: persists vehicles
- Maintenance API → Maintenance schedules: delegates to
src/main/java/br/com/gestaofrota/api/v1/controllers/MaintenanceController.java - Maintenance schedules → Maintenance records: reads and writes
src/main/java/br/com/gestaofrota/application/services/MaintenanceService.java - Maintenance schedules → Vehicle records: locks vehicles
src/main/java/br/com/gestaofrota/application/services/MaintenanceService.java - Fueling API → Fueling records: delegates to
- Authentication API → Authentication: delegates to
- Authentication → JWT service: issues tokens
src/main/java/br/com/gestaofrota/application/services/AuthService.java - Authentication → User loading: loads identity
- SVO shift API → SVO coverage: delegates to
src/main/java/br/com/gestaofrota/api/v1/controllers/SvoDutyShiftController.java - SVO coverage → Shift records: reads and writes
src/main/java/br/com/gestaofrota/application/services/SvoDutyShiftService.java - SVO shift API → SVO teams: manages teams
- Notifications API → Notifications: delegates to
- Notifications → Email delivery: sends email
src/main/java/br/com/gestaofrota/application/services/NotificationService.java - Audit API → Audit history: delegates to
- Audit history → Audit records: stores records
src/main/java/br/com/gestaofrota/application/services/AuditLogService.java - User administration → Role permissions: uses permissions