{"id":16423896,"url":"https://github.com/oliveroneill/todserver","last_synced_at":"2026-04-18T00:31:43.975Z","repository":{"id":86174318,"uuid":"102109425","full_name":"oliveroneill/todserver","owner":"oliveroneill","description":"A server that keeps track of traffic and late buses for you","archived":false,"fork":false,"pushed_at":"2018-04-20T12:02:06.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T16:51:03.486Z","etag":null,"topics":["apns","directions-api","firebase","notifications","timing","transit","utility"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/oliveroneill.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":"2017-09-01T12:13:28.000Z","updated_at":"2018-04-20T12:02:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"760abdaf-9175-41de-a1fd-64fa9d80c05c","html_url":"https://github.com/oliveroneill/todserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oliveroneill/todserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliveroneill%2Ftodserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliveroneill%2Ftodserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliveroneill%2Ftodserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliveroneill%2Ftodserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliveroneill","download_url":"https://codeload.github.com/oliveroneill/todserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliveroneill%2Ftodserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["apns","directions-api","firebase","notifications","timing","transit","utility"],"created_at":"2024-10-11T07:41:14.870Z","updated_at":"2026-04-18T00:31:43.886Z","avatar_url":"https://github.com/oliveroneill.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tod server\n[![Build Status](https://travis-ci.org/oliveroneill/todserver.svg?branch=master)](https://travis-ci.org/oliveroneill/todserver)\n\nA server that schedules trips so that a notification can be sent when it's\ntime to leave. This was designed to be used with the\n[tod app](https://github.com/oliveroneill/tod). The server tracks trip\nduration in real-time using Google Maps so that transit information is updated\nand users are alerted so that they never miss their bus. Tod is short for\n'time of departure'.\n\nGoogle Maps does not offer real-time updates for all transit systems but the\ncode is extensible so that additional systems can be added.\nSee the [Development section](#development). Don't rely on this server for\ntransit updates unless you're sure that Google Maps Directions offers regular\nupdates to schedules in your city.\n\n**WARNING**: This is a personal side project that is still in alpha\ndevelopment, you are responsible for your own appointments and this\nserver will not be held accountable for any tardiness.\n\n## Dependencies\n* [Docker](https://docs.docker.com/engine/installation/)\n* [docker-compose](https://docs.docker.com/compose/install/)\n\n## Usage\nThe tod server is made up of:\n* Trip watcher (tripwatcher in docker-compose) - this watches trips to ensure that notifications are sent based on real-time data.\n* Web server (todserver in docker-compose) - this schedules trips and returns search results to the client\n\nThese can be started by calling:\n```bash\ndocker-compose build \u0026\u0026 docker-compose up\n```\nfrom the base directory. A Google Maps Directions API key as well as push\nnotification configuration is required, see the\n[Configuration section](#configuration) below.\n\n### Configuration\nBefore calling `docker-compose up` you will need to enter API keys into the\n`command` keys for each docker container in the docker-compose file. Like so:\n\n```yaml\n  todserver:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    ports: [\"80:80\"]\n    links: ['postgres']\n    command: todserver XXXXXXXXXXXXXXXXX\n\n  tripwatcher:\n    build:\n      context: .\n      dockerfile: tripwatcher/Dockerfile\n    links: ['postgres']\n    command: tripwatcher XXXXXXXXXXXXXXXXX\n```\nWhere `XXXXXXXXXXXXXXXXX` is your Google Maps Directions API key. If you don't\nhave a key see\n[Directions API](https://developers.google.com/maps/documentation/directions/)\nfor more details.\n\nYou will also need to need to set up a `config.yml` in `tripwatcher/`.\nHere you'll configure the `apikey` key from Firebase for `android` and\n`key_path` for `ios` to point to a .p12 certificate for APNS.\n\nYou may also be required to specify a topic for APNS if setting the server\nup with a production certificate. The topic will be your bundle identifier.\nThis should be set in `tripwatcher/main.go` in the `sendNotification` function.\n\n## Development\nTripwatcher works by regularly searching Google Maps for routes that match the\nuser's query, if the trip duration suddenly takes a lot longer (due to traffic,\nfor example) then the notification will be sent early. As another example, if\nthe bus is running late, the notification will be delayed accordingly.\n\n`api/routes.go` lists the basic API for routes and how the server will search\nfor them using the `RouteFinder` interface. This is currently implemented in\n`googlemaps.go` using the `GoogleMapsFinder` implementation. This is then used\nin `main.go` and in `tripwatcher/main.go` but could easily be replaced for\nanother data source.\n\n## Testing\nAll tests can be run using the command `go test ./...`\n\n## Database\nThe database is a Postgres database, this is configured via the `init.sql` file.\nAll queries and commands run to the database are in `api/postgres.go`.\n\n## TODO\nThis is a list of features or issues I'd like to work on in the future.\n* Setup APNS feedback service checks and Firebase Cloud Messaging uninstall check\n* Add in an optional warning notification ten minutes before it's time to leave\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliveroneill%2Ftodserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliveroneill%2Ftodserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliveroneill%2Ftodserver/lists"}