Skip to content

hackforla/brigade-project-index-statusboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Brigade Project Index Statusboard and API

This repo contains two things:

  1. A statusboard web app to display ongoing realtime information about Brigade projects
  2. An api to download data from the brigade-project-index and expose it via JSON API

The statusboard is running in production at https://projects.brigade.network and the API is accessible at https://statusboard.brigade.cloud.

The Project Index Working Group has bi-weekly video meetings and can be found in the Code for America #brigade-project-index Slack channel.

Running the Statusboard locally

The Statusboard is a Create-React-App, and supports their built-in commands, including yarn test and yarn build.

You can install the app and run it with,

cd statusboard
yarn install
yarn start

By default, the front-end will look for a local copy of the backend API for the React app to load data from, but you don't have to run the API locally. You can instead tell your local React app to use the online production API with an environment variable like this:

REACT_APP_API_URL=https://statusboard.brigade.cloud

or by using

yarn start-remote-api

instead of yarn start.

Running the API locally

If you choose to run the API locally (the default behaviour), you will need to use an older version of Node; install NVM and run:

cd api
nvm install 12
nvm use 12
yarn install
yarn start

Currently, the server fetches a new copy of the project index from Github every time (very expensive). If redis is running locally on port 6379, the API will use this to cache the results. We recommend installing and running Redis via Docker:

docker run --publish 6379:6379 redis:alpine

Other commands

npm run update-cache

This builds both the projectIndex cache and tags cache (data.json and tags.json respectively), and in deployment is run on a scheduler every 10 min.

To run the test suite, run:

yarn test

To access the server, use:

curl http://localhost:8080/api/data.json