# bilalabidi342-hub/dsa_routesphere architecture

> Architecture diagram of the GitHub repository bilalabidi342-hub/dsa_routesphere, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bilalabidi342-hub/dsa_routesphere
- Repository: https://github.com/bilalabidi342-hub/dsa_routesphere

## Overview

RouteSphere is a school-bus management product whose documented workflow assigns students to stops and buses, plans shortest routes, and reroutes when roads close. The sampled runtime is an early skeleton: the graph supports stop/road management, while the routing engine delegates those operations to it; the remaining route-query methods are declared but not implemented in the excerpt. The README also names parent, driver, and admin features, but their implementation and wiring are not shown, so those capability links are dashed and unverified.

Main entry points: [`core/routing/RoutingEngine.h`](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/RoutingEngine.h) (Shortest routes), [`ui/main_ui.cpp`](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/ui/main_ui.cpp) (Management UI), [`core/routing/RoutingEngine.cpp`](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/RoutingEngine.cpp) (Routing engine), [`core/fleet`](https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/fleet) (Student assignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interfaces"]
  node_graphical_ui["Management UI<br/>[main_ui.cpp]"]
  node_console["Console entry<br/>[main_console.cpp]"]
end

subgraph group_routing["Routing domain"]
  node_routing_engine["Routing engine<br/>[RoutingEngine.cpp]"]
  node_road_graph[("Road graph<br/>[Graph.cpp]")]
  node_route_planning["Shortest routes<br/>[RoutingEngine.h]"]
  node_road_rerouting["Road closures<br/>[Graph.cpp]"]
end

subgraph group_operations["Bus operations"]
  node_student_assignment["Student assignment"]
  node_bus_assignment["Bus assignment"]
  node_role_accounts["Role accounts"]
end

subgraph group_core["Shared structures"]
  node_route_result["Path result<br/>[common.h]"]
  node_queue["Array queue<br/>[ArrayQueue.h]"]
  node_stack["Array stack<br/>[ArrayStack.h]"]
end

node_admin(("Admin"))
node_parent(("Parent"))
node_driver(("Driver"))

node_routing_engine -->|"delegates stop and road operations"| node_road_graph
node_routing_engine -->|"declares route queries"| node_route_planning
node_admin -.->|"uses management features"| node_graphical_ui
node_parent -.->|"uses parent features"| node_graphical_ui
node_driver -.->|"uses driver features"| node_graphical_ui
node_route_planning -.->|"plans from road network"| node_road_graph
node_road_rerouting -.->|"reroutes after closures"| node_route_planning
node_student_assignment -.->|"assigns students to buses"| node_bus_assignment
node_student_assignment -.->|"assigns students to stops"| node_route_planning
node_role_accounts -.->|"provides role features"| node_graphical_ui

click node_graphical_ui "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/ui/main_ui.cpp"
click node_console "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/console/main_console.cpp"
click node_routing_engine "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/RoutingEngine.cpp"
click node_road_graph "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/Graph.cpp"
click node_route_planning "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/RoutingEngine.h"
click node_road_rerouting "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/Graph.cpp"
click node_student_assignment "https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/fleet"
click node_bus_assignment "https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/fleet"
click node_role_accounts "https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/accounts"
click node_route_result "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/common.h"
click node_queue "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/ArrayQueue.h"
click node_stack "https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/ArrayStack.h"

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_graphical_ui,node_console toneBlue
class node_routing_engine,node_road_graph,node_route_planning,node_road_rerouting toneAmber
class node_student_assignment,node_bus_assignment,node_role_accounts toneMint
class node_route_result,node_queue,node_stack toneRose
class node_admin,node_parent,node_driver toneIndigo
```

## Components

### User interfaces

- [Management UI](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/ui/main_ui.cpp): `ui/main_ui.cpp`
- [Console entry](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/console/main_console.cpp): `console/main_console.cpp`

### Routing domain

- [Routing engine](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/RoutingEngine.cpp): `core/routing/RoutingEngine.cpp`
- [Road graph](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/Graph.cpp): `core/routing/Graph.cpp`
- [Shortest routes](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/RoutingEngine.h): `core/routing/RoutingEngine.h`
- [Road closures](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/Graph.cpp): `core/routing/Graph.cpp`

### Bus operations

- [Student assignment](https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/fleet): `core/fleet`
- [Bus assignment](https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/fleet): `core/fleet`
- [Role accounts](https://github.com/bilalabidi342-hub/dsa_routesphere/tree/main/core/accounts): `core/accounts`

### Shared structures

- [Path result](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/common.h): `core/common.h`
- [Array queue](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/ArrayQueue.h): `core/routing/ArrayQueue.h`
- [Array stack](https://github.com/bilalabidi342-hub/dsa_routesphere/blob/main/core/routing/ArrayStack.h): `core/routing/ArrayStack.h`

### Other components

- **Admin**
- **Parent**
- **Driver**

## Connections

- Routing engine → Road graph: delegates stop and road operations (evidence: `core/routing/RoutingEngine.cpp`)
- Routing engine → Shortest routes: declares route queries (evidence: `core/routing/RoutingEngine.h`)
- Admin → Management UI: uses management features (evidence: `README.md`)
- Parent → Management UI: uses parent features (evidence: `README.md`)
- Driver → Management UI: uses driver features (evidence: `README.md`)
- Shortest routes → Road graph: plans from road network (evidence: `README.md`)
- Road closures → Shortest routes: reroutes after closures (evidence: `README.md`)
- Student assignment → Bus assignment: assigns students to buses (evidence: `README.md`)
- Student assignment → Shortest routes: assigns students to stops (evidence: `README.md`)
- Role accounts → Management UI: provides role features (evidence: `README.md`)
