Political Campaign Software focused on voter outreach and volunteer management.
To build everything, run turbo build.
For full watch-mode, run pnpm run watcher in the root, and pnpm run start in grassroots-backend and grassroots-frontend.
Install:
- Docker Desktop installed and running
- Git (for cloning the repository)
We're running things in Docker. We can develop our code in a running Docker container to keep the development environment consistent regardless of your OS. A simple, cross-platform development workflow might be:
In the newly created file .env.development.local, fill in the values for
GOOGLE_CLIENT_ID = FILL_IN
GOOGLE_CLIENT_SECRET = FILL_IN
Add your ngrok auth token to docker/ngrok/traffic-policy.yml if you want to test twilio integration.
Add the line
127.0.0.1 grassroots.org
to your hosts file, /etc/hosts, assuming you're developing on the machine you're browsing from.
If you're on Windows, open Notepad as Administrator, then open
C:\Windows\System32\drivers\etc\hosts and add:
127.0.0.1 grassroots.org
cd docker
docker compose up5. In another terminal, set up and run the frontend application in your now running grassroots_dev Docker container
cd docker
docker compose exec grassroots_dev bash
cd grassroots-frontend
pnpm run start6. In another terminal, set up and run the backend application in the same grassroots_dev Docker container
cd docker
docker compose exec grassroots_dev bash
cd grassroots-backend
pnpm exec mikro-orm-esm migration:up
pnpm run startdocker compose cp caddy:/data/caddy/pki/authorities/local/root.crt $LOCAL_PATH
You can then install in your OS (at least on Mac it's a double click). However, most browsers have their own cert management.
On Chrome, you can add the cert via chrome://certificate-manager/.
- Frontend: https://grassroots.org
- Backend API: https://grassroots.org/api
To migrate:
pnpm exec mikro-orm-esm migration:upTo create a migration to the current Entity schemas.
pnpm exec mikro-orm-esm migration:create- Add your ngrok auth token to
docker/ngrok/traffic-policy.yml - Explicitly start the ngrok container with
docker up ngrok. - Visit localhost:4040, and copy the URL presented there into .env.development.local's WEBHOOK_HOST