# vishnu45/lynxapp architecture

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

- Interactive diagram: https://gitdiagram.com/vishnu45/lynxapp
- Repository: https://github.com/vishnu45/lynxapp

## Overview

This is a bus-route planning web service: a user supplies origin, destination, and route rank; the server loads the transit graph, computes ranked paths, and returns either path/cost details or a bus-change suggestion. The graph model also supports exporting a visualization. The excerpts establish backend calls and data dependencies, but do not show how the client invokes the endpoints, so that interaction is not asserted.

Main entry points: [`Server/graph.py`](https://github.com/vishnu45/lynxapp/blob/master/Server/graph.py) (Directed graph), [`Server/server.py`](https://github.com/vishnu45/lynxapp/blob/master/Server/server.py) (HTTP endpoints), [`Server/result.py`](https://github.com/vishnu45/lynxapp/blob/master/Server/result.py) (Transfer suggestions), [`Server/algorithms.py`](https://github.com/vishnu45/lynxapp/blob/master/Server/algorithms.py) (K-shortest paths)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_client["Client page<br/>[index.html]"]
end

subgraph group_api["Route API"]
  node_server["HTTP endpoints<br/>[server.py]"]
end

subgraph group_routing["Routing engine"]
  node_graph["Directed graph<br/>[graph.py]"]
  node_yen["K-shortest paths<br/>[algorithms.py]"]
  node_dijkstra["Shortest-path search<br/>[algorithms.py]"]
  node_priority["Priority queue"]
  node_transfer["Transfer suggestions<br/>[result.py]"]
end

subgraph group_data["Transit data and rendering"]
  node_stoproutes["Stop-route mapping<br/>[stopRouteData.py]"]
  node_network["Transit network<br/>[net5.json]"]
  node_painter["Graph visualization<br/>[graphviz.py]"]
end

node_rider(("Rider"))

node_rider -->|"uses"| node_client
node_server -->|"serves page"| node_client
node_server -->|"loads graph"| node_graph
node_server -->|"exports view"| node_graph
node_server -->|"requests ranked paths"| node_yen
node_server -->|"requests transfer advice"| node_transfer
node_graph -->|"reads network"| node_network
node_graph -->|"delegates rendering"| node_painter
node_yen -->|"finds shortest paths"| node_dijkstra
node_yen -->|"alters and queries"| node_graph
node_dijkstra -->|"orders candidates"| node_priority
node_transfer -->|"loads network"| node_graph
node_transfer -->|"computes route"| node_yen
node_transfer -->|"looks up routes"| node_stoproutes
node_painter -.->|"visualizes graph"| node_network

click node_client "https://github.com/vishnu45/lynxapp/blob/master/Client/index.html"
click node_server "https://github.com/vishnu45/lynxapp/blob/master/Server/server.py"
click node_graph "https://github.com/vishnu45/lynxapp/blob/master/Server/graph.py"
click node_yen "https://github.com/vishnu45/lynxapp/blob/master/Server/algorithms.py"
click node_dijkstra "https://github.com/vishnu45/lynxapp/blob/master/Server/algorithms.py"
click node_priority "https://github.com/vishnu45/lynxapp/blob/master/Server/prioritydictionary.py"
click node_transfer "https://github.com/vishnu45/lynxapp/blob/master/Server/result.py"
click node_stoproutes "https://github.com/vishnu45/lynxapp/blob/master/Server/stopRouteData.py"
click node_network "https://github.com/vishnu45/lynxapp/blob/master/Server/data/json/net5.json"
click node_painter "https://github.com/vishnu45/lynxapp/blob/master/Server/graphviz.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_client toneBlue
class node_server toneAmber
class node_graph,node_yen,node_dijkstra,node_priority,node_transfer toneMint
class node_stoproutes,node_network,node_painter toneRose
class node_rider toneIndigo
```

## Components

### Web interface

- [Client page](https://github.com/vishnu45/lynxapp/blob/master/Client/index.html): `Client/index.html`

### Route API

- [HTTP endpoints](https://github.com/vishnu45/lynxapp/blob/master/Server/server.py): `Server/server.py`

### Routing engine

- [Directed graph](https://github.com/vishnu45/lynxapp/blob/master/Server/graph.py): `Server/graph.py`
- [K-shortest paths](https://github.com/vishnu45/lynxapp/blob/master/Server/algorithms.py): `Server/algorithms.py`
- [Shortest-path search](https://github.com/vishnu45/lynxapp/blob/master/Server/algorithms.py): `Server/algorithms.py`
- [Priority queue](https://github.com/vishnu45/lynxapp/blob/master/Server/prioritydictionary.py): `Server/prioritydictionary.py`
- [Transfer suggestions](https://github.com/vishnu45/lynxapp/blob/master/Server/result.py): `Server/result.py`

### Transit data and rendering

- [Stop-route mapping](https://github.com/vishnu45/lynxapp/blob/master/Server/stopRouteData.py): `Server/stopRouteData.py`
- [Transit network](https://github.com/vishnu45/lynxapp/blob/master/Server/data/json/net5.json): `Server/data/json/net5.json`
- [Graph visualization](https://github.com/vishnu45/lynxapp/blob/master/Server/graphviz.py): `Server/graphviz.py`

### Other components

- **Rider**

## Connections

- Rider → Client page: uses
- HTTP endpoints → Client page: serves page (evidence: `Server/server.py`)
- HTTP endpoints → Directed graph: loads graph (evidence: `Server/server.py`)
- HTTP endpoints → Directed graph: exports view (evidence: `Server/server.py`)
- HTTP endpoints → K-shortest paths: requests ranked paths (evidence: `Server/server.py`)
- HTTP endpoints → Transfer suggestions: requests transfer advice (evidence: `Server/server.py`)
- Directed graph → Transit network: reads network (evidence: `Server/graph.py`)
- Directed graph → Graph visualization: delegates rendering (evidence: `Server/graph.py`)
- K-shortest paths → Shortest-path search: finds shortest paths (evidence: `Server/algorithms.py`)
- K-shortest paths → Directed graph: alters and queries (evidence: `Server/algorithms.py`)
- Shortest-path search → Priority queue: orders candidates (evidence: `Server/algorithms.py`)
- Transfer suggestions → Directed graph: loads network (evidence: `Server/result.py`)
- Transfer suggestions → K-shortest paths: computes route (evidence: `Server/result.py`)
- Transfer suggestions → Stop-route mapping: looks up routes (evidence: `Server/result.py`)
- Graph visualization → Transit network: visualizes graph
