# nicolasvoyez/tandijkstra architecture

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

- Interactive diagram: https://gitdiagram.com/nicolasvoyez/tandijkstra
- Repository: https://github.com/nicolasvoyez/tandijkstra

## Overview

TanDijkstra is a small console application that finds a shortest route between two transit stops. Its workflow reads stop and link data, builds a linked graph, runs Dijkstra’s algorithm using a geographic distance estimate, then prints the route’s stop names or “IMPOSSIBLE.” The graph separates input/output, transit-stop modeling, and shortest-path logic. Source excerpts show the principal calls; no README documents additional capabilities.

Main entry points: [`TanDijkstra/TanProgram.cs`](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanProgram.cs) (CLI workflow), [`TanDijkstra/Dijkstra.cs`](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/Dijkstra.cs) (Dijkstra search), [`TanDijkstra/TanNode.cs`](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanNode.cs) (Stop model), [`TanDijkstra/Node.cs`](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/Node.cs) (Graph node state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_io["Console workflow"]
  node_program["CLI workflow<br/>[TanProgram.cs]"]
end

subgraph group_model["Transit graph"]
  node_stop["Stop model<br/>[TanNode.cs]"]
  node_graphnode["Graph node state<br/>[Node.cs]"]
end

subgraph group_routing["Shortest path"]
  node_algorithm["Dijkstra search<br/>[Dijkstra.cs]"]
  node_distance["Transit distance<br/>[TanDijkstra.cs]"]
end

node_user(("Console user"))

node_user -->|"provides input"| node_program
node_program -->|"parses stops"| node_stop
node_stop -->|"inherits state"| node_graphnode
node_program -->|"runs search"| node_algorithm
node_algorithm -->|"requests distance"| node_distance
node_algorithm -->|"updates route state"| node_graphnode
node_program -->|"prints route"| node_user

click node_program "https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanProgram.cs"
click node_stop "https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanNode.cs"
click node_graphnode "https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/Node.cs"
click node_algorithm "https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/Dijkstra.cs"
click node_distance "https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanDijkstra.cs"

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_program,node_user toneBlue
class node_stop,node_graphnode toneAmber
class node_algorithm,node_distance toneMint
```

## Components

### Console workflow

- [CLI workflow](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanProgram.cs): `TanDijkstra/TanProgram.cs`

### Transit graph

- [Stop model](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanNode.cs): `TanDijkstra/TanNode.cs`
- [Graph node state](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/Node.cs): `TanDijkstra/Node.cs`

### Shortest path

- [Dijkstra search](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/Dijkstra.cs): `TanDijkstra/Dijkstra.cs`
- [Transit distance](https://github.com/nicolasvoyez/tandijkstra/blob/master/TanDijkstra/TanDijkstra.cs): `TanDijkstra/TanDijkstra.cs`

### Other components

- **Console user**

## Connections

- Console user → CLI workflow: provides input (evidence: `TanDijkstra/TanProgram.cs`)
- CLI workflow → Stop model: parses stops (evidence: `TanDijkstra/TanProgram.cs`)
- Stop model → Graph node state: inherits state (evidence: `TanDijkstra/TanNode.cs`)
- CLI workflow → Dijkstra search: runs search (evidence: `TanDijkstra/TanProgram.cs`)
- Dijkstra search → Transit distance: requests distance (evidence: `TanDijkstra/Dijkstra.cs`)
- Dijkstra search → Graph node state: updates route state (evidence: `TanDijkstra/Dijkstra.cs`)
- CLI workflow → Console user: prints route (evidence: `TanDijkstra/TanProgram.cs`)
