Skip to content

Docs

Getting started

Install and run OSAGI Console, a Next.js 16 admin template: requirements, local run, demo sign-in, project structure, everyday commands and deployment.

OSAGI Console is a Next.js 16 template for an AI-native operations console. Every screen runs on an in-memory mock API, so the console works out of the box.

Requirements

  • Node.js 22 LTS.
  • pnpm 10. The exact version is pinned in the packageManager field of package.json; corepack enable installs it.

No database and no environment variables are needed to run the template.

Run locally

bash
pnpm installpnpm dev                 # http://localhost:3000

Production build:

bash
pnpm buildOSAGI_DEMO_AUTH=on pnpm start   # on your own machine: a production server keeps the demo sign-in off without it

Sign in

Open /login, enter any email and password, then any six digits as the two-factor code. You are signed in as Demo Admin (demo@example.com), an owner with every permission and every section. The console opens on its home page, /overview.

The public landing page lives at /. Its Live demo button opens /demo, which signs the visitor in as the same demo user, shows a "Demo data" banner and opens the console.

Tip

/demo?next=/sla and GET /api/auth/demo?next=/sla sign in at once and open the given console page, which is handy for screenshots and end-to-end runs.

The demo data (people, companies, numbers, texts) is invented and lives in memory: a server restart brings the seed data back.

Project structure

PathWhat lives there
app/(auth)/Sign-in and two-factor screens
app/(marketing)/The public landing page; its texts are in content/landing.ts, the kits in content/kits.ts and every price in lib/config/pricing.ts
app/(console)/Console screens, one folder per module
app/api/Route handlers: the mock API
app/root-document.tsx, app/fonts.tsThe <html> document and the fonts shared by the root layouts
components/UI by module, plus ui/ (shadcn), core/, charts/ and patterns/
config/nav.tsNavigation
lib/View models, formatting, schemas, auth and the mock layer (lib/mock)
styles/theme.cssDesign tokens
scripts/Contrast and licence checks, theme and landing screenshots
tests/unit/, ui/ (component tests) and e2e/ (Playwright)
deploy/DockerfileContainer image of the production server

Everyday commands

CommandWhat it does
pnpm devDevelopment server
pnpm typecheckTypeScript
pnpm check / pnpm fixLint and format (Biome through Ultracite)
pnpm testUnit and component tests (Vitest)
pnpm test:e2ePlaywright smoke tests against a production build
pnpm check:contrastWCAG contrast of the theme tokens
pnpm check:licensesLicences of the production dependencies

Deploy

next.config.ts sets output: "standalone", so pnpm build also writes a self-contained server to .next/standalone; pnpm start keeps working as before. deploy/Dockerfile packs that server into an image: Node.js 22 on Alpine, a non-root user, port 3000.

bash
docker build -f deploy/Dockerfile -t osagi-console .docker run --rm -p 127.0.0.1:3000:3000 osagi-console
  • NEXT_PUBLIC_* values are inlined by next build, so pass them as build arguments (--build-arg); setting them on a running container changes nothing. All of them are optional: NEXT_PUBLIC_CHECKOUT_PERSONAL_URL and NEXT_PUBLIC_CHECKOUT_TEAM_URL are the checkout links of the landing page, NEXT_PUBLIC_CHECKOUT_<KIT>_URL those of its kits, NEXT_PUBLIC_CHECKOUT_BACKEND_URL and NEXT_PUBLIC_CHECKOUT_FULL_SUITE_URL those of Backend Starter and Full Suite (a Full Suite link counts only together with Backend Starter's), NEXT_PUBLIC_LAUNCH_CODE and NEXT_PUBLIC_LAUNCH_UNTIL its launch offer, NEXT_PUBLIC_SUPPORT_EMAIL its support address, NEXT_PUBLIC_SITE_URL makes Open Graph image URLs absolute and NEXT_PUBLIC_BUILD_ID labels the build in the console footer. An empty or malformed link value hides the link.
  • The image checks itself through /api/health/live, which answers without touching the data.
  • The demo sign-in stays off in production. With it on anyone can open /demo and become the demo owner, so a production server, the image included, keeps it off unless OSAGI_DEMO_AUTH=on: the public preview and the end-to-end tests set that on purpose (add -e OSAGI_DEMO_AUTH=on to try the image as a demo). Off, the demo cookie opens nothing, and /demo and /api/auth/demo answer 404; a value that is neither on nor off turns it off too. Then connect your sign-in, see Connecting your API.
  • The mock API keeps what visitors create in process memory, in a sandbox of each visitor's own: nobody sees another visitor's data, and a sandbox goes back to the seed after 60 minutes without activity or 6 hours in all (at most 200 sandboxes within about 160 MiB). OSAGI_DEMO_SANDBOX=off keeps one store for every visitor instead. A public demo should still restart on a schedule, for example nightly, for a clean process.

Next steps