{"id":22865303,"url":"https://github.com/traines-source/time-space-train-planner","last_synced_at":"2025-05-07T04:04:39.294Z","repository":{"id":54595726,"uuid":"410047375","full_name":"traines-source/time-space-train-planner","owner":"traines-source","description":"Browser-based Tool to Visualize Public Transport Journeys","archived":false,"fork":false,"pushed_at":"2024-12-10T22:58:46.000Z","size":1268,"stargazers_count":63,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T04:04:31.780Z","etag":null,"topics":["journey-planner","public-transport"],"latest_commit_sha":null,"homepage":"https://tespace.traines.eu","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traines-source.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}},"created_at":"2021-09-24T17:24:48.000Z","updated_at":"2025-02-13T21:05:58.000Z","dependencies_parsed_at":"2024-07-05T16:59:17.110Z","dependency_job_id":"c0462378-d975-4465-a623-7d6b0e166d7c","html_url":"https://github.com/traines-source/time-space-train-planner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traines-source%2Ftime-space-train-planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traines-source%2Ftime-space-train-planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traines-source%2Ftime-space-train-planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traines-source%2Ftime-space-train-planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traines-source","download_url":"https://codeload.github.com/traines-source/time-space-train-planner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810271,"owners_count":21807760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["journey-planner","public-transport"],"created_at":"2024-12-13T11:35:56.083Z","updated_at":"2025-05-07T04:04:39.269Z","avatar_url":"https://github.com/traines-source.png","language":"Go","funding_links":[],"categories":["Transport and Mobility"],"sub_categories":[],"readme":"# Time-Space Train Planner\n\nA browser-based tool to visualize public transport journeys from A to B, in order to see all possible connections and possibly find faster connections. See it in action in this video: https://youtu.be/rD5iATcC9Mo\n\nUse it online at https://tespace.traines.eu\n\n![Example Diagram](res/screenshot.png?raw=true)\n\nOften, the HAFAS routing system will not show the fastest routes, because it deems the transfer times too short or because there are just too many possibilities. This tool will display all direct connections between a given set of stations and will help you find the fastest connection and any backup connections that might be good to know about. You can click on individual connections to show the shortest route to the destination from that connection (with a minimum transfer time of zero minutes).\n\nTSTP is currently in development, but you can already use it productively (I know I do).\n\n## Running TSTP\n\nThe server-side part is written in Go. It is recommended to use to hosted version at https://tespace.traines.eu, but you can of course host your own instance.\n\nTSTP relies on an adapted HAFAS API provided by [hafas-client](https://github.com/public-transport/hafas-client), more specifically, [db-rest](https://github.com/derhuerst/db-rest). You need to run your own instance of this API adapter separately from TSTP, or use a publicly available one (e.g. https://v5.db.transport.rest/).\n\nIn addition, you should run an aggressive HTTP cache in between TSTP and this API, because TSTP itself is stateless and will repeatedly issue identical requests for the same resources while gathering data. In `deployments/nginx-cache.conf`, you find an example of how to configure Nginx as an HTTP cache. Please note that this configuration will cache for a very long time. You will not be able to get updated live information for a particular request. If you use the provided `docker-compose.yaml` as is, an Nginx reverse proxy using this configuration will be started alongside TSTP.\n\nThe steps to run TSTP itself are:\n\n1. Copy `deployments/conf.example.env` to `deployments/conf.env` and fill in the hostname of your cached API (`API_CACHE_HOST`) and, if your setup is not exactly mirroring db-rest, the path prefix (`HAFAS_API_CACHE_PREFIX`). If you run the cached API on another host, you probably want to adjust the `API_CACHE_SCHEME` to `https`. The DB Open API and thus the respective environment variables are currently not used anymore.\n2. Copy `res/conf.example.js` to `res/conf.js` and fill in the complete URL to the /stations endpoint of your cached API. Obviously, since this will be used by the browser for autocompletion, this URL needs to be accessible from the outside (i.e. no Docker hostname).\n3. Start TSTP using the `docker-compose.yaml`. If you use the configuration as is, you should access TSTP via the reverse proxy, i.e. via the host-mapped port 8080. Or, if you have installed all Go dependencies, start TSTP without Docker using `start.sh`, in which case TSTP itself will be available under port 3000.\n4. Access TSTP at your selected port under `/tstp` in your browser.\n5. If something goes wrong, consider looking into TSTP's stdout logs.\n\nThis setup will use the rudimentary server-rendered UI. In order to use the full-fledged UI, you would also need to run the Svelte frontend in the ui/ directory and properly connect it to the backend.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraines-source%2Ftime-space-train-planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraines-source%2Ftime-space-train-planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraines-source%2Ftime-space-train-planner/lists"}