Sign up, create API keys, and call the hosted compress endpoint with usage tracking.
Live: supercompress.dev/dashboard
pip install -e ".[serve]"
SC_AUTH_DEV=1 SC_KEY_STORE=memory python scripts/local_web_server.pyOpen http://127.0.0.1:8790/dashboard. Dev mode accepts any email — no Firebase required.
- Create a Firebase project
- Enable Authentication → Email/Password and Google
- Create a Firestore database
- Generate a service account JSON → set
GOOGLE_APPLICATION_CREDENTIALS - Add supercompress.dev to Firebase Auth → Settings → Authorized domains
- Copy web app config into env vars (see
scripts/generate-firebase-config.js)
Deploy Firestore rules:
firebase deploy --only firestore:rulespip install -e ".[serve,firebase]"
SC_KEY_STORE=firestore python scripts/local_web_server.pyFor production, the live site ships serverless API routes on Vercel (/api/health, /api/keys, /api/v1/compress) with keys stored in Vercel Blob. No separate deploy step when using the main Vercel project.
Optional self-host (Python FastAPI)
fly apps create supercompress-api
fly volumes create sc_data --size 1 --region sjc -a supercompress-api
fly deployDocker (local / other hosts)
docker build -t supercompress-api .
docker run -p 8790:8790 -e SC_AUTH_DEV=1 -e SC_KEY_STORE=file -v sc-data:/data supercompress-apiRender — use the included render.yaml blueprint (Docker + persistent disk for keys).
Set SC_API_BASE in firebase-config.js only if the dashboard and API are on different origins. On the live Vercel site, leave it empty ("") so the dashboard hits the same origin.
| URL | Description |
|---|---|
/dashboard |
Sign up / sign in, manage keys, view usage |
| Docs link | docs/API.md |
- Create — name your key; full secret shown once (
sc_live_…) - Rename — update display name
- Revoke — permanently disable a key
- Usage — requests, tokens in/out, tokens saved per key
| Method | Path | Description |
|---|---|---|
| GET | /api/me |
Current user |
| GET | /api/keys |
List keys + usage summary |
| POST | /api/keys |
Create key { "name": "Production" } |
| PATCH | /api/keys/{id} |
Rename { "name": "New name" } |
| DELETE | /api/keys/{id} |
Revoke key |
| GET | /api/keys/{id}/usage |
Usage for one key |
Header: Authorization: Bearer <firebase_id_token>
POST /v1/compress
X-API-Key: sc_live_xxxxxxxx
Content-Type: application/json
{
"context": "long document…",
"query": "Summarize this context.",
"budget_ratio": 0.35
}Or: Authorization: Bearer sc_live_…
Response includes compressed_text, token counts, and savings metrics. Usage is recorded automatically.
POST /api/compress remains unauthenticated for the browser demo and local testing.
| Variable | Default | Description |
|---|---|---|
SC_AUTH_DEV |
off | Accept dev:uid:email tokens |
SC_KEY_STORE |
auto |
memory, firestore, or auto |
SC_KEY_STORE_FILE |
— | JSON file persistence (dev) |
GOOGLE_APPLICATION_CREDENTIALS |
— | Firebase service account path |
- Full API keys are never stored — only SHA-256 hashes
- Firestore is server-side only; clients use FastAPI + Firebase Auth
- Revoked keys are removed from the lookup index immediately