sunlightlabs/the-phantom-mask

Name: the-phantom-mask

Owner: Sunlight Labs

Description: Lightweight web app to courier email messages to phantom-of-the-capitol using postmark.

Created: 2015-03-24 22:01:56.0

Updated: 2017-03-13 02:06:13.0

Pushed: 2016-02-20 01:11:35.0

Homepage: null

Size: 17106

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

The Phantom Mask

Lightweight Flask web app to courier email messages via Postmark to be processed by an instance of Phantom of the Capitol.

Installation and Setup

This project is still a work in progress so the README will be updated as it finalizes. In the meantime, you can get a working development environment set up by doing the following.

App Setup
  1. Clone the project
  2. Create a virtul environment for Python 2.7.8
  3. pip install -r requirements.txt
  4. mv config/settings.py.example config/settings.py YOU WILL NEED TO CONFIG THIS
  5. Set values for API keys, url for your instance of Phantom of the Capitol, etc in config/settings.py
  6. python tasks/admin.py setup_test_environment to create initial schema for database & create test data
  7. python run.py to run app locally for development.
  8. Check out bin/deploy.sh and fabfile.py for deploying to a production environment.
Gulp

We use Gulp to build our static assets. To set this up:

  1. Run npm install to install package dependencies. If npm isn't installed, follow these instructions to do so.
  2. Run npm install -g gulp for the gulp command line client if Gulp isn't installed.
Development
  1. Run python run.py to run app locally for development.
  2. Run gulp watch to watch Sass and Javascript files for changes and compile them on the fly.

You will also need to do the following to fully set up the project:
PHANTOM OF THE CAPITOL SERVER SETUP
  1. Follow instructions on https://github.com/EFForg/phantom-of-the-capitol
  2. Point to your instance in the PHANTOM_API_BASE variable in config/settings.py
POSTMARK SETUP
  1. Create a postmark account and obtain credits.
  2. Forward your inbound emails to postmark.
  3. Add webhook to process outbound emails to the /postmark/inbound endpoint found in app/urls.py
REDIS SETUP
  1. Install redis (http://redis.io/ or brew install redis, sudo apt-get install redis-server)
  2. Run the redis server with $ redis-server

Helpful Commands
License

Code released under the MIT license. Design released under Creative Commons.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.