Frontend
Next.js App Router, global marketing pages, dashboard screens, documentation hub, auth callbacks, server components, and API route handlers.
Follow this sequence to move from a clean local project to a production-ready global distributed AI compute control plane.
| Task | Command or endpoint |
|---|---|
| Local setup | npm install && npm run dev |
| Build | npm run build |
| Schema order | docs/supabase-schema.sql → docs/rls-policies.sql → docs/seed-demo.sql |
| Health check | GET /api/health |
| Readiness check | GET /api/readiness/check |
| OpenAI-compatible gateway | GET /api/v1/models · POST /api/v1/chat/completions · POST /api/v1/embeddings |
Next.js App Router, global marketing pages, dashboard screens, documentation hub, auth callbacks, server components, and API route handlers.
Postgres tables, RLS policies, OAuth, magic links, tenant membership, node telemetry, usage events, incidents, audit events, and seed data.
Linux TypeScript collector starter that reports GPU, power, latency, temperature, memory, and heartbeat telemetry.
Explainable routing stubs that score nodes by health, latency, available power, region policy, runtime status, and tenant quota.
OpenAI-compatible API surfaces for /api/v1/models, /api/v1/chat/completions, and /api/v1/embeddings.
Incidents, SLA, failover, billing control, compliance evidence, runtime marketplace, customer success, support, and admin/audit screens.
Each step includes owner, outcome, actions, and acceptance evidence so the team can execute consistently.
Owner: Developer
A clean Next.js project running locally without legacy route leftovers.
Owner: Developer + Supabase admin
The app can connect to Supabase from browser, server routes, and admin-only workflows.
Owner: Database owner
Older Supabase databases are upgraded before the main schema and seed scripts run.
Owner: Platform admin
Google, GitHub, and magic-link sign-in work locally and in production.
Owner: Developer + operator
A signed-in user can create an organization, site, node, and node API key.
Owner: Infrastructure engineer
A Linux node can send authenticated telemetry into the control plane.
Owner: API engineer
Gateway routes, routing simulation, and readiness APIs respond predictably.
Owner: Release owner
Vercel production deployment is authenticated, monitored, and ready for pilot users.
| Area | Endpoint | Purpose |
|---|---|---|
| Health | GET /api/health | Confirms the Next.js API layer is responding. |
| Readiness | GET /api/readiness/report | Checks production-readiness gates. |
| Models | GET /api/v1/models | Verifies OpenAI-compatible model discovery. |
| Routing | GET /api/router/simulate | Confirms routing simulation is available. |
| Enablement | GET /api/enablement/checklist | Returns the developer and user step checklist. |
| Status | GET /api/status | Checks operational status surface. |
Run bash scripts/cleanup-legacy-routes.sh, then remove .next and rebuild from a fresh extraction.
Open /api/auth/clear?next=/login and sign in again. This clears stale Supabase auth cookies.
Run docs/database-compatibility-fixes.sql before the main schema.
Run docs/database-compatibility-fixes.sql, then rerun schema and seed scripts.
Check NEXT_PUBLIC_SITE_URL and Supabase redirect URLs for /auth/callback.
Confirm the node key prefix/hash is active, the key is not revoked, and the agent points to the correct API base URL.