halfstaff icon indicating copy to clipboard operation
halfstaff copied to clipboard

:us: Is the US flag at half-staff?

:us: Half Staff

Is the flag at half staff? Half Staff displays the current US flag status in a clean, simple format and allows for browsing past flag notices.

Build Status Dependency Status Code Climate Issue Count MIT licensed

Table of Contents

  • Architecture
  • Requirements
  • Usage
  • Contributing
  • License

Architecture

Half Staff scrapes the contents of Presidential Proclamations looking for presidential orders to fly the American flag at half-staff. Those proclamations are then processed to understand duration and details surrounding the flag lowering, and all the information is saved a PostgreSQL database. Ruby on Rails manages the background processing and builds the pages, hosted on Heroku. CloudFlare operates as a CDN and provides SSL for the final site.

Additionally, users can elect to receive SMS notifications when the flag is lowered. Twilio provides the SMS gateway and is used as the login mechanism, and Stripe is used for payment processing.

The website is automatically tested with Travis CI on any changes, deploying automatically if tests pass.

Requirements

Half Staff requires the following to run:

  • Ruby 2.3+

Usage

First, install the dependencies:

bundle install

Next, initialize the database:

rake db:create db:migrate

Next, fetch the most recent presidential proclamations:

rake halfstaff:pull_notices

Next, run the development server

rails server

Visit the application at http://localhost:3000.

Contributing

Your contributions are welcome! Feel free to open an issue or pull request.

License

Half Staff is licensed under the MIT license.
Copyright © 2016-2017, Jacob Gillespie