# anshkakusth/dst-and-ds-project architecture

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

- Interactive diagram: https://gitdiagram.com/anshkakusth/dst-and-ds-project
- Repository: https://github.com/anshkakusth/dst-and-ds-project

## Overview

This is a single-file, console-based static cab-booking program. The user registers or logs in, selects locations, receives a shortest route and fare, chooses and confirms a cab, watches the simulated journey, then pays and rates the driver. The route calculation, cab handling, and menu workflow are implemented in one C++ file rather than separate services. The README documents the end-to-end flow; sampled excerpts confirm parts of the implementation, but gaps prevent verifying every internal call.

Main entry points: [`codes/cab booking.cpp`](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp) (Menu Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Interaction"]
  node_menu["Menu Workflow<br/>[cab booking.cpp]"]
  node_accounts["Login and Registration<br/>[cab booking.cpp]"]
end

subgraph group_routing["Route Planning"]
  node_locations["Location Map<br/>[cab booking.cpp]"]
  node_shortest_path["Shortest Route<br/>[cab booking.cpp]"]
end

subgraph group_booking["Cab Booking"]
  node_fare["Fare Calculation<br/>[cab booking.cpp]"]
  node_cab_selection["Cab Selection<br/>[cab booking.cpp]"]
  node_cab_details["Cab Details<br/>[cab booking.cpp]"]
  node_driver_file[("Driver File")]
end

subgraph group_trip["Trip Completion"]
  node_journey["Journey Simulation<br/>[cab booking.cpp]"]
  node_payment["Static Payment<br/>[cab booking.cpp]"]
  node_reviews["Driver Reviews<br/>[cab booking.cpp]"]
end

node_rider(("Rider"))

node_rider -->|"uses"| node_menu
node_menu -->|"offers access"| node_accounts
node_menu -->|"presents choices"| node_locations
node_menu -->|"requests route"| node_shortest_path
node_menu -->|"offers cabs"| node_cab_selection
node_cab_selection -->|"shows details"| node_cab_details
node_cab_details -->|"appends driver"| node_driver_file
node_cab_selection -->|"calculates fare"| node_fare
node_menu -->|"starts confirmed trip"| node_journey
node_menu -->|"requests payment"| node_payment
node_menu -->|"requests review"| node_reviews

click node_menu "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_accounts "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_locations "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_shortest_path "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_fare "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_cab_selection "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_cab_details "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_journey "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_payment "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"
click node_reviews "https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp"

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_menu,node_accounts toneBlue
class node_locations,node_shortest_path toneAmber
class node_fare,node_cab_selection,node_cab_details,node_driver_file toneMint
class node_journey,node_payment,node_reviews toneRose
class node_rider toneIndigo
```

## Components

### User Interaction

- [Menu Workflow](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- [Login and Registration](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`

### Route Planning

- [Location Map](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- [Shortest Route](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`

### Cab Booking

- [Fare Calculation](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- [Cab Selection](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- [Cab Details](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- **Driver File**

### Trip Completion

- [Journey Simulation](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- [Static Payment](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`
- [Driver Reviews](https://github.com/anshkakusth/dst-and-ds-project/blob/main/codes/cab%20booking.cpp): `codes/cab booking.cpp`

### Other components

- **Rider**

## Connections

- Rider → Menu Workflow: uses (evidence: `README.md`)
- Menu Workflow → Login and Registration: offers access (evidence: `codes/cab booking.cpp`)
- Menu Workflow → Location Map: presents choices (evidence: `README.md`)
- Menu Workflow → Shortest Route: requests route (evidence: `README.md`)
- Menu Workflow → Cab Selection: offers cabs (evidence: `README.md`)
- Cab Selection → Cab Details: shows details (evidence: `codes/cab booking.cpp`)
- Cab Details → Driver File: appends driver (evidence: `codes/cab booking.cpp`)
- Cab Selection → Fare Calculation: calculates fare (evidence: `codes/cab booking.cpp`)
- Menu Workflow → Journey Simulation: starts confirmed trip (evidence: `README.md`)
- Menu Workflow → Static Payment: requests payment (evidence: `codes/cab booking.cpp`)
- Menu Workflow → Driver Reviews: requests review (evidence: `codes/cab booking.cpp`)
