metadata
title: CC Experiment Report API
emoji: 📊
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
CC Experiment Report API
FastAPI + DuckDB read-only API over the processed experiment Parquet.
See docs/superpowers/specs/2026-06-25-report-frontend-backend-split-design.md.
Build & runtime notes
- Data is NOT in this (public) image. This Space is public so the Vercel frontend can reach the token-gated API; committing the parquet here would make it directly downloadable and bypass the gate. Instead the app pulls the parquet at startup from a private HF Dataset.
- Required Space secrets:
API_TOKEN(the shared bearer the frontend sends),HF_DATASET_REPO(e.g.your-namespace/prism-cc-data),HF_ACCESS_TOKEN(read token for that dataset), andALLOWED_ORIGINS(the Vercel origin). On boot the app downloads the dataset intoDATA_DIR. - Publishing data:
make deploy-spacefirst runsscripts/push_data.pyto uploadanalysis/data/processed/*to the private dataset (runmake analyzefirst to regenerate it), then syncs only the code into the Space. - CORS is read at startup.
ALLOWED_ORIGINSis captured when the app process starts, so changing the Space secret requires a container restart to take effect. (API_TOKENis re-read per request and does not.)