How lakshaykarad/rapidlink-backend works
RapidLink Backend combines account authentication with a device-based traffic dashboard and ETA scoring. The dashboard submits and displays device observations; the API persists them, summarizes speeds by road, and uses those summaries to estimate ETAs or rank caller-supplied candidate routes. Authentication is a separate API branch backed by SQL user/profile records. Although the README describes an OSRM routing engine, the sampled backend code does not call OSRM or generate routes; route ranking operates on routes supplied to its endpoint.
Main entry points: main.py FastAPI entry · auth.py Auth routes · dependencies.py Active-user dependency · script.js Map dashboard
Components 16
Traffic API
- FastAPI entry
main.py - Device registry
main.py - Traffic summary
main.py - ETA estimate
main.py - Route ranking
main.py
Authentication
- Auth routes
routers/auth.py - Active-user dependency
dependencies.py - Token and password security
security.py - Auth schemas
schemas.py
Persistence
- SQL session setup
database.py - User models
models.py - SQL database
- Device JSON and CSV
main.py
Map Dashboard
- Map dashboard
static/script.js
Other components
- Dashboard user
- OpenStreetMap tiles
Connections 25
- FastAPI entry → Auth routes: registers routes
main.py - FastAPI entry → User models: creates tables
main.py - FastAPI entry → Active-user dependency: guards device add
main.py - FastAPI entry → SQL session setup: creates tables from
main.py - FastAPI entry → Device registry: serves device endpoints
main.py - FastAPI entry → Traffic summary: serves summary endpoint
main.py - FastAPI entry → ETA estimate: serves ETA endpoint
main.py - FastAPI entry → Route ranking: serves ranking endpoint
main.py - Device registry → Device JSON and CSV: reads and writes
main.py - Device registry → Traffic summary: supplies observations
main.py - ETA estimate → Traffic summary: uses road speeds
main.py - Route ranking → Traffic summary: uses road speeds
main.py - Auth routes → Active-user dependency: protects profile routes
routers/auth.py - Auth routes → Token and password security: checks and issues tokens
routers/auth.py - Auth routes → Auth schemas: validates signup data
routers/auth.py - Auth routes → SQL session setup: queries and commits
routers/auth.py - Auth routes → User models: reads and writes users
routers/auth.py - Active-user dependency → Token and password security: verifies access token
dependencies.py - Active-user dependency → SQL session setup: loads session
dependencies.py - Active-user dependency → User models: loads active user
dependencies.py - SQL session setup → SQL database: opens sessions
database.py - Dashboard user → Map dashboard: uses
static/script.js - Map dashboard → FastAPI entry: requests device and traffic APIs
static/script.js - Map dashboard → OpenStreetMap tiles: loads map tiles
static/script.js - FastAPI entry → Map dashboard: serves home page
main.py