SkillRouter
Documentation menu

Operate

Local development

Run the dashboard in demo mode or connect it to the local API service.

Dashboard-only demo

Shell
cd apps/web
cp .env.example .env.local
npm install
npm run dev

NEXT_PUBLIC_SKILLROUTER_DEMO_MODE=true explicitly enables representative browser-local data. Demo mode is opt-in. It does not call a provider, create a payment, or create a usable API key. Set it to false for integrated and production deployments.

Connect the API

.env.local
NEXT_PUBLIC_SKILLROUTER_API_URL=http://localhost:3001
NEXT_PUBLIC_SKILLROUTER_SITE_URL=http://localhost:3000
NEXT_PUBLIC_SKILLROUTER_DEMO_MODE=false
Only public browser configuration belongs in apps/web. Put database, Stripe, provider, hashing, session, and observability secrets in the API service environment.
API shell
set -a && source apps/api/.env && set +a
npm run db:setup:dev --workspace @skillrouter/api
npm run dev --workspace @skillrouter/api

Database setup is an explicit operator action. Source checkouts use the :dev operator commands; built deployments use the compiled commands without that suffix. Keep AUTO_SETUP_DATABASE=false; production startup validates migrations and seeds but does not run DDL.

Verify changes

Shell
npm run typecheck
npm test
SKILLROUTER_TEST_DATABASE_URL=postgres://... npm test
NEXT_PUBLIC_SKILLROUTER_API_URL=https://api.useskillrouter.com \
NEXT_PUBLIC_SKILLROUTER_SITE_URL=https://useskillrouter.com \
NEXT_PUBLIC_SKILLROUTER_DEMO_MODE=false npm run build
The PostgreSQL reliability suite is skipped unless SKILLROUTER_TEST_DATABASE_URL points to a new disposable database.

Pair API and dashboard origins

API environment
DASHBOARD_ORIGINS=http://localhost:3000

The API allows credentialed browser requests only from configured dashboard origins. List exact origins separated by commas. Do not use a wildcard with session cookies.

Enable one integrated route

  1. Register the intended account and promote it with the admin:promote:dev server command.
  2. Run the OpenRouter catalog sync and review a seeded model's metadata, price, route contract, and price ceiling.
  3. Activate that model and enable the database openrouter_enabled flag while leaving the production resale flag disabled.
  4. Add test credit through signed Stripe test mode or an audited admin adjustment, then create a limited test API key.
  5. Use GET /v1/models as the source of truth before sending the first request.
Seeded models and virtual models start inactive. Database setup alone does not make the quickstart model routable.