# robinpuelles/gtfs_project_v2 architecture

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

- Interactive diagram: https://gitdiagram.com/robinpuelles/gtfs_project_v2
- Repository: https://github.com/robinpuelles/gtfs_project_v2

## Overview

GTFS Transilien is a small Python library for loading GTFS tables and querying date-specific schedules and stop sequences for mapping. The typical workflow is to load feed files into a GTFSData object, then request stop or route schedules, or route/trip shapes. The sampled source shows schedule queries using calendar logic and GTFSData; shapes also operate on GTFSData. No API server or visualization runtime is shown, so those README capabilities are not mapped as implemented components.

Main entry points: [`src/gtfs_project/schedules.py`](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/schedules.py) (Schedule queries), [`src/gtfs_project/loader.py`](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/loader.py) (GTFS loader), [`src/gtfs_project/shapes.py`](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/shapes.py) (Route and trip shapes), [`src/gtfs_project/calendar.py`](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/calendar.py) (Active services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Feed ingestion"]
  node_loader["GTFS loader<br/>[loader.py]"]
end

subgraph group_calendar["Service dates"]
  node_calendar_logic["Active services<br/>[calendar.py]"]
end

subgraph group_queries["Schedule and shape queries"]
  node_schedules["Schedule queries<br/>[schedules.py]"]
  node_shapes["Route and trip shapes<br/>[shapes.py]"]
end

node_caller(("Library caller"))

node_caller -.->|"loads feed"| node_loader
node_caller -.->|"requests schedules"| node_schedules
node_caller -.->|"requests shapes"| node_shapes
node_schedules -->|"gets active services"| node_calendar_logic
node_schedules -->|"accepts GTFSData"| node_loader
node_shapes -->|"accepts GTFSData"| node_loader

click node_loader "https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/loader.py"
click node_calendar_logic "https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/calendar.py"
click node_schedules "https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/schedules.py"
click node_shapes "https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/shapes.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_loader toneBlue
class node_calendar_logic toneAmber
class node_schedules,node_shapes toneMint
class node_caller toneIndigo
```

## Components

### Feed ingestion

- [GTFS loader](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/loader.py): `src/gtfs_project/loader.py`

### Service dates

- [Active services](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/calendar.py): `src/gtfs_project/calendar.py`

### Schedule and shape queries

- [Schedule queries](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/schedules.py): `src/gtfs_project/schedules.py`
- [Route and trip shapes](https://github.com/robinpuelles/gtfs_project_v2/blob/main/src/gtfs_project/shapes.py): `src/gtfs_project/shapes.py`

### Other components

- **Library caller**

## Connections

- Library caller → GTFS loader: loads feed
- Library caller → Schedule queries: requests schedules
- Library caller → Route and trip shapes: requests shapes
- Schedule queries → Active services: gets active services (evidence: `src/gtfs_project/schedules.py`)
- Schedule queries → GTFS loader: accepts GTFSData (evidence: `src/gtfs_project/schedules.py`)
- Route and trip shapes → GTFS loader: accepts GTFSData (evidence: `src/gtfs_project/shapes.py`)
