- Docker
- NodeJS v22+
For Tests
jq
(Installed by default on MacOS)
- Download
local.env
from BitWarden "TypeScript Mapped" item. Place it in the root of the project as.env
. - Get a database dump from the maintainer of this repo and place it in the root of the project as
ts-mapped.psql
. - Start the database with
docker compose up
- Import the database dump with
docker compose exec -u postgres -T postgres psql < ts-mapped.psql
- Install dependencies with
npm i
- Start the server with
npm run dev
- View the site at
http://localhost:3000
- Log in with username
[email protected]
and password1234
.
The SQL import includes the following:
- Data sources:
- Seed Airtable: https://airtable.com/appMdYSgvrFYZcr4k/tblSy67uoOyoeUb50/viwXlZr9qcFowFCJR?blocks=hide
- Hope Not Hate vote share CSV
- Area sets:
- Constituencies (2024)
- Census Output Areas and MSOAs (2021)
- Create with
npm run kysely migrate:make [name]
- Run with
npm run kysely migrate:latest
- The Commander library has been used to create a CLI for this project.
- Add commands to
bin/cmd.ts
. - Run commands with
npm run cmd -- [command] [...args]