Appearance
Status Page
Public status page at schemastack.io/status showing real-time health of all SchemaStack services.
Data Flow
metadata-rest GET /api/status (checks all services internally)
→ CF Worker cron every 5 min (calls origin, writes to KV)
→ CF Worker GET /status (reads KV, returns JSON)
→ Website Status.tsx (fetches /status, renders)Architecture
CF Worker (schemastack-deployment)
The existing origin-proxy worker (cloudflare/worker/) handles the status pipeline:
Cron trigger (*/5 * * * *):
- Calls
${ORIGIN_HOST}/api/statuswithX-Origin-Secretheader - On success: writes response to KV as
status:current - On failure: writes fallback snapshot (metadata-rest/consumer-worker = down, others = unknown)
- Appends compact entry to
status:history(max 288 entries = 24h)
GET /status endpoint:
- Reads
status:currentandstatus:historyfrom KV - Returns JSON with
Cache-Control: public, max-age=60and CORS headers
KV Data Structure
status:current:
json
{
"timestamp": "2026-03-12T14:30:00Z",
"services": {
"metadata-rest": { "status": "operational", "latencyMs": 42 },
"consumer-worker": { "status": "operational", "latencyMs": 28 },
"processor": { "status": "operational", "latencyMs": 156 },
"workspace-api": { "status": "operational", "latencyMs": 38 },
"postgres": { "status": "operational", "latencyMs": 12 },
"rabbitmq": { "status": "operational", "latencyMs": 8 }
}
}status:history (compact, max 288 entries):
json
[
{
"t": "2026-03-12T14:30:00Z",
"s": {
"metadata-rest": "operational",
"consumer-worker": "operational",
"processor": "operational",
"workspace-api": "operational",
"postgres": "operational",
"rabbitmq": "operational"
}
}
]Worker /status Response
json
{
"current": {
/* status:current value */
},
"history": [
/* status:history value */
]
}Status values: "operational" | "degraded" | "down" | "unknown"
Free Tier Budget
- 2 KV writes per cron invocation x 288/day = 576 writes/day (limit: 1,000)
- KV reads: minimal (cached at edge for 60s)
Frontend (Status.tsx)
The component at projects/website/src/components/Status.tsx:
- Fetches
https://status.schemastack.ioon mount and every 60s - Maps
current.servicesto service cards with display names and icons (client-side mapping) - Maps
history[].s[serviceKey]to the uptime timeline bars (288 data points = 24h) - Calculates uptime percentage from history (operational count / total x 100)
- Shows loading spinner initially, "Unable to load status" on fetch errors
- When all services report
unknown, shows "Checking status..." state
Service Key Mapping
| API Key | Display Name | Group |
|---|---|---|
metadata-rest | API | Core Services |
consumer-worker | Real-time & Files | Core Services |
processor | Background Processing | Core Services |
workspace-api | Data API | Core Services |
postgres | Database (Primary) | Infrastructure |
rabbitmq | Message Queue | Infrastructure |
Backend: GET /api/status (metadata-rest)
Not yet implemented. Needs to be added to the metadata-rest service.
This endpoint runs server-side and checks all Docker-internal services:
| Service | Health Check |
|---|---|
| metadata-rest | Self (always operational) |
| consumer-worker- | http://...:8080/q/health/ready |
| processor- | http://...:8082/actuator/health |
| workspace-api- | http://...:8083/actuator/health |
| postgres | JDBC SELECT 1 on port 5432 |
| rabbitmq | http://rabbitmq:15672/api/health/checks/alarms |
Expected response format: same as the status:current KV structure above.
Blue/green logic: for services with blue/green deployments, check whichever instance is currently active. Report the active one's status.
Until this endpoint is implemented, the cron will receive a 404 and the status page will show unknown states for all services.
Deployment
One-time setup (CF Worker)
bash
cd schemastack-deployment/cloudflare/worker
# Create the KV namespace
wrangler kv namespace create STATUS_KV
# Update wrangler.toml with the returned namespace ID
# (replace PLACEHOLDER_CREATE_WITH_WRANGLER)
# Deploy
wrangler deployVerification
bash
# Trigger cron locally
wrangler dev --test-scheduled
# Test endpoint
curl http://localhost:8787/status
# Website dev
cd schemastack-fe && npm run dev
# Visit http://localhost:3000/status