{"id":48620859,"url":"https://github.com/catenarytransit/catenary-backend","last_synced_at":"2026-04-09T03:35:51.642Z","repository":{"id":215719006,"uuid":"739539112","full_name":"catenarytransit/catenary-backend","owner":"catenarytransit","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-06T23:34:01.000Z","size":25882,"stargazers_count":48,"open_issues_count":12,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-07T01:15:17.947Z","etag":null,"topics":["gtfs","public-transport","rust"],"latest_commit_sha":null,"homepage":"https://catenarymaps.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catenarytransit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"catenarymaps"}},"created_at":"2024-01-05T20:14:24.000Z","updated_at":"2026-04-06T23:34:07.000Z","dependencies_parsed_at":"2024-02-07T07:26:22.495Z","dependency_job_id":"2c00139b-d317-4103-b094-a8a1055457fe","html_url":"https://github.com/catenarytransit/catenary-backend","commit_stats":{"total_commits":1782,"total_committers":7,"mean_commits":"254.57142857142858","dds":0.08473625140291807,"last_synced_commit":"07574addabe30917bda685c89ae7ee22df104dbd"},"previous_names":["catenarytransit/catenary-backend"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/catenarytransit/catenary-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catenarytransit%2Fcatenary-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catenarytransit%2Fcatenary-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catenarytransit%2Fcatenary-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catenarytransit%2Fcatenary-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catenarytransit","download_url":"https://codeload.github.com/catenarytransit/catenary-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catenarytransit%2Fcatenary-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gtfs","public-transport","rust"],"created_at":"2026-04-09T03:35:51.577Z","updated_at":"2026-04-09T03:35:51.635Z","avatar_url":"https://github.com/catenarytransit.png","language":"Rust","funding_links":["https://opencollective.com/catenarymaps"],"categories":[],"sub_categories":[],"readme":"## Architecture\n\nCatenary Backend is a distributed system comprised of microservices operating in Kubernetes. The system is designed for fault tolerance, high-avaliability, and native execution speed in x86-64 using the Rust systems programming language.\n\n- **Maple**: GTFS Downloader and ingestion engine into postgres\n- **Edelweiss**: Routing execution engine (in progress, see also [our routing testbed](https://github.com/catenarytransit/routing)\n- **Avens**: OSM Preprocessor and graph generator for routing\n- **Alpenrose**: Distributed system to ingest GTFS-rt and other realtime data (Rose des Alpes); successor to Kactus.\n- **Aspen**: Processing of realtime data and dynamic insertion into other engines. Submodule Pando is used for distribution management\n- **Linnaea**: Visualisation of the graphs for debugging and research paper purposes\n- **Gentian**: Transit graph generation task server\n- **Harebell**: Map tile geometry generator creating line ordering optimised graph maps (LOOM) MVT files.\n- **Spruce**: Websocket server for frontend to stream data to and from backend, including realtime locations, stop times (not started yet)\n- **Birch**: HTTP API server\n- **OSM Station Import**: Imports railway stations from OpenStreetMap PBF files for GTFS stop association\n\nThe kubernetes configuration is generated using Helm templates. See Helm's documentation for further information on that.\n\nThe code is heavily commented, go to each folder in src for more information.\n\n### Submodules maintained \n- **DMFR dataset reader**: reads data from transitland-atlas into raw structs https://docs.rs/dmfr-dataset-reader/latest/dmfr_dataset_reader/\n- **[Château](https://github.com/catenarytransit/chateau)**: Associates feeds with operators and vise versa using depth first search in knowledge graph\n\n#### Agency specific submodules\n- **[Amtrak GTFS rt](https://github.com/catenarytransit/amtrak-gtfs-rt)**: Conversion of proprietary realtime data from amtrak's website into gtfs-rt.\n- **Chicago GTFS Rt**: conversion of proprietary Chicago CTA data to GTFS realtime\n- **Rtc Québec GTFS RT**: conversion of proprietary app RTC Nomade to GTFS realtime\n- **[Via Rail GTFS RT](https://github.com/catenarytransit/via-rail-gtfsrt)**: Conversion of Via Rail tracking to GTFS Realtime.\n\n## Install Dependencies\n\n```bash\nsudo apt install -y postgresql-common\nsudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh\nsudo apt install libprotoc-dev protobuf-compiler build-essential gcc pkg-config libssl-dev unzip wget cmake openssl libpq-dev\n```\n\n#### install coin cbc integer linear programming solver.\n```bash\nsudo apt-get install coinor-cbc coinor-libcbc-dev\n```\n\n### Install postgres\n```bash\nsudo apt install postgresql-18 postgresql-18-postgis-3 postgresql-contrib postgresql\n```\n\nYou may also use an external database if you prefer.\n\n### Enable PostGis\n\n```sql\nCREATE EXTENSION postgis;\n```\n\n## For Contributors\n\nGood commit messages are required to contribute to this project.\n\n### Installation of Postgres\n\nSee https://www.postgresql.org/download\n\nPostGIS is also required like \n```bash\nsudo apt install postgresql-16-postgis-3\n```\n\nSee https://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS3UbuntuPGSQLApt for more instructions\n\n### SQL notes\nWe've switched to diesel for our queries. Read the diesel documentation to learn how to use it.\nhttps://diesel.rs/guides/getting-started.html\n\nLib PQ is also required to install the diesel cli. Only postgres is required.\nExample\n```bash\nsudo apt-get install libpq-dev\ncargo install diesel_cli --no-default-features --features postgres\n```\n\n### Common Database debugging\n\nIs Postgis not installing? This page may be helpful: https://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS3UbuntuPGSQLApt\n\n### Updating transitland submodules\n\n```bash\ngit submodule update --rebase --remote\n```\n\n### Style Guide\n\nCode should be formatted with `cargo fmt` and be well documented.\nThe following `cargo clippy` rules are enforced.\n\n```rs\n#![deny(\n    clippy::mutable_key_type,\n    clippy::map_entry,\n    clippy::boxed_local,\n    clippy::let_unit_value,\n    clippy::redundant_allocation,\n    clippy::bool_comparison,\n    clippy::bind_instead_of_map,\n    clippy::vec_box,\n    clippy::while_let_loop,\n    clippy::useless_asref,\n    clippy::repeat_once,\n    clippy::deref_addrof,\n    clippy::suspicious_map,\n    clippy::arc_with_non_send_sync,\n    clippy::single_char_pattern,\n    clippy::for_kv_map,\n    clippy::let_unit_value,\n    clippy::let_and_return,\n    clippy::iter_nth,\n    clippy::iter_cloned_collect,\n    clippy::bytes_nth,\n    clippy::deprecated_clippy_cfg_attr,\n    clippy::match_result_ok,\n    clippy::cmp_owned,\n    clippy::cmp_null,\n    clippy::op_ref,\n    clippy::useless_vec,\n    clippy::module_inception\n)]\n```\n\n### Future potential submodule names\n\n- **Truffle** reachability analysis\n- **Chinese plum** (needs to pick better syonym for it)\n\n-----------------------------------------------------\n\n### OSM Station Association\n\nThe OSM Station Import system associates GTFS railway stops with OpenStreetMap stations. This provides additional metadata like multilingual names, UIC references, and station relationships.\n\n#### Step 1: Import OSM Stations\n\nFirst, obtain a pre-filtered PBF file containing railway stations (or use one from Geofabrik filtered with osmium):\n\n```bash\ncargo run --bin osmstationimport -- --file /path/to/railstations.osm.pbf\n```\n\nmultiple imports can be done sequentially, and will overwrite old data.\n\n```bash\ncargo run --bin osmstationimport -- --file railstations-europe-latest.osm.pbf\ncargo run --bin osmstationimport -- --file railstations-north-america-latest.osm.pbf\ncargo run --bin osmstationimport -- --file railstations-asia-latest.osm.pbf\n```\n\nThe importer:\n- Computes SHA256 hash to skip duplicate imports\n- Extracts rail, tram, and subway stations\n- Parses multilingual names (`name:en`, `name:de`, etc.)\n- Stores in `gtfs.osm_stations` table with spatial indexing\n\n#### Step 2: Run Maple Import\n\nWhen Maple processes GTFS feeds, it automatically matches stops to OSM stations for rail/tram/subway routes:\n\n```bash\ncargo run --bin maple -- --transitland /path/to/transitland-atlas\n```\n\n See the Maple readme for more info\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatenarytransit%2Fcatenary-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatenarytransit%2Fcatenary-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatenarytransit%2Fcatenary-backend/lists"}