Operations
Self-hosting & deployment
DataLayer has two deployable parts:
| Part | Runtime | Hosting |
|---|---|---|
| Web (Next.js) | Node 22 | Vercel or any Node host |
| Backend (FastAPI API, indexer, warehouse builder, workers) | Python 3.12+ | A persistent server or container platform (needs a disk for the warehouse) |
Plus PostgreSQL 16 and Redis 7.
The repository's README.md and docs/deployment.md contain the full runbook: environment variables, Docker Compose, CI, backups and recovery. The short version:
cp .env.example .env # fill in secrets — never commit this file
docker compose up -d --build
Services
| Service | Command | Purpose |
|---|---|---|
api | uvicorn datalayer.api.main:app | REST API |
indexer | python -m datalayer.indexer.main | Live ingestion, reconciliation, gap repair, backfills |
warehouse | python -m datalayer.warehouse.builder | Builds and publishes DuckDB snapshots and Parquet |
workers | python -m datalayer.workers | Alerts, webhook delivery, model training and scoring |
Each service writes a heartbeat; the status page shows them.
RPC
The default public RPC endpoint works but is rate-limited. For production, set SOLANA_RPC_URL and SOLANA_WS_URL to a dedicated provider and raise SOLANA_RPC_MAX_RPS accordingly.