All Projects → dmuth → IsSeptaFcked

dmuth / IsSeptaFcked

Licence: other
Real-time status for Philadelphia Regional Rail

Programming Languages

javascript
184084 projects - #8 most used programming language
Pug
443 projects
CSS
56736 projects
shell
77523 projects
Dockerfile
14818 projects
HTML
75241 projects

Projects that are alternatives of or similar to IsSeptaFcked

django-s3file
A lightweight file upload input for Django and Amazon S3
Stars: ✭ 66 (+40.43%)
Mutual labels:  heroku
Deployment to heroku django
This is just a way of deploying to heroku with a django framework application.I hope i would be of help.
Stars: ✭ 30 (-36.17%)
Mutual labels:  heroku
representable
We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.
Stars: ✭ 14 (-70.21%)
Mutual labels:  heroku
laravel5-heroku
Laravel 5 with best practices for deployment on Heroku - created by
Stars: ✭ 18 (-61.7%)
Mutual labels:  heroku
renfe-cli
python CLI for fast Spanish Renfe timetables retrieval - now with selenium
Stars: ✭ 29 (-38.3%)
Mutual labels:  trains
NadekoBot
This is fork of the original NadekoBot, the general purpose of this fork is to make it work on Heroku cloud. Microsoft Sql Server and PostgreSQL edition.
Stars: ✭ 17 (-63.83%)
Mutual labels:  heroku
nodejs-ns-api
Unofficial NodeJS module for Nederlandse Spoorwegen API
Stars: ✭ 13 (-72.34%)
Mutual labels:  trains
telegram-bot-tutorial
Telegram bot tutorial using python and flask
Stars: ✭ 44 (-6.38%)
Mutual labels:  heroku
heroku-stack-container-repo
After deploying this repo your Heroku app will have stack as container. After that you just have to deploy your own original app.
Stars: ✭ 43 (-8.51%)
Mutual labels:  heroku
sinatras-skeleton
Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL
Stars: ✭ 13 (-72.34%)
Mutual labels:  heroku
htui
Heroku Terminal User Interface
Stars: ✭ 109 (+131.91%)
Mutual labels:  heroku
yt-heroku-demo
Code and instructions used in my YouTube video on how to deploy Spring Boot applications on Heroku
Stars: ✭ 21 (-55.32%)
Mutual labels:  heroku
quirrel.dev
Quirrel Landing Page & Console
Stars: ✭ 41 (-12.77%)
Mutual labels:  heroku
salesforce-iam-flows
Node.js application that implements some of the most common SAML and OAuth flows in Salesforce.
Stars: ✭ 31 (-34.04%)
Mutual labels:  heroku
pack-images
Recipies for building Heroku's Cloud Native Buildpacks builder images
Stars: ✭ 32 (-31.91%)
Mutual labels:  heroku
nasulog
ポエム投稿サービス
Stars: ✭ 24 (-48.94%)
Mutual labels:  heroku
trashed
Trashed is an organizational tool designed to help users keep their communities clean.
Stars: ✭ 13 (-72.34%)
Mutual labels:  heroku
telemirror
Telegram forwarder from channels via Telegram Client API (telethon)
Stars: ✭ 66 (+40.43%)
Mutual labels:  heroku
Tasks
Simple tasks & notes manager written in PHP, jQuery and Bootstrap using a custom flat file database.
Stars: ✭ 102 (+117.02%)
Mutual labels:  heroku
Discord-Study-Bot
Discord-Study-Bot is a Study-Time-based leaderboard system in discord servers. This features an Overall leaderboard and leaderboards based on a Daily, Weekly, and Monthly basis.
Stars: ✭ 20 (-57.45%)
Mutual labels:  heroku

What is this?

This is the code repository for the site www.isSeptaFcked.com. Or, if you are a regular commuter on SEPTA: www.isSeptaFucked.com.

Screenshot:

Why the profanity?

This, and many more questions are answered in the FAQ: http://www.isseptafucked.com/faq

How does it work?

Once every minute, it makes an API request for SEPTA's Regional Rail trains.
It then esitmates "fuckedness" as follows:

  • All trains < 10 minutes late: Not Fucked
  • 1 or more trains >= 10 minutes late and < 30 minutes late: A Little Fucked
  • 1 or more trains >= 30 minutes late: Fucked

If you have any questions, feel free to reach out to me. I can be reached here on GitHub or through the many social networks I am on: http://www.dmuth.org/contact

Media Coverage

Awards

Never thought I would win an award for profanity, Yet here we are. IsSeptaFucked won the "Best Side Prject" award in the NET/WORK Philly 2017 awards.

Architecture Overview

For fellow nerds out there, here's a brief rundown on how the various node.js modules are laid out:

  • views/ - Jade templates for public facing pages.
  • public/ - CSS and the site's robots.txt
  • node_modules/ - Modules installed with npm. One school of thought says I should just rely on the site's install.js file. But I always felt that a "git clone" operation should provide a complete working copy of the software. I may revise this decision when that directory gets sufficently large. ;-)
  • lib/logger.js - Handles custom logging in Express. Heroku uses proxies, and I would like to log the IP that incoming requests are forwarded for.
    • lib/septa/rr/api.js - Module that actually connects to SEPTA's Regional Rail API, and translates their data into something we can actually use.
    • lib/septa/rr/main.js - The main function in here is called at Express boot time, and it is responsible for calling SEPTA's API once a minute. It is also responsible for determing the level of "fuckedness" of Regional Rail.
    • lib/septa/rr/text.js - Create messages based on the lateness data.
    • lib/septa/bus/api.js - Module that actually connects to SEPTA's bus API, and translates their data into something we can actually use.
    • lib/septa/bus/main.js - The main function in here is called at Express boot time, and it is responsible for calling SEPTA's bus API once every 5 minutes. It is also responsible for determing the level of "fuckedness" of Regional Rail.
    • lib/septa/bus/text.js - Create messages based on the lateness data.
  • lib/sfw.js - Makes the determination if we are running under the SFW domain, and does filtering of strings.
  • routes/ - Each file in here corresponds to the same named URI, and handles requests to that URI.

Development

In Docker Compose

In Docker

  • docker build -t septa . && docker run -e TZ=EST5EDT -p 5000:5000 -it -v $(pwd):/mnt septa
  • http://localhost:5000/

In bash in Docker

  • docker build -t septa . && docker run -e TZ=EST5EDT -p 5000:5000 -it -v $(pwd):/mnt septa bash
    • You now have a shell in the Docker container. You can run npm start or any other command there.
  • Run npm start to spin up the webserver on port 5000.
  • http://localhost:5000/

The Manual Way (Y Tho)

Testing

At some point I'd like to have unit testing, but because the functionality of the website is relatively limited, at the current time it's quicker to uncomment sections of the code that have the string // Debug in order to change behavior of the site for texting purposes. Debug code can be found in these files:

  • lib/septa/rr/main.js
  • lib/septa/rr/api.js
  • lib/septa/rr/text.js
  • lib/septa/bus/main.js
  • lib/septa/bus/api.js
  • lib/septa/bus/text.js

Deployment in Heroku

  • brew tap heroku/brew && brew install heroku
    • Install the Heroku CLI
  • heroku login
    • Log in to Heroku
  • heroku git:remote -a isseptafcked
    • Add the remote for Heroku's Git repo as heroku
  • git remote -v
    • Verify that a remote called heroku exists
  • git push heroku
    • Push the changes out to Heroku

TODO

  • Express 4
  • Proper testing
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].