Spoke is an open source text-distribution tool for organizations to mobilize supporters and members into action. Spoke allows you to upload phone numbers, customize scripts and assign volunteers to communicate with supporters while allowing organizations to manage the process.
Spoke was created by Saikat Chakrabarti and Sheena Pakanati, and is now maintained by MoveOn.org.
Use the Heroku Button to deploy a version of Spoke suitable for testing. This won't cost any money and will not support production usage. It's a great way to practice deploying Spoke or see it in action.
NOTE: Deploying with prod infrastructure will cost $75 ($25 dyno + $50 postgres) a month and should be suitable for production level usage for most organizations.
Follow up instructions located here.
Please let us know if you deployed by filling out this form here
.nvmrc. NVM is one way to do this (from the spoke directory):
nvm install nvm use
cp .env.example .env
.env.example, but renames it
.envso the system will use it. Make sure you use this new file.
You now have a
.env file to fill out. For more details on environment variables you can change, see the environment variable reference.
There are some common environment variables you will want to adjust:
At this point, you should be ready to start your app in development mode.
yarn devto create and populate the tables.
http://localhost:3000to load the app. (Note: the terminal will say it's running on port 8090 -- don't believe it :-)
SUPPRESS_SELF_INVITE=blank in your
.envyou should be able to invite yourself from the homepage.
echo "INSERT INTO invite (hash,is_valid) VALUES ('E4502B28-301E-4E63-9A97-ACA14E8160C8', 1);" |sqlite3 mydb.sqlite # Note: When doing this with PostgreSQL, you would replace the `1` with `true`
For development, you can set
DEFAULT_SERVICE=fakeservice to skip using an SMS provider (Twilio or Nexmo) and insert the message directly into the database.
To simulate receiving a reply from a contact you can use the Send Replies utility:
http://localhost:3000/admin/1/campaigns/1/send-replies, updating the app and campaign IDs as necessary. You can also include "autorespond" in the script message text, and an automatic reply will be generated (just for
Docker is optional, but can help with a consistent development environment using postgres.
cp .env.example .envand see the "Filling out your
.envfile" section above for some possible tweaks
docker-compose up --build
CTRL+C, and data will persist next time you run
docker-compose exec postgres psql -U spoke -d spokedev -c "INSERT INTO invite (hash,is_valid) VALUES ('<your-hash>', true);"
http://localhost:3000/invite/<your-hash>. This should redirect you to the login screen. Use the "Sign Up" option to create your account.
docker-compose down, or
docker-compose down -vto completely destroy your Postgres database & Redis datastore volumes.
Getting Started with Development:
More Development documentation
There are several ways to deploy documented below. This is the 'most minimal' approach:
OUTPUT_DIR=./build yarn run prod-build-serverThis will generate something you can deploy to production in ./build and run nodejs server/server/index.js
yarn run prod-build-client
spoke-pm2.config.js, add missing environment variables, and run it with pm2, e.g.
pm2 start spoke-pm2.config.js --env production
sudo /etc/init.d/postgresql start), connect (e.g.
sudo -u postgres psql), create a user and database (e.g.
create user spoke password 'spoke'; create database spoke owner spoke;), disconnect (e.g.
\q) and add credentials to
DB_variables in spoke-pm2.config.js
Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs.
Spoke is licensed under the MIT license.