Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 3.06 KB

CONTRIBUTING.md

File metadata and controls

65 lines (46 loc) · 3.06 KB

Campaign Finance Contributing Guide

Perquisites

  • NodeJS version v12 or newer and NPM
  • Docker and Docker-Compose OR PostgreSQL
  • Make

How to Run

MacOS/Linux

  • Ensure all pre-requisites are installed
  • Download this data and unzip this file
  • Copy all the CSV files to the ./server/tmp directory
  • Run cp server/sample.env server/.env (If you do not wish to use docker, change the database url in the newly created .env file)
  • Run make first-run this will run npm install for the ui and server and setup the db using Docker. After running this once you shouldn't need to run it again. (If you are not using Docker run make first-run-no-docker)
  • Run make start this will start the UI and server running on ports 3000 and 3001 respectively. Both the UI and server will be running in watch mode, so any changes should automatically take effect. Type CTRL-c to exit
  • View the project in your browser at localhost:3000

Windows

  • Ensure all pre-requisites are installed
  • Download this data and unzip this file
  • Copy all the CSV files to the ./server/tmp directory
  • copy server/sample.env to server/.env (If you do not wish to use docker, change the database url in the newly created .env file)
  • Add your DATABASE_URL to your environment
    • Powershell: $env:DATABASE_URL = 'YOUR_DATABASE_URL'
  • Run make start this will start the UI and server running on ports 3000 and 3001 respectively. Both the UI and server will be running in watch mode, so any changes should automatically take effect. Type CTRL-c to exit
  • View the project in your browser at localhost:3000

After the initial setup, to start and stop the project just run make start and CTRL-c to exit

Tech

UI

  • React - A component based reactive UI library
  • USWDS - For designs and components (this is similar to other libraries like Bootstrap)

Backend

Project Structure

  • ./src directory contains the UI React code
  • ./server contains the backend API code

Wireframes

Wireframes are on Figma

How to contribute

  • Fork the repo
  • Create a feature branch
  • Make your changes
  • Commit and push your changes
  • Create a PR from your forked repo to the main repo