ward-wise / ward-wise-front-end

6 stars 4 forks source link

Ward Wise Frontend

Ward Wise is a tool to help residents track, compare, and understand local municipal spending in Chicago, and get more involved in the aldermanic menu process. The site is live at WardWiseChicago.org.

Setup

  1. Clone/Fork the repo and install dependencies (npm install)

  2. Install PostgreSQL, if you do not already have an instance installed.

  3. Run createdb wardwise in your terminal.

    Note: If PostgreSQL was not added to your system PATH during installation, you'll need to be in the PostgreSQL bin directory for this command to work.

  4. Create a .env.local file in your project directory and add the below, where USERNAME and PASSWORD are the credential for:

    • your system user
    • the user authorized to run Postgres on your machine, or
    • the postgres admin account setup during installation
      DATABASE_URL="postgresql://USERNAME:PASSWORD@localhost:5432/wardwise?schema=public"
  5. Run npm run migrate:dev to create tables and seed your database. If the seeding does not happen automatically, run npm run db:seed.

  6. Run npm run dev to start a development server (located at http://localhost:3000 by default)

For additional database management scripts, see package.json

Google Analytics Setup

In the .env.local file, add a line with the following information:

NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="G-#####"

The Google Analytics ID is obtained by setting the site up in Google Analytics.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!