Skip to content
Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time



Head to to learn more about what we're building and how to get involved.

Official website for Origin Protocol

This is a Flask app with the source code for The code is all Python 3.9.2 with Postgres for the database (basically just for the mailing list). The database is not required to be configured if you're just working on the website.



git clone

Setup and activate a Python virtualenv

python3 -m venv origin-website/venv
source origin-website/venv/bin/activate


pip install -e .[dev]

Rename the file sample.env to .env, and update env variables as desired.

mv sample.env .env

Run it!


Open browser to view


Problems? Hit us up in the #engineering channel on Discord if you need help.

Run the Tests

Throughout the development process and before committing or deploying, run:


Run individual test files simply as:

pytest path/to/

Run a single test case, or an individual test, using:

pytest path/to/

Running locally with Celery

We use Celery for running background tasks (mostly just sending emails). To get this working on your local machine, you'll want to make sure:

  • Your .env has CELERY_DEBUG: False
  • Redis is installed and running: redis-server
  • An active Celery worker is running: celery -A util.tasks worker --loglevel=INFO

Celery Flower is useful for monitoring tasks: flower -A util.tasks --port=5555

Running locally with Docker Compose

You can run the website in combination with a local PostgreSQL, Redis and Celery using Docker Compose.

Remove the .[deploy] at the end of the requirements.txt

cd origin-website
docker-compose up

Note: you can login to the container running the app with the following command:

docker exec -ti origin-website /bin/bash

Running cron jobs locally

Some scripts use Heroku cron jobs. Use the following command to test them locally

PYTHONPATH=$(pwd) PROJECTPATH=$(pwd) python ./logic/scripts/

When running on docker, a container named crontainer will run these scripts every 5 minutes. If you want to run them manually:

docker exec -it -e PYTHONPATH=/app -e PROJECTPATH=/app origin-website python ./logic/scripts/

Running cron jobs on Production/Staging

Running token_stats on Staging:

heroku run -a staging-originprotocol-com PROJECTPATH=/app python ./logic/scripts/

Running token_stats on Production:

heroku run -a originprotocol-com PROJECTPATH=/app python ./logic/scripts/

System Requirements

  • Docker version 18 or greater: docker --version
  • Docker Compose For Mac and Windows docker-compose should be part of desktop Docker installs: docker-compose --version
  • Git: git --version
  • Unix-based system (OSX or Linux) needed to run the bash scripts

Getting Started

  1. Clone the repository

git clone && cd origin-website

  1. From the root of the repository run docker-compose up. The first time this command runs it will take some time to complete due to the initial building of the containers.

When this completes you should be able to access the website at http://localhost:5000.


See translations directory.

Database changes

We use Flask Migrate to handle database revisions. If you make changes to the database, use flask db migrate to generate the required migration file and then flask db upgrade to implement and test your changes on your local database before committing.

Heroku Deploy

To deploy a development copy of the site on Heroku, just choose which branch you would like to use and follow the instructions:

stable branch
master branch
(active development)
Deploy Deploy

Heroku will prompt you to set config variables. At a minium, you must set these two:

Config Value
FLASK_SECRET_KEY (make something up)
HOST (domain name of your dev heroku app)

See sample.env for a full list of other optional config variables. You can get Recaptcha keys from Google.

We use both the python and the nginx buildpacks:

heroku buildpacks:set heroku/python
heroku buildpacks:add

Deployment Dependencies

To update the deployment dependencies, update reuirements.txt. To use the deps from your local env, you can run the freeze script in the root directory:


This will include any installed deps, and the deps defined in deploy in extras_require.

Connect to Heroku instance

In order to run Celery jobs manually you can ssh into Heroku staging with: heroku ps:exec --app staging-originprotocol-com

or into Heroku production heroku ps:exec --app originprotocol-com


We'd love to have you join us and contribute to this project. Please join our #engineering channel on Discord and read our guidelines on contributing to get started.


Special thanks to the following companies for their support: