Skip to main content

Installation

Step-by-step install plus a reference for the environment variables Krios reads.

Prerequisites

  • Node 20+ — tested on 20 and 22.
  • pnpm 9+ — the repository is a pnpm workspace.
  • PostgreSQL — Neon free tier is the easy path for dev.
  • Supabase Storage — or any S3-compatible bucket; the storage provider is pluggable.

Clone + install

git clone https://github.com/konabos/krios.git
cd krios
pnpm install

Configure

Copy the example env file:

cp .env.example .env

Edit .env:

VariablePurpose
DATABASE_URLNeon (or any Postgres) connection string. Pooled URL preferred for serverless.
DATABASE_URL_UNPOOLEDReserved / not currently wired — the Prisma schema declares no directUrl, so migrations run against DATABASE_URL. Keep it set for forward-compatibility, but it isn't read today.
NEXTAUTH_SECRET32-byte random secret. openssl rand -base64 32.
NEXTAUTH_URLPublic origin. http://localhost:3000 for dev.
ADMIN_EMAIL / ADMIN_PASSWORDFirst admin user; created by pnpm db:seed.
SUPABASE_URLSupabase project URL.
SUPABASE_SERVICE_KEYSupabase service role key (server-side only).
SUPABASE_STORAGE_BUCKETName of an existing Supabase Storage bucket.
CRON_SECRETBearer token for /api/cron/* handlers (set in production).

Initialize

Apply the Prisma schema and seed the demo project:

pnpm db:push
pnpm db:seed

db:push is idempotent — re-run it after pulling schema changes. db:seed provisions the starter content types, demo project, default roles, and the first admin user.

Run

pnpm dev

Visit http://localhost:3000/admin/login and sign in with your ADMIN_EMAIL / ADMIN_PASSWORD.

Useful scripts

pnpm dev # Next.js dev server (http://localhost:3000)
pnpm build # Production build (also runs prisma generate)
pnpm start # Run the production build
pnpm typecheck # TypeScript compile check
pnpm lint # ESLint
pnpm db:push # Apply schema (no migration history needed)
pnpm db:migrate # Create / apply a Prisma migration
pnpm db:seed # Re-seed the demo project (idempotent)
pnpm db:studio # Open Prisma Studio against the configured DB

Next