A relational organizing tool developed for Ed Markey's 2020 senate re-elect. Read more about the relational organizing strategy Team Markey employed.
In The Wild!!
Requires Docker.
$ cp .env.example .env
$ make start
App is available at localhost:5000
.
You can also run make unit-test-api
to run the API test suite.
Friendbank can run anywhere that supports Docker containers, for the Markey campaign we used Heroku for it's simplicity, but all major cloud providers should have no issues hosting Friendbank.
Once you've confirmed the deployment of your app, it will not successfully launch until you include your hostname.
You may edit the campaignResult.domains
array and include your hostname: src/api/db/seed.js#L309
You must then seed the production database
$ MONGODB_URL=mongodb+srv://<...> npm run seed`
with your hostname and any other customizations changes ind the seed.js file.
Friendbank requires a MongoDB deployment, we recommend MongoDB Atlas, along with a SendGrid account for transactional email, and an AWS account with an S3 bucket to host images.
Note on Heroku deployment:
By default, Heroku does not detect a Docker stack. Run heroku stack:set container
in the Heroku CLI and re-deploy the application.
Note on Sengrid:
For setting up the dynamic email templates, I've copied the two templates we used on the Markey campaign.
Note on production environment variables:
When deploying Friendbank, if your campaign does not use the Blue State Digital Tools, ignore the BSD_
environment variables and set DEBUG_CRM_SIGNUP=true
.
To customize the default copy or photo options, edit src/api/db/seed.js
and seed the database (make seed
). User accounts with admin permission can also edit copy from within the tool.
To edit the overall site branding,
# Colors, fonts, etc
src/frontend/theme.js
# Campaign Logo
src/frontend/components/Nav.js
# Images, select options, web copy
src/api/db/seed.js
# A few more spots of web copy
src/frontend/components/FormFields.js
src/frontend/utils/getCopy.js