# andrewgiganto/ride-hailing-system architecture

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

- Interactive diagram: https://gitdiagram.com/andrewgiganto/ride-hailing-system
- Repository: https://github.com/andrewgiganto/ride-hailing-system

## Overview

This repository is a small ride-hailing simulation. Its main workflow creates a passenger and driver, requests a ride, estimates its fare, assigns the available driver, updates trip status, and processes payment. The simulation entry point coordinates these steps; ride and user behavior live in separate model modules. Payment implementation details are not shown, so that component is represented only by the import and call visible in the entry point.

Main entry points: [`src/main.py`](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/main.py) (Simulation Flow), [`src/models/user.py`](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/user.py) (Passenger and Driver), [`src/models/ride.py`](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/ride.py) (Ride and Fare), [`src/models/payment`](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/payment) (Payment Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Simulation"]
  node_main["Simulation Flow<br/>[main.py]"]
  node_users["Passenger and Driver<br/>[user.py]"]
end

subgraph group_ride["Ride Domain"]
  node_ride_lifecycle["Ride and Fare<br/>[ride.py]"]
end

subgraph group_payment["Payment"]
  node_payment_processing["Payment Processing"]
end

node_main -->|"creates and calls"| node_users
node_main -->|"creates and updates"| node_ride_lifecycle
node_main -->|"creates and processes"| node_payment_processing

click node_main "https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/main.py"
click node_users "https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/user.py"
click node_ride_lifecycle "https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/ride.py"
click node_payment_processing "https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/payment"

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_main,node_users toneBlue
class node_ride_lifecycle toneAmber
class node_payment_processing toneMint
```

## Components

### Simulation

- [Simulation Flow](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/main.py): `src/main.py`
- [Passenger and Driver](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/user.py): `src/models/user.py`

### Ride Domain

- [Ride and Fare](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/ride.py): `src/models/ride.py`

### Payment

- [Payment Processing](https://github.com/andrewgiganto/ride-hailing-system/blob/main/src/models/payment): `src/models/payment`

## Connections

- Simulation Flow → Passenger and Driver: creates and calls (evidence: `src/main.py`)
- Simulation Flow → Ride and Fare: creates and updates (evidence: `src/main.py`)
- Simulation Flow → Payment Processing: creates and processes (evidence: `src/main.py`)
