convex/schema.ts
Tables
runs_live — live runs for UI; indices by project, status, time, and run id.
kpis_1m — per minute aggregates.
entitlements — plan & feature flags per org.
projects — project metadata and settings.
apiKeys — RunForge API keys and usage counters.
Indices
runs_live: by_project_time, by_experiment_time, by_status_time, by_run_id, by_created_time.
kpis_1m: by_project_minute.
entitlements: by_org.
projects: by_organization, by_organization_active.
apiKeys: by_project, by_organization, by_key_hash, by_project_active.
Notes
- Keep field names aligned with Prisma
Run for smooth sync.
- Consider adding TTL/archival for
runs_live.