All application data flows through Supabase — operators pick self-hosted (via the Supabase CLI) or cloud (Infernet hosted); the code is identical either way. The Supabase client is server-only: it must be used inside Next.js route handlers and server components, never imported into client components. All JavaScript uses ESM and dependencies are managed with pnpm.
-
Wire
GET /api/nodesto Supabase- File:
app/api/nodes/route.js - Description: Replace placeholder/mock data with a query against the
nodestable vialib/data/infernet.js.
- File:
-
Add
GET /api/nodes/[id]route- File:
app/api/nodes/[id]/route.js - Description: Return a single node by id from Supabase.
- File:
-
Wire
GET /api/jobsto Supabase- File:
app/api/jobs/route.js - Description: Query the
jobstable, support filters (status, provider, client) and pagination.
- File:
-
Connect main dashboard to live data
- File:
app/page.jsandcomponents/overview-grid.js - Description: The dashboard should consume server component data from
lib/data/infernet.js(already Supabase-backed) instead of any remaining sample fallbacks.
- File:
-
Build GPU monitoring page
- File:
app/gpu/page.js - Description: React server component that fetches GPU telemetry via a new
/api/gpuroute.
- File:
-
Build nodes listing page
- File:
app/nodes/page.js - Description: Server component that fetches from
/api/nodesand renders theResourceTablecomponent.
- File:
-
Build CPU monitoring page
- File:
app/cpu/page.js - Description: Server component that fetches CPU telemetry via a new
/api/cpuroute.
- File:
-
Replace mock data in HomeScreen
- File:
mobile/src/screens/HomeScreen.js - Description: Fetch stats and jobs from the Next.js REST API (which proxies Supabase).
- File:
-
Replace mock data in ProvidersScreen
- File:
mobile/src/screens/ProvidersScreen.js - Description: Fetch provider data from
/api/providers.
- File:
-
Replace mock data in JobsScreen
- File:
mobile/src/screens/JobsScreen.js - Description: Fetch job data from
/api/jobs.
- File:
- Replace mock implementation in database statistics utility
- File:
src/db/utils.js - Description: The
getStats()function currently returns mock data; replace with a server-side Supabase query (countacrossnodes,jobs,providers, etc.).
- File:
- Keep the Supabase schema in
supabase/migrations/as the single source of truth; apply withsupabase db reset(self-hosted) orsupabase db push(cloud). - Expand
lib/data/infernet.jswith any new query helpers needed by API routes. - Update Next.js route handlers to delegate to those helpers.
- Update React server components and client components to consume the API routes (or use the server-side data helpers directly from server components).
- Ensure all code uses ESM modules and is managed with pnpm.
- Document the migration flow for both self-hosted (
supabase db reset) and cloud (supabase db push) deployments. - Add authentication for the node API routes (Nostr / BIP-340 Schnorr, verified per request) — shipped 2026-04-19.
- Extend signature-based auth to the read routes (
/api/overview,/api/nodes, etc.) so operators can scope views to an identity. - Implement real-time updates using Supabase Realtime channels, fronted by a Next.js API for mobile clients.
- Add proper error handling and loading states throughout the React app.