{"id":27334929,"url":"https://github.com/dmuth/isseptafcked","last_synced_at":"2025-04-12T14:46:40.088Z","repository":{"id":4441851,"uuid":"5580177","full_name":"dmuth/IsSeptaFcked","owner":"dmuth","description":"Real-time status for Philadelphia Regional Rail","archived":false,"fork":false,"pushed_at":"2024-03-28T02:05:01.000Z","size":1033,"stargazers_count":53,"open_issues_count":5,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-02T06:07:35.694Z","etag":null,"topics":["docker","heroku","javascript","philadelphia","profanity","regional-rail","septa","sfw","trains"],"latest_commit_sha":null,"homepage":"http://www.IsSeptaFucked.com/","language":"JavaScript","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/dmuth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"dmuth"}},"created_at":"2012-08-28T03:10:32.000Z","updated_at":"2024-03-10T05:27:38.000Z","dependencies_parsed_at":"2023-01-11T16:35:56.131Z","dependency_job_id":null,"html_url":"https://github.com/dmuth/IsSeptaFcked","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/dmuth%2FIsSeptaFcked","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2FIsSeptaFcked/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2FIsSeptaFcked/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2FIsSeptaFcked/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmuth","download_url":"https://codeload.github.com/dmuth/IsSeptaFcked/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248585249,"owners_count":21128974,"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":["docker","heroku","javascript","philadelphia","profanity","regional-rail","septa","sfw","trains"],"created_at":"2025-04-12T14:46:39.425Z","updated_at":"2025-04-12T14:46:40.080Z","avatar_url":"https://github.com/dmuth.png","language":"JavaScript","funding_links":["https://github.com/sponsors/dmuth"],"categories":[],"sub_categories":[],"readme":"\n# What is this?\n\nThis is the code repository for the site \u003ca href=\"http://www.isSeptaFcked.com/\"\u003ewww.isSeptaFcked.com\u003c/a\u003e.  Or, if you \nare a regular commuter on SEPTA: \u003ca href=\"https://www.isSeptaFucked.com/\"\u003ewww.isSeptaFucked.com\u003c/a\u003e.\n\nScreenshot:\n\u003cimg src=\"https://raw.githubusercontent.com/dmuth/IsSeptaFcked/master/img/septa.png\" /\u003e\n\n\n# Why the profanity?\n\nThis, and many more questions are answered in the FAQ: http://www.isseptafucked.com/faq\n\n\n# How does it work?\n\nOnce every minute, it makes an API request for SEPTA's Regional Rail trains.  \n\tIt then esitmates \"fuckedness\" as follows:\n\n- All trains \u003c 10 minutes late: Not Fucked\n- 1 or more trains \u003e= 10 minutes late and \u003c 30 minutes late: A Little Fucked\n- 1 or more trains \u003e= 30 minutes late: Fucked\n\n\nIf you have any questions, feel free to reach out to me. I can be reached \nhere on GitHub or through the many social networks I am on: http://www.dmuth.org/contact\n\n\n# Media Coverage\n\n- \u003ca href=\"http://www.phillymag.com/news/2012/09/26/web-app-tells-septa-f%ED/\"\u003eNew Web App Tells You When SEPTA Is F#$%ed\u003c/a\u003e\n- \u003ca href=\"http://technical.ly/philly/2016/07/06/is-septa-fucked-douglas-muth/\"\u003eNow more timely than ever: Is SEPTA F*cked?\u003c/a\u003e\n- \u003ca href=\"https://technical.ly/philly/2018/11/16/septa-regional-rail-turbo-fcked/\"\u003eThat snow storm sent SEPTA trains to new ‘Turbo F*cked’ status\u003c/a\u003e\n- \u003ca href=\"https://technical.ly/philly/2019/09/29/evolution-doug-muth-irreverent-is-septa-fucked-delay-tracker/\"\u003eThe evolution of Doug Muth’s irreverent SEPTA delay tracker\u003c/a\u003e\n\n\n# Awards\n\nNever thought I would win an award for profanity, Yet here we are.  IsSeptaFucked \u003ca href=\"http://technical.ly/philly/2017/02/08/network-awards-winners/\"\u003ewon the \"Best Side Prject\" award\u003c/a\u003e in the NET/WORK Philly 2017 awards.  \n\n\n# Architecture Overview\n\nFor fellow nerds out there, here's a brief rundown on how the various \n\tnode.js modules are laid out:\n\n- `views/` - Jade templates for public facing pages.\n- `public/` - CSS and the site's robots.txt\n- `node_modules/` - Modules installed with npm.  One school of thought says \n\tI should just rely on the site's install.js file.  But I always felt \n\tthat a \"git clone\" operation should provide a complete working copy \n\tof the software.  I may revise this decision when that directory \n\tgets sufficently large. ;-)\n- `lib/logger.js` - Handles custom logging in Express.  Heroku uses proxies, \n\tand I would like to log the IP that incoming requests are forwarded for.\n\t- `lib/septa/rr/api.js` - Module that actually connects to SEPTA's Regional Rail API, and translates \n\ttheir data into something we can actually use.\n\t- `lib/septa/rr/main.js` - The main function in here is called at Express boot time,\n\tand it is responsible for calling SEPTA's API once a minute.\n\tIt is also responsible for determing the level of \"fuckedness\" of Regional Rail. \n\t- `lib/septa/rr/text.js` - Create messages based on the lateness data.\n\t- `lib/septa/bus/api.js` - Module that actually connects to SEPTA's bus API, and translates \n\ttheir data into something we can actually use.\n\t- `lib/septa/bus/main.js` - The main function in here is called at Express boot time,\n\tand it is responsible for calling SEPTA's bus API once every 5 minutes.\n\tIt is also responsible for determing the level of \"fuckedness\" of Regional Rail. \n\t- `lib/septa/bus/text.js` - Create messages based on the lateness data.\n- `lib/sfw.js` - Makes the determination if we are running under the SFW \n\tdomain, and does filtering of strings.\n- `routes/` - Each file in here corresponds to the same named URI, and handles requests to that URI.\n\n\n# Development\n\n## In Docker Compose\n\n- `docker-compose build \u0026\u0026 docker-compose up`\n- \u003ca href=\"http://localhost:5000/\"\u003ehttp://localhost:5000/\u003c/a\u003e\n\n\n## In Docker\n\n- `docker build -t septa . \u0026\u0026 docker run -e TZ=EST5EDT -p 5000:5000 -it -v $(pwd):/mnt septa`\n- \u003ca href=\"http://localhost:5000/\"\u003ehttp://localhost:5000/\u003c/a\u003e\n\n\n## In bash in Docker\n\n- `docker build -t septa . \u0026\u0026 docker run -e TZ=EST5EDT -p 5000:5000 -it -v $(pwd):/mnt septa bash`\n   - You now have a shell in the Docker container.  You can run `npm start` or any other command there.\n- Run `npm start` to spin up the webserver on port 5000.\n- \u003ca href=\"http://localhost:5000/\"\u003ehttp://localhost:5000/\u003c/a\u003e\n\n\n## The Manual Way (\u003ca href=\"https://knowyourmeme.com/memes/y-tho\"\u003eY Tho\u003c/a\u003e)\n\n- Run `npm start` to spin up the webserver on port 5000.\n- \u003ca href=\"http://localhost:5000/\"\u003ehttp://localhost:5000/\u003c/a\u003e\n\n\n# Testing\n\nAt some point I'd like to have unit testing, but because the functionality of the\nwebsite is relatively limited, at the current time it's quicker to uncomment sections\nof the code that have the string `// Debug` in order to change behavior of the site for\ntexting purposes.  Debug code can be found in these files:\n\n- `lib/septa/rr/main.js`\n- `lib/septa/rr/api.js`\n- `lib/septa/rr/text.js`\n- `lib/septa/bus/main.js`\n- `lib/septa/bus/api.js`\n- `lib/septa/bus/text.js`\n\n\n# Deployment in Fly.io\n\n- `flyctl deploy` - Deploy the app\n- `flyctl status` - Check the status of the app\n- `flyctl open` - Open the website in the browser\n- `flyctl ips list` - List IPs\n\nAdditional troubleshhoting can be found at [https://fly.io/docs/getting-started/troubleshooting/](https://fly.io/docs/getting-started/troubleshooting/).\n\n\n# Deployment in Heroku\n\n- `brew tap heroku/brew \u0026\u0026 brew install heroku`\n   - Install the Heroku CLI\n- `heroku login`\n   - Log in to Heroku\n- `heroku git:remote -a isseptafcked`\n   - Add the remote for Heroku's Git repo as `heroku`\n- `git remote -v`\n   - Verify that a remote called `heroku` exists\n- `git push heroku`\n   - Push the changes out to Heroku\n\n\n# TODO\n\n- Express 4\n- Proper testing\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fisseptafcked","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmuth%2Fisseptafcked","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fisseptafcked/lists"}