Octant is a community-driven platform for experiments in decentralized governance.
Developed by the Golem Foundation to test various hypotheses around user control, voter engagement, and community funding, the platform allows for running various governance experiments in a real-life environment and rewards user participation with ETH.
Documentation is available here.
The backend is built using FastAPI with the following key components:
- FastAPI Application: Main application handling HTTP and WebSocket requests
- SocketIO: Real-time communication support with optional Redis backend
- SQLAlchemy: Database operations and models
- APScheduler: Background task processing (used practially only on non-production environments to automate the epoch transitions)
The application has been fully migrated from Flask to FastAPI. The old Flask implementation is kept under the /flask
endpoint as a safety measure for the next allocation window, but all new development is done in FastAPI.
- Async/await patterns throughout the codebase
- WebSocket support for real-time updates
- Background task processing
- Comprehensive testing suite
- Redis-based SocketIO manager (optional)
- Python 3.8+
- Docker and Docker Compose
- Node.js and Yarn
- gcloud CLI (for Docker image authentication)
- Build the anvil container (requires gcloud authentication or local build):
yarn localenv:build-anvil
- Build the development images:
yarn localenv:build-images
- Start the development environment:
yarn localenv:up
- Stop the environment:
yarn localenv:down
The local environment will be available at:
Add the following to your hosts file (/etc/hosts
or C:\Windows\system32\drivers\etc\hosts
):
127.0.0.1 octant.localhost
127.0.0.1 rpc.octant.localhost
127.0.0.1 graph.octant.localhost
127.0.0.1 backend.octant.localhost
127.0.0.1 client.octant.localhost
- Navigate to the client directory:
cd client
- Copy the environment template:
cp .env.localenv-template .env
- Start the development server:
yarn dev
The client will be available at http://octant.localhost:5173
The project includes comprehensive test coverage:
- Unit tests in
/tests/v2
- E2E API tests in
/tests/api_e2e
- Test utilities and factories
Run tests using:
pytest
Configure Docker to use gcloud authentication:
gcloud auth configure-docker europe-docker.pkg.dev
If you don't have access to the Golem Foundation image repository, build the anvil image locally:
git clone https://github.com/golemfoundation/foundry.git --branch=foundry-4129/trace-filter-support --single-branch
cd foundry
docker build -t europe-docker.pkg.dev/wildland-dev/octant-test/foundry:latest .
In order to be able to contribute to any Wildland repository, you will need to agree to the terms of the Wildland Contributor Agreement. By contributing to any such repository, you agree that your contributions will be licensed under the GPLv3 License.