{"id":41758181,"url":"https://github.com/aubryio/minotor","last_synced_at":"2026-04-27T02:04:26.812Z","repository":{"id":275433820,"uuid":"516898065","full_name":"aubryio/minotor","owner":"aubryio","description":"A lightweight client-side transit routing library implementing RAPTOR.","archived":false,"fork":false,"pushed_at":"2026-04-13T21:07:32.000Z","size":522,"stargazers_count":64,"open_issues_count":17,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-13T23:12:09.184Z","etag":null,"topics":["gtfs","public-transit","raptor","router","trains","transit","transportation"],"latest_commit_sha":null,"homepage":"https://minotor.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aubryio.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}},"created_at":"2022-07-22T22:05:17.000Z","updated_at":"2026-04-13T21:06:21.000Z","dependencies_parsed_at":"2025-05-25T15:32:09.715Z","dependency_job_id":"5443f6b9-211d-436b-87ad-b54b14ef1061","html_url":"https://github.com/aubryio/minotor","commit_stats":null,"previous_names":["aubryio/minotor"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/aubryio/minotor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aubryio%2Fminotor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aubryio%2Fminotor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aubryio%2Fminotor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aubryio%2Fminotor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aubryio","download_url":"https://codeload.github.com/aubryio/minotor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aubryio%2Fminotor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-transit","raptor","router","trains","transit","transportation"],"created_at":"2026-01-25T02:02:49.060Z","updated_at":"2026-04-27T02:04:26.794Z","avatar_url":"https://github.com/aubryio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minotor\n\n![GitHub Workflow Status](https://github.com/aubryio/minotor/actions/workflows/minotor.yml/badge.svg?branch=main)\n\n[Documentation and examples](https://minotor.dev)\n\nA lightweight and easy to use public transit router primarily targeting client-side usage for research, data visualization, dynamic web and mobile apps.\n\nUnlike most transit planners out there, **minotor** can store all the transit data for a given day in memory on the client, allowing for fast runtime queries using only local data.\nThis is particularly useful for highly dynamic applications or complex visualizations for research purposes where the user needs to query the data in real-time.\nPrivacy-conscious applications where the user does not want to share their location data with a server can also benefit from this model.\n\nThe transit router and the stops index of **minotor** can run in the browser, on React Native or in a Node.js environment.\nTransit data (GTFS) parsing runs on Node.js, and the resulting data is serialized as a protobuf binary that can be loaded by the router.\n\nMinotor's routing algorithm is mostly based on RAPTOR. See [Round-Based Public Transit Routing, D. Delling et al. 2012](https://www.microsoft.com/en-us/research/wp-content/uploads/2012/01/raptor_alenex.pdf).\n\n## Examples\n\n### In-browser transit router\n\nAn example client-side transit router running in the browser with a web worker.\n\n[Demo](https://www.minotor.dev/#router) | [Code](https://github.com/aubryio/minotor.dev/tree/main/app/examples/planner)\n\n### Isochrone maps\n\nAn example implementation of dynamic isochrone maps using minotor in the browser.\n\n[Demo](https://www.minotor.dev/#isochrones) | [Code](https://github.com/aubryio/minotor.dev/tree/main/app/examples/isochrones)\n\nA more complete isochrone map showcase can be found on [isochrone.ch](https://isochrone.ch).\n\n## Features\n\n- GTFS feed parsing (standard and extended)\n- Geographic and textual stop search\n- **Point queries** — earliest-arrival journey from an origin to a destination at a given time\n- **Range queries** — all Pareto-optimal journeys within a departure-time window\n- Isochrone computation — earliest arrival times / fastest routes to every reachable stop\n\n### Tested GTFS feeds\n\n| Feed                                                                                       | Parsing time | Timetable size for a day (compressed) |\n| ------------------------------------------------------------------------------------------ | ------------ | ------------------------------------- |\n| [Swiss GTFS feed](https://data.opentransportdata.swiss/en/dataset/timetable-2026-gtfs2020) | ~2 minutes   | 20 MB (5 MB)                          |\n\n## Get started\n\n### Installation\n\n`npm i minotor`\n\n### TypeScript API\n\n#### GTFS feed parsing (Node.js only)\n\n```ts\nimport { GtfsParser, extendedGtfsProfile } from 'minotor/parser';\n\nconst parser = new GtfsParser('gtfs-feed.zip', extendedGtfsProfile);\nconst timetable = await parser.parseTimetable(new Date());\nconst stopsIndex = await parser.parseStops();\n```\n\nTimes are represented at the minute level (16-bit integers). Parsing can take a few minutes for large feeds.\n\n#### Stop search (browser or Node.js)\n\n```ts\n// Text search (supports partial names and accents)\nconst results = stopsIndex.findStopsByName('Fribourg');\n\n// Lookup by source ID from the GTFS feed\nconst platform = stopsIndex.findStopBySourceStopId('8504100:0:2');\n\n// Nearest stops within 500 m\nconst nearby = stopsIndex.findStopsByLocation(46.803, 7.151, 5, 0.5);\n```\n\n#### Point query (browser or Node.js)\n\nFind the earliest-arrival journey departing at a specific time:\n\n```ts\nimport { Query, Router } from 'minotor';\n\nconst router = new Router(timetable, stopsIndex);\n\nconst [origin] = stopsIndex.findStopsByName('Fribourg/Freiburg');\nconst [destination] = stopsIndex.findStopsByName('Moléson-sur-Gruyères');\n\nconst result = router.route(\n  new Query.Builder()\n    .from(origin.id)\n    .to(destination.id)\n    .departureTime(8 * 60 + 30) // 08:30 in minutes from midnight\n    .maxTransfers(3)\n    .build(),\n);\n\nconst route = result.bestRoute(); // Route | undefined\n\n// Earliest arrival at any individual stop (useful for isochrone computation)\nconst arrival = result.arrivalAt(stop.id); // { arrival: Time, legNumber: number } | undefined\n```\n\nQuery options:\n\n| Option                  | Default   | Description                                                            |\n| ----------------------- | --------- | ---------------------------------------------------------------------- |\n| `maxTransfers`          | `5`       | Maximum number of transfers                                            |\n| `minTransferTime`       | `2 min`   | Fallback minimum transfer time                                         |\n| `maxInitialWaitingTime` | unlimited | Maximum wait for the first vehicle after arriving at the boarding stop |\n| `transportModes`        | all       | Restrict to a subset of GTFS route types                               |\n\n#### Range query (browser or Node.js)\n\nFind all Pareto-optimal journeys within a departure-time window — no journey in the result is dominated by another (i.e. no journey departs later _and_ arrives earlier):\n\n```ts\nimport { RangeQuery, Router } from 'minotor';\n\nconst rangeResult = router.rangeRoute(\n  new RangeQuery.Builder()\n    .from(origin.id)\n    .to(destination.id)\n    .departureTime(8 * 60) // window start: 08:00\n    .lastDepartureTime(10 * 60) // window end:   10:00\n    .maxTransfers(3)\n    .build(),\n);\n\nconsole.log(rangeResult.size); // number of Pareto-optimal journeys\n\n// Iterate runs latest-departure-first\nfor (const { departureTime, result } of rangeResult) {\n  const route = result.bestRoute();\n}\n\n// Or pick a specific journey\nconst earliest = rangeResult.bestRoute(); // earliest arrival\nconst latest = rangeResult.latestDepartureRoute(); // latest possible departure\nconst fastest = rangeResult.fastestRoute(); // shortest travel duration\nconst all = rangeResult.getRoutes(); // all routes, earliest-departure-first\n\n// Earliest arrival at every reachable stop across all runs\nconst arrivals = rangeResult.allEarliestArrivals(); // Map\u003cStopId, Arrival\u003e\nconst durations = rangeResult.allShortestDurations(); // Map\u003cStopId, DurationArrival\u003e\n```\n\n### CLI Usage\n\nParse GTFS data for today and save the timetable and stops index to `/tmp`:\n\n`minotor parse-gtfs gtfs_feed.zip`\n\nStart the interactive REPL:\n\n`minotor repl`\n\nSearch stops:\n\n`minotor\u003e .find moleson`\n\nQuery a route:\n\n`minotor\u003e .route from fribourg to moleson at 08:00`\n\nRun `minotor parse-gtfs -h` and `minotor repl -h` for all available options.\n\n## Development\n\n### Requirements\n\nA working [Node.js](https://nodejs.org) environment and `protoc`:\n\nUbuntu: `apt install -y protobuf-compiler` |\nFedora: `dnf install -y protobuf-compiler` |\nmacOS: `brew install protobuf`\n\n### Debugging\n\nThe REPL (`minotor repl`) exposes several inspection tools.\n\n#### Inspect a stop\n\n`minotor\u003e .inspect stop \u003cid|sourceId|name\u003e`\n\n#### Inspect a route\n\n`minotor\u003e .inspect route \u003cid\u003e`\n\n#### Plot the routing graph\n\nRequires [Graphviz](https://graphviz.org):\n\nUbuntu: `apt install -y graphviz` |\nFedora: `dnf install -y graphviz` |\nmacOS: `brew install graphviz`\n\n```\nminotor\u003e .plot from \u003cstation\u003e to \u003cstation\u003e at \u003cHH:mm\u003e [with \u003cN\u003e transfers] [to \u003cgraph.dot\u003e]\ndot -Ksfdp -Tsvg graph.dot -o graph.svg\n```\n\n### Scripts\n\n| Script          | Description                                   |\n| --------------- | --------------------------------------------- |\n| `build`         | Compile to `dist/`                            |\n| `clean`         | Remove `dist/`                                |\n| `test`          | Run unit tests                                |\n| `test:coverage` | Unit tests with coverage                      |\n| `e2e`           | End-to-end tests against real Swiss GTFS data |\n| `perf`          | Performance benchmark (not in CI)             |\n| `lint`          | ESLint with auto-fix                          |\n| `format`        | Prettier with auto-fix                        |\n| `spell:check`   | Spell checker                                 |\n| `cz`            | Generate a Commitizen commit message          |\n\nReleases are automatically published to npm on merge to `main` (stable) or `beta` (pre-release).\n\n## Roadmap and requests\n\nThe project is under active development. Use GitHub issues for bug reports and feature requests. For custom development, consulting, integrations, or other inquiries, feel free to contact [the author](https://aubry.io/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faubryio%2Fminotor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faubryio%2Fminotor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faubryio%2Fminotor/lists"}