Skip to content

civic-dashboard/civic-dashboard-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Civic Dashboard Web App

This repository hosts the in-progress Civic Dashboard Web App! This page focuses on giving users an easy way to identify upcoming civic engagement opportunities in Toronto, and how they can take action on those opportunities. The currently deployed version can be found at civicdashboard.ca.

Quick links

Take a look at the following documentation files to get a better lay of the land, or skip to Getting started if you just want to clone the repo and start exploring!

Getting started

To get started with local development, you'll need to take the following steps:

Required tools

You will need the following installed on your system:

Clone the repo

git clone https://github.com/civic-dashboard/civic-dashboard-web
cd civic-dashboard-web
npm install

Initialize your environment files

cat >> .env  << EOF
DATABASE_URL=postgresql://postgres:postgres@localhost:54320/civic_dashboard
HOSTNAME_FOR_EMAIL_LINKS=http://localhost:3000
RESEND_API_KEY=not-needed-for-local-dev
EOF

Initialize the database

npm run docker:start
npm run db:run-migrations

Load a small amount of data to populate the database

This will download Agenda Item Considerations from the last month up until a month from now and save it into your local PostgreSQL

npm run tsxe src/scripts/updateDatabase.ts

This will download all available Votes and Councillors and save into your local database.

npm run tsxe src/scripts/repopulateRawContactsAndVotes.ts

Run the app

npm run dev

Try editing src/app/page.tsx to see your changes live! They should be visible on http://localhost:3000

Emails

We use maildev to preview emails in development. After starting your docker containers, navigate to http://localhost:1080 in your browser. All emails that are sent from the app in development mode will show up in this inbox!

Note that links in emails will by default link to https://civicdashboard.ca, rather than your local dev server. HOSTNAME_FOR_EMAIL_LINKS in your environment file is where you can change this.

About

Making Toronto's democracy more accessible.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Languages