Giter Club home page Giter Club logo

hackforla / brigade-project-index-statusboard Goto Github PK

View Code? Open in Web Editor NEW
4.0 6.0 15.0 7.21 MB

A "statusboard" web app that is designed to display ongoing realtime information about each brigade's project-indexing opportunities.

Home Page: https://projects.brigade.network

License: Apache License 2.0

JavaScript 35.14% HTML 19.84% SCSS 11.40% CSS 3.56% TypeScript 30.03% Procfile 0.02%
code-for-america brigade react volunteer-opportunities hacktoberfest civic-tech civic-tech-projects-catalog civic-tech-projects-index civic-tech-index

brigade-project-index-statusboard's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.