# arijeet2007/gati-x architecture

> Architecture diagram of the GitHub repository arijeet2007/gati-x, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arijeet2007/gati-x
- Repository: https://github.com/arijeet2007/gati-x

## Overview

GATI-X is a web platform for transport, logistics, accessibility, and emergency-response intelligence. A user enters through the React app, signs in, and uses focused workspaces to request route plans, fleet optimization, predictions, or operational summaries; the frontend API client calls FastAPI, whose domain services produce the response. The graph preserves the documented product branches even where route/service implementation excerpts were unavailable. Relationships between unsampled feature pages, endpoints, and services are shown as unverified; representative development data is not a live operational feed.

Main entry points: [`backend/app/api/router.py`](https://github.com/arijeet2007/gati-x/blob/main/backend/app/api/router.py) (API routes), [`frontend/src/services/api.ts`](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/services/api.ts) (API client), [`backend/app/services/routing.py`](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/routing.py) (Route planning), [`backend/app/services/command_center.py`](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/command_center.py) (Command aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App shell<br/>[App.tsx]"]
  node_auth_ui["Session context<br/>[AuthContext.tsx]"]
  node_auth_store["Token storage<br/>[auth-storage.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_map_page["Map workspace<br/>[MapPage.tsx]"]
  node_access_page["Accessibility workspace"]
  node_logistics_page["Logistics workspace<br/>[LogisticsPage.tsx]"]
  node_emergency_page["Emergency workspace<br/>[EmergencyPage.tsx]"]
  node_predictions_page["Predictions workspace"]
  node_copilot_page["Copilot workspace<br/>[CopilotPage.tsx]"]
  node_command_page["Command center"]
  node_operations_page["Data readiness<br/>[OperationsPage.tsx]"]
end

subgraph group_api["API and identity"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_api_router["API routes<br/>[router.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_user_service[("In-memory accounts<br/>[users.py]")]
  node_auth_security["Token security<br/>[security.py]"]
end

subgraph group_routing["Routing intelligence"]
  node_route_service["Route planning<br/>[routing.py]"]
  node_route_engine["Graph algorithms<br/>[engine.py]"]
  node_route_graph["Network graph<br/>[graph.py]"]
  node_route_intel["Route intelligence"]
end

subgraph group_decision["Decision workspaces"]
  node_access_service["Accessibility analysis<br/>[accessibility.py]"]
  node_logistics_service["Fleet optimization<br/>[logistics.py]"]
  node_emergency_service["Emergency planning<br/>[emergency.py]"]
  node_prediction_service["Route predictions<br/>[predictions.py]"]
  node_copilot_service["Verified Copilot<br/>[copilot.py]"]
  node_command_service["Command aggregation<br/>[command_center.py]"]
end

subgraph group_platform["Platform services"]
  node_map_service["Map data<br/>[map_data.py]"]
  node_data_sources["Provider readiness<br/>[data_sources.py]"]
  node_db_session[("Database session<br/>[session.py]")]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"provides session"| node_auth_ui
node_auth_ui -->|"reads and writes"| node_auth_store
node_auth_ui -->|"restores session"| node_api_client
node_map_page -.->|"requests data"| node_api_client
node_access_page -.->|"requests data"| node_api_client
node_logistics_page -->|"loads and optimizes"| node_api_client
node_emergency_page -->|"requests plans"| node_api_client
node_predictions_page -.->|"requests predictions"| node_api_client
node_copilot_page -.->|"queries"| node_api_client
node_command_page -.->|"loads overview"| node_api_client
node_operations_page -.->|"loads readiness"| node_api_client
node_api_client -->|"HTTP requests"| node_api_app
node_api_app -->|"mounts routes"| node_api_router
node_api_router -->|"registers"| node_auth_routes
node_api_router -.->|"routes requests"| node_route_service
node_api_router -.->|"routes requests"| node_access_service
node_api_router -.->|"routes requests"| node_logistics_service
node_api_router -.->|"routes requests"| node_emergency_service
node_api_router -.->|"routes requests"| node_prediction_service
node_api_router -.->|"routes requests"| node_copilot_service
node_api_router -.->|"routes requests"| node_command_service
node_api_router -.->|"routes requests"| node_map_service
node_api_router -.->|"routes requests"| node_data_sources
node_auth_routes -->|"creates and authenticates"| node_user_service
node_auth_routes -->|"creates token"| node_auth_security
node_route_service -->|"finds path"| node_route_engine
node_route_engine -->|"searches graph"| node_route_graph
node_route_service -->|"scores edges"| node_route_intel
node_route_service -.->|"uses network locations"| node_map_service
node_logistics_service -.->|"uses routing"| node_route_service
node_emergency_service -.->|"uses routing"| node_route_service
node_prediction_service -.->|"uses route context"| node_route_service
node_copilot_service -.->|"invokes route tool"| node_route_service
node_command_service -.->|"aggregates"| node_access_service
node_command_service -.->|"aggregates"| node_logistics_service
node_command_service -.->|"aggregates"| node_emergency_service
node_command_service -.->|"aggregates"| node_prediction_service
node_db_session -.->|"available to API"| node_api_app

click node_app "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/App.tsx"
click node_auth_ui "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/features/auth/AuthContext.tsx"
click node_auth_store "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/lib/auth-storage.ts"
click node_api_client "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/services/api.ts"
click node_map_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/MapPage.tsx"
click node_access_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/AccessibilityPage.tsx"
click node_logistics_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/LogisticsPage.tsx"
click node_emergency_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/EmergencyPage.tsx"
click node_predictions_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/PredictionsPage.tsx"
click node_copilot_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/CopilotPage.tsx"
click node_command_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/CommandCenterPage.tsx"
click node_operations_page "https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/OperationsPage.tsx"
click node_api_app "https://github.com/arijeet2007/gati-x/blob/main/backend/app/main.py"
click node_api_router "https://github.com/arijeet2007/gati-x/blob/main/backend/app/api/router.py"
click node_auth_routes "https://github.com/arijeet2007/gati-x/blob/main/backend/app/api/routes/auth.py"
click node_user_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/users.py"
click node_auth_security "https://github.com/arijeet2007/gati-x/blob/main/backend/app/core/security.py"
click node_route_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/routing.py"
click node_route_engine "https://github.com/arijeet2007/gati-x/blob/main/backend/app/routing/engine.py"
click node_route_graph "https://github.com/arijeet2007/gati-x/blob/main/backend/app/routing/graph.py"
click node_route_intel "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/route_intelligence.py"
click node_access_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/accessibility.py"
click node_logistics_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/logistics.py"
click node_emergency_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/emergency.py"
click node_prediction_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/predictions.py"
click node_copilot_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/copilot.py"
click node_command_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/command_center.py"
click node_map_service "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/map_data.py"
click node_data_sources "https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/data_sources.py"
click node_db_session "https://github.com/arijeet2007/gati-x/blob/main/backend/app/db/session.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_auth_ui,node_auth_store,node_api_client,node_map_page,node_access_page,node_logistics_page,node_emergency_page,node_predictions_page,node_copilot_page,node_command_page,node_operations_page,node_user toneBlue
class node_api_app,node_api_router,node_auth_routes,node_user_service,node_auth_security toneAmber
class node_route_service,node_route_engine,node_route_graph,node_route_intel toneMint
class node_access_service,node_logistics_service,node_emergency_service,node_prediction_service,node_copilot_service,node_command_service toneRose
class node_map_service,node_data_sources,node_db_session toneIndigo
```

## Components

### Web client

- [App shell](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/features/auth/AuthContext.tsx): `frontend/src/features/auth/AuthContext.tsx`
- [Token storage](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/lib/auth-storage.ts): `frontend/src/lib/auth-storage.ts`
- [API client](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`
- [Map workspace](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/MapPage.tsx): `frontend/src/pages/MapPage.tsx`
- [Accessibility workspace](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/AccessibilityPage.tsx): `frontend/src/pages/AccessibilityPage.tsx`
- [Logistics workspace](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/LogisticsPage.tsx): `frontend/src/pages/LogisticsPage.tsx`
- [Emergency workspace](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/EmergencyPage.tsx): `frontend/src/pages/EmergencyPage.tsx`
- [Predictions workspace](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/PredictionsPage.tsx): `frontend/src/pages/PredictionsPage.tsx`
- [Copilot workspace](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/CopilotPage.tsx): `frontend/src/pages/CopilotPage.tsx`
- [Command center](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/CommandCenterPage.tsx): `frontend/src/pages/CommandCenterPage.tsx`
- [Data readiness](https://github.com/arijeet2007/gati-x/blob/main/frontend/src/pages/OperationsPage.tsx): `frontend/src/pages/OperationsPage.tsx`

### API and identity

- [FastAPI application](https://github.com/arijeet2007/gati-x/blob/main/backend/app/main.py): `backend/app/main.py`
- [API routes](https://github.com/arijeet2007/gati-x/blob/main/backend/app/api/router.py): `backend/app/api/router.py`
- [Authentication routes](https://github.com/arijeet2007/gati-x/blob/main/backend/app/api/routes/auth.py): `backend/app/api/routes/auth.py`
- [In-memory accounts](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/users.py): `backend/app/services/users.py`
- [Token security](https://github.com/arijeet2007/gati-x/blob/main/backend/app/core/security.py): `backend/app/core/security.py`

### Routing intelligence

- [Route planning](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/routing.py): `backend/app/services/routing.py`
- [Graph algorithms](https://github.com/arijeet2007/gati-x/blob/main/backend/app/routing/engine.py): `backend/app/routing/engine.py`
- [Network graph](https://github.com/arijeet2007/gati-x/blob/main/backend/app/routing/graph.py): `backend/app/routing/graph.py`
- [Route intelligence](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/route_intelligence.py): `backend/app/services/route_intelligence.py`

### Decision workspaces

- [Accessibility analysis](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/accessibility.py): `backend/app/services/accessibility.py`
- [Fleet optimization](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/logistics.py): `backend/app/services/logistics.py`
- [Emergency planning](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/emergency.py): `backend/app/services/emergency.py`
- [Route predictions](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/predictions.py): `backend/app/services/predictions.py`
- [Verified Copilot](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/copilot.py): `backend/app/services/copilot.py`
- [Command aggregation](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/command_center.py): `backend/app/services/command_center.py`

### Platform services

- [Map data](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/map_data.py): `backend/app/services/map_data.py`
- [Provider readiness](https://github.com/arijeet2007/gati-x/blob/main/backend/app/services/data_sources.py): `backend/app/services/data_sources.py`
- [Database session](https://github.com/arijeet2007/gati-x/blob/main/backend/app/db/session.py): `backend/app/db/session.py`

### Other components

- **User**

## Connections

- User → App shell: uses (evidence: `frontend/src/App.tsx`)
- App shell → Session context: provides session (evidence: `frontend/src/App.tsx`)
- Session context → Token storage: reads and writes (evidence: `frontend/src/features/auth/AuthContext.tsx`)
- Session context → API client: restores session (evidence: `frontend/src/features/auth/AuthContext.tsx`)
- Map workspace → API client: requests data
- Accessibility workspace → API client: requests data
- Logistics workspace → API client: loads and optimizes (evidence: `frontend/src/pages/LogisticsPage.tsx`)
- Emergency workspace → API client: requests plans (evidence: `frontend/src/pages/EmergencyPage.tsx`)
- Predictions workspace → API client: requests predictions
- Copilot workspace → API client: queries
- Command center → API client: loads overview
- Data readiness → API client: loads readiness
- API client → FastAPI application: HTTP requests (evidence: `README.md`)
- FastAPI application → API routes: mounts routes (evidence: `backend/app/main.py`)
- API routes → Authentication routes: registers (evidence: `backend/app/api/router.py`)
- API routes → Route planning: routes requests
- API routes → Accessibility analysis: routes requests
- API routes → Fleet optimization: routes requests
- API routes → Emergency planning: routes requests
- API routes → Route predictions: routes requests
- API routes → Verified Copilot: routes requests
- API routes → Command aggregation: routes requests
- API routes → Map data: routes requests
- API routes → Provider readiness: routes requests
- Authentication routes → In-memory accounts: creates and authenticates (evidence: `backend/app/api/routes/auth.py`)
- Authentication routes → Token security: creates token (evidence: `backend/app/api/routes/auth.py`)
- Route planning → Graph algorithms: finds path (evidence: `backend/app/services/routing.py`)
- Graph algorithms → Network graph: searches graph (evidence: `backend/app/routing/engine.py`)
- Route planning → Route intelligence: scores edges (evidence: `backend/app/services/routing.py`)
- Route planning → Map data: uses network locations
- Fleet optimization → Route planning: uses routing
- Emergency planning → Route planning: uses routing
- Route predictions → Route planning: uses route context
- Verified Copilot → Route planning: invokes route tool
- Command aggregation → Accessibility analysis: aggregates
- Command aggregation → Fleet optimization: aggregates
- Command aggregation → Emergency planning: aggregates
- Command aggregation → Route predictions: aggregates
- Database session → FastAPI application: available to API
