This guide describes how to set up a local development environment for BitRep.
The project uses FastAPI, Python 3.10+, and a modular service layout.
- Python 3.10 or newer
- pip or uv
- Git
- OpenSSL (for key generation tests)
- Optional: Docker (for containerized runs)
git clone https://github.com/bitrep-core/bitrep-attestations.git cd bitrep-attestations
python3 -m venv venv source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload
The API will be available at: http://localhost:8000
Interactive docs: http://localhost:8000/docs
pytest -q
All tests should pass (28/28).
- ruff for linting
- mypy for type checking
- CodeQL for security scanning
Run lint: ruff check .
Run type checks: mypy app/
Create a .env file if needed:
BITREP_ENV=development BITREP_LOG_LEVEL=info
app/ identity/ # key generation, verification attestations/ # signed statements, validation reputation/ # graph scoring, propagation governance/ # proposals, voting privacy/ # ZK framework (experimental) api/ # FastAPI routers core/ # shared utilities tests/ ... # full test suite
docker build -t bitrep . docker run -p 8000:8000 bitrep
- keep commits small
- include tests for new functionality
- follow FastAPI conventions
- avoid adding unnecessary dependencies
This setup provides a complete environment for developing, testing, and extending BitRep.