{"id":24573984,"url":"https://github.com/dvorakroth/bus-alerts","last_synced_at":"2025-03-17T11:26:04.328Z","repository":{"id":182385684,"uuid":"668375569","full_name":"dvorakroth/bus-alerts","owner":"dvorakroth","description":"Real-time service alerts for Israeli public transit","archived":false,"fork":false,"pushed_at":"2023-09-01T14:46:32.000Z","size":1082,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T20:56:12.786Z","etag":null,"topics":["gtfs","gtfs-realtime","hebrew","israel","public-transport","service-alerts","transit"],"latest_commit_sha":null,"homepage":"https://bus-alerts.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvorakroth.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}},"created_at":"2023-07-19T16:52:01.000Z","updated_at":"2024-03-31T13:08:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4ceab9d-c614-48f3-a467-a720498605f7","html_url":"https://github.com/dvorakroth/bus-alerts","commit_stats":{"total_commits":310,"total_committers":1,"mean_commits":310.0,"dds":0.0,"last_synced_commit":"40d37724401806fff323645de80f7b426968901a"},"previous_names":["dvorakroth/bus-alerts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvorakroth%2Fbus-alerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvorakroth%2Fbus-alerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvorakroth%2Fbus-alerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvorakroth%2Fbus-alerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvorakroth","download_url":"https://codeload.github.com/dvorakroth/bus-alerts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244023302,"owners_count":20385249,"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":["gtfs","gtfs-realtime","hebrew","israel","public-transport","service-alerts","transit"],"created_at":"2025-01-23T20:56:20.859Z","updated_at":"2025-03-17T11:26:04.290Z","avatar_url":"https://github.com/dvorakroth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"bus-alerts\n==========\n\nSee real-time service alerts for Israeli public transit! Visit [bus-alerts.com](https://bus-alerts.com/)\n\nThis is a Hebrew-language website/webapp written in Typescript, PostgreSQL, HTML, JSX and SASS, designed to read in GTFS and GTFS-RT data from the Israeli Ministry of Transportation, and hopefully output it in a readable, usable format.\n\nThis project was created after the Israeli MoT created [its own weird-ass extensions to the GTFS-RT format](https://www.gov.il/he/departments/general/special_notices_to_developers) that so far no major transit app has implemented any support for.\n\nThis project is in the public domain, see [LICENSE](./LICENSE) for more details. Feel free to fork it, extend it, add to it, run your own instance of it, whatever! For the love of friggin' G-d this data needs to be accessible to public transit users!\n\nFound a bug? Have a suggestion?\n-------------------------------\n\nIf you're a programmer, and have the time and energy, feel free to fork and create a pull request!\n\nIf not, you're welcome to create an Issue, or send me an email, or whatever :3\n\nHow to use\n----------\n\n### Data Sources and Databases\n\nOnce you've gotten your secret API key and the endpoint URL for GTFS-RT data from the Ministry, add the complete URL+API key to a config.ini file, as specified in the [example.config.ini](./src_node/example.config.ini)\n\nAdditionally, you'll need two PostgreSQL databases: one [for the GTFS data](./scripts/gtfs_schema.sql), and one [for the GTFS-RT data](./scripts/alerts_schema.sql). Add their DSNs to your config.ini as well.\n\nFetching and loading GTFS data into a PostgreSQL database can be done as illustrated in [gtfs_updater.sh](./scripts/gtfs_updater.sh).\n\n### Compiling the Typescript\n\nThe NPM script `npm run build` will build both server-side and client-side code.\n\n### Running the loadServiceAlerts script\n\nTo fetch and update GTFS-RT data, run:\n\n```\n$ NODE_ENV=production ts-node src_node/loadServiceAlerts.ts -c path/to/config.ini\n```\n\nor, if you'd rather run the compiled javascript instead of the raw typescript:\n\n```\n$ NODE_ENV=production node dist_node/loadServiceAlerts.js -c path/to/config.ini\n```\n\n### Running the web server\n\nTo run the web server, run:\n\n```\n$ NODE_ENV=production ts-node src_node/webServer.ts -c path/to/config.ini\n# OR:\n$ NODE_ENV=production node dist_node/webServer.js -c path/to/config\n```\n\nIf you load new GTFS data (not GTFS-RT, just regular GTFS), you should probably restart the web server process.\n\n### Serving the static content (HTML, JS, CSS, images)\n\nBy default, the web server process serves the static data from the `dist` directory, defaulting to `dist/index.html` when a file isn't found, because the client-side code uses React Router to create fake multiple pages.\n\nHowever, I only use this for development and testing purposes, and I suggest that in production environments, you instead set up an nginx server. Serve static files from the `dist` directory (again, defaulting to sending back `200 OK` with the contents of `dist/index.html` when a file isn't found), and forward all requests to pages whose path starts with `/api/` to the aformentioned [webServer.ts](./src_node/webServer.ts).\n\nTrans rights?\n-------------\n\nThey're human rights! 🏳️‍⚧️🏳️‍🌈","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvorakroth%2Fbus-alerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvorakroth%2Fbus-alerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvorakroth%2Fbus-alerts/lists"}