Skip to content
/ grassroots Public

Political Campaign Software focused on voter outreach and volunteer management.

License

Notifications You must be signed in to change notification settings

gpo/grassroots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

164 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grassroots

Political Campaign Software focused on voter outreach and volunteer management.

Note on building:

Build process

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.

Recommended Development Setup

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:

1. Add auth credentials

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.

2. Update your hosts file

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

3. Start up Docker in one terminal

cd docker
docker compose up

5. 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 start

6. 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 start

7. Install the SSL certificate

docker 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/.

8. Access the running services

Migrations

To migrate:

pnpm exec mikro-orm-esm migration:up

To create a migration to the current Entity schemas.

pnpm exec mikro-orm-esm migration:create

Ngrok for twilio integration

  1. Add your ngrok auth token to docker/ngrok/traffic-policy.yml
  2. Explicitly start the ngrok container with docker up ngrok.
  3. Visit localhost:4040, and copy the URL presented there into .env.development.local's WEBHOOK_HOST

About

Political Campaign Software focused on voter outreach and volunteer management.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6