Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 2.78 KB

CONTRIBUTING.md

File metadata and controls

61 lines (46 loc) · 2.78 KB

Contributing

Are you interested in making things better? Then by all means contribute! You can do so in a number of ways:

  • Contact GSA about regulations.gov and relate your own experience (good or bad) to the new regulations.gov site
  • Submit a feature request or a bug report on this site using GitHub Issues.
  • Create your own application on top of the regulations.gov API so we can show them what can be done.
  • Or you could contribute code to this application! Information on how to run this app locally and submit a PR are located below.

System Diagram

flowchart LR
    APP["Node App"]
    DM["Docket Model"]
    UM["User Model"]
    R["Redis Cache"]
    PG["Postgres DB"]
    API["Regulations.gov API"]
    
    subgraph UI Layer
    Views -- Incorporates --> Partials
    Views -- Loads --> Styles
    Views -- Loads --> JavaScript
    end
    
    subgraph Node Server
    APP -- implements --> Routes
    Routes -- calls --> UM
    Routes -- calls --> DM
    end
    
    subgraph Data Layer
    UM -- reads/writes --> PG
    APP -- stores user sessions --> R
    DM -- caches API data --> R
    end
    
    JavaScript -- sends requests --> APP
    DM -- calls --> API
Loading

Running Locally

This system can be run almost entirely locally. The only piece that can't be run locally is the regulations.gov API. But you can easily sign up for an API key yourself in order to hit the API. You could also create a mock API for development if you like.

Environment Setup

  1. Create an SSL certificate for localhost since Chrome/Firefox force you there. Put the decrypted key and crt in a localcert directory inside this project.
  2. Install Node.js (check the package.json file to see what version the site runs on)
  3. Install and run Postgres
  4. Create a Postgres user and database, then create the user table using the schema/user.sql file to create the table(s)
  5. Install and run Redis for session and document caching
  6. Install the dependencies with npm install
  7. Configure your environment variables by copying .env.example and renaming it to .env, then change the values to match your local environment!

Now you should be ready to run the application locally with node . (or use npm run watch to continuously watch for file changes and restart the app).

Submitting a Pull Request

Please be sure to follow the Pull Request template on GitHub. This ensures that the changes can be reviewed thoroughly and integrated!