The NPR visuals team's opinionated project template for client-side apps.
JavaScript CSS Python HTML
Failed to load latest commit information.
confs set deployment target in uwsgi app.ini, closes #563 Jun 17, 2015
data removing more useless stuff Mar 28, 2016
etc a few misnamed vars Mar 28, 2016
fabfile change flat to accomodate to new policy Feb 17, 2017
fontello load fontello from fontello script Mar 28, 2016
jst Backport share/discuss from civilrights. Closes #390. Jun 30, 2014
less fix paths and deployment Mar 28, 2016
logs make unicorn logs to files Mar 28, 2016
templates Merge branch 'master' into fontello Mar 28, 2016
tests Fix example tests. May 23, 2014
www fix paths and deployment Mar 28, 2016
.gitignore fix paths and deployment Mar 28, 2016
LICENSE Update LICENSE for 2014. Jan 6, 2014 update project readme date Jan 3, 2017 Simple typo Jun 1, 2015 change literally all instances of print to logging Mar 28, 2016 remove http references to allow for full https support Nov 21, 2016
crontab Parametize crontab. Closes #511. Jan 2, 2015 test for api credentials and provide a friendly message if they're mi… Apr 10, 2015
package.json load fontello from fontello script Mar 28, 2016 change literally all instances of print to logging Mar 28, 2016 Merge branch 'master' into fontello Mar 28, 2016
requirements.txt update fabric, closes #593 Oct 6, 2016 Experimental fabcasting support. #202. Aug 12, 2013 Standardizing flask rendering pipeline. Nov 10, 2014

nprviz's Project Template

About this template

This template provides a a project skeleton suitable for NPR projects that are designed to be served as flat files. Facilities are provided for rendering html from data, compiling LESS into CSS, deploying to S3, installing cron jobs on servers, copy-editing via Google Spreadsheets and a whole bunch of other stuff.

This codebase is licensed under the MIT open source license. See the LICENSE file for the complete license.

Please note: logos, fonts and other media referenced via url from this template are not covered by this license. Do not republish NPR media assets without written permission. Open source libraries in this repository are redistributed for convenience and are each governed by their own license.

Also note: Though open source, This project is not intended to be a generic solution. We strongly encourage those who love the app-template to use it as a basis for their own project template. We have no plans to remove NPR-specific code from this project.

If you want to setup a version of the app template for yourself, read this blog post about how to do so.


The following things are assumed to be true in this documentation.

  • You are running OSX.
  • You are using Python 2.7. (Probably the version that came with OSX.)
  • You have virtualenv and virtualenvwrapper installed and working.
  • You have NPR's AWS credentials stored as environment variables locally.

For more details on the technology stack used with the app-template, see our development environment blog post.

Copy the template

Create a new repository on Github. Everywhere you see $NEW_PROJECT_NAME in the following script, replace it with the name of the repository you just created.


mkvirtualenv $NEW_PROJECT_NAME
pip install -r requirements.txt
npm install

fab bootstrap

This will setup the new repo and will replace (this file) with See that file for usage documentation.

By default bootstrap will use nprapps as the Github username, and the current directory name as the repository name. This is a best practice, but you can override these defaults if you need to:


Problems installing requirements? You may need to run the pip command as ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install -r requirements.txt to work around an issue with OSX.

Bootstrap issues

The app-template can automatically setup your Github repo with our default labels and tickets by running fab issues.bootstrap. You will be prompted for your Github username and password.