How frre-ds/2026-13-tpi works
M5 is a FastAPI service for recording ride requests and managing driver offers through assignment. The principal implemented flow is a client request entering the API, being persisted, then receiving an offer whose response may trigger the transactional assignment service and dispatch history. Reservation-based requests and pre-assignment cancellation are additional API paths. README-listed integrations and candidate search are planned, not shown as live communication; the graph marks those relationships as unverified. The repository also contains a second offer router implementation, but the sampled application entry point registers the other router.
Main entry points: main.py FastAPI entry · oferta.py Offer endpoints · routers_oferta.py Alternate offer API · asignacion.py Assignment service
Components 19
API workflows
- FastAPI entry
app/main.py - Request handling
app/main.py
Offers and dispatch
- Offer endpoints
app/routers/oferta.py - Alternate offer API
app/routers/routers_oferta.py - Assignment service
app/services/asignacion.py - Offer schemas
app/schemas/oferta.py - Alternate offer schemas
app/schemas/schemas_oferta.py
Persistence
- Request model
app/models/solicitud.py - Offer model
app/models/oferta.py - Dispatch history model
app/models/despacho.py - Database sessions
app/database.py - MySQL
Module integrations
- M2 clients
- M3 drivers
- M4 availability
- M6 trip lifecycle
- M9 reservations
Other components
- Client
- Driver
Connections 24
- Client → FastAPI entry: submits requests
README.md - Driver → Offer endpoints: responds to offers
README.md - FastAPI entry → Offer endpoints: registers router
app/main.py - FastAPI entry → Request handling: handles requests
app/main.py - Request handling → Database sessions: opens session
app/main.py - Request handling → Request model: creates and queries
app/main.py - Offer endpoints → Database sessions: opens session
app/routers/oferta.py - Offer endpoints → Offer model: creates and reads
app/routers/oferta.py - Offer endpoints → Offer schemas: validates payloads
app/routers/oferta.py - Offer endpoints → Assignment service: dispatches response
app/routers/oferta.py - Assignment service → Offer model: checks and updates
app/services/asignacion.py - Assignment service → Request model: assigns conductor
app/services/asignacion.py - Assignment service → Dispatch history model: records transition
app/services/asignacion.py - Alternate offer API → Database sessions: opens session
app/routers/routers_oferta.py - Alternate offer API → Offer model: creates and reads
app/routers/routers_oferta.py - Alternate offer API → Request model: checks request
app/routers/routers_oferta.py - Alternate offer API → Dispatch history model: records response
app/routers/routers_oferta.py - Alternate offer API → Alternate offer schemas: validates payloads
app/routers/routers_oferta.py - Database sessions → MySQL: connects to
app/database.py - FastAPI entry → M2 clients: planned client checks
README.md - FastAPI entry → M3 drivers: planned driver checks
README.md - FastAPI entry → M4 availability: planned availability lookup
README.md - FastAPI entry → M6 trip lifecycle: planned trip creation
README.md - FastAPI entry → M9 reservations: planned reservation activation
README.md