This repository now runs as a single Next.js application with:
- Next.js App Router for UI and API routes
- Local open-source Supabase as the database/backend
- Tailwind CSS for styling
- Vitest for tests
- Electron for the desktop shell in
desktop/
The active web/runtime is the root Next.js app. The desktop target remains Electron and loads that Next.js app as its renderer.
- Runtime: Node.js 18+
- Framework: Next.js
- Database: local open-source Supabase
- Styling: Tailwind CSS
- Testing: Vitest
- Desktop: Electron
Supabase is server-only in this rewrite.
- Use
SUPABASE_SERVICE_ROLE_KEYonly from server modules and route handlers. - Do not import
@supabase/supabase-jsinto client components. - Do not expose Supabase anon keys in browser bundles.
app/ Next.js pages and route handlers
components/ UI building blocks
lib/ Server-only env, Supabase, and data access helpers
desktop/ Electron shell for the desktop app
supabase/migrations/ SQL schema for local Supabase
tests/ Vitest coverage for env, data mapping, and route helpers
Copy sample.env into .env.local and set:
SUPABASE_URL=http://127.0.0.1:54321
SUPABASE_SERVICE_ROLE_KEY=your-local-service-role-key
NEXT_PUBLIC_APP_URL=http://localhost:3000Start the local open-source Supabase stack first:
pnpm supabase:startThen copy the local service-role key from supabase status into .env.local.
Apply the migration in supabase/migrations/20260312000000_initial_infernet_schema.sql. It creates:
nodesprovidersaggregatorsclientsmodelsjobs
The migration also seeds a small dataset for local validation.
Install dependencies and run the app:
pnpm install
pnpm supabase:start
pnpm devUseful commands:
pnpm build
pnpm start
pnpm supabase:db:reset
pnpm supabase:stop
pnpm testDesktop commands:
cd desktop
pnpm electron:dev
pnpm electron:startThe current server API surface is:
GET /api/overviewGET /api/nodesGET /api/jobsGET /api/providersGET /api/aggregatorsGET /api/clientsGET /api/models
Each route reads from Supabase through lib/data/infernet.js, which is marked server-only by dependency chain.