How mostaqhossain/fleetforceapi works
FleetForceAPI is a .NET backend for a React frontend, with MongoDB persistence. The principal workflow is an HTTP request routed to a domain controller, processed through a repository, and read from or written to MongoDB; controllers return API responses to the client. Separate driver, load, and truck branches include CRUD and list/search/filter/sort/paging capabilities documented by repository contracts. Source excerpts show truck/load persistence and startup registration; driver persistence and mapping details are less fully sampled, so those links are limited to indexed references or README evidence.
Main entry points: Program.cs .NET API host · CombineSearchController.cs Combined search · Repository Driver repository · LoadRepository.cs Load repository
Components 22
HTTP API
- Driver endpoints
Controllers/DriverController.cs - Load endpoints
Controllers/LoadController.cs - Truck endpoints
Controllers/TruckController.cs - Combined search
Controllers/CombineSearchController.cs
Domain Data
- API response
Models/ApiResponse.cs - Driver data
Models/Driver.cs - Load data
Models/Load.cs - Truck data
Models/Truck.cs - DTO metadata
DTO/BaseDTO.cs - Driver DTO
DTO/DriverDTO.cs - Load DTO
DTO/LoadDTO.cs - Truck DTO
DTO/TruckDTO.cs - Driver mapping
MapModel/DriverMapper.cs - Load mapping
MapModel/LoadMapper.cs - Truck mapping
MapModel/TruckMapper.cs
Mongo Persistence
- Driver repository
Repository - Load repository
Repository/LoadRepository.cs - Truck repository
Repository/TruckRepository.cs
Application Setup
- .NET API host
Program.cs - Mongo settings
Models/MongoDBSettings.cs
Other components
- React frontend
- MongoDB
Connections 28
- React frontend → .NET API host: sends requests
README.md - .NET API host → Driver endpoints: routes requests
Program.cs - .NET API host → Load endpoints: routes requests
Program.cs - .NET API host → Truck endpoints: routes requests
Program.cs - .NET API host → Combined search: routes requests
Program.cs - Driver endpoints → Driver repository: calls repository
Controllers/DriverController.cs - Load endpoints → Load repository: calls repository
Controllers/LoadController.cs - Truck endpoints → Truck repository: calls repository
Controllers/TruckController.cs - Combined search → Driver repository: uses repository
Controllers/CombineSearchController.cs - Combined search → Load repository: uses repository
Controllers/CombineSearchController.cs - Combined search → Truck repository: uses repository
Controllers/CombineSearchController.cs - Driver endpoints → API response: returns response
Controllers/DriverController.cs - Load endpoints → API response: returns response
Controllers/LoadController.cs - Truck endpoints → API response: returns response
Controllers/TruckController.cs - Driver repository → Driver data: reads writes
Repository/DriverRepository.cs - Load repository → Load data: reads writes
Repository/LoadRepository.cs - Truck repository → Truck data: reads writes
Repository/TruckRepository.cs - .NET API host → Mongo settings: loads configuration
Program.cs - .NET API host → MongoDB: configures database
Program.cs - Load repository → MongoDB: queries collection
Repository/LoadRepository.cs - Truck repository → MongoDB: queries collection
Repository/TruckRepository.cs - Driver repository → MongoDB: queries collection
- Driver mapping → Driver data: maps model
MapModel/DriverMapper.cs - Driver mapping → Driver DTO: maps DTO
MapModel/DriverMapper.cs - Load mapping → Load data: maps model
MapModel/LoadMapper.cs - Load mapping → Load DTO: maps DTO
MapModel/LoadMapper.cs - Truck mapping → Truck data: maps model
MapModel/TruckMapper.cs - Truck mapping → Truck DTO: maps DTO
MapModel/TruckMapper.cs