AI Template Frontend

May 12, 2026 · View on GitHub

Next.js 16 (App Router, Turbopack default) tenant-facing SaaS UI. Tailwind v4, Framer Motion, Zod. Managed with bun.

Quick start

bun install
cp .env.example .env.local
bun run dev

App lives at http://localhost:3000. The backend is proxied at /api/backend/* (configured in next.config.ts).

Scripts

  • bun run dev — dev server (Turbopack, default in Next.js 16)
  • bun run build — production build
  • bun run start — serve the production build
  • bun run lint / bun run lint:fix — ESLint flat config
  • bun run typecheck — TypeScript
  • bun run test — Vitest

Conventions

  • Client-side app routes call typed helpers in src/lib through the /api/backend/* rewrite
  • Forms validated with Zod (shared schemas in src/lib/validators.ts)
  • Auth lives in cookies (httpOnly + CSRF token, set by FastAPI/authx)
  • Feature visibility gated by NEXT_PUBLIC_FEATURE_* env vars

Experience surface

  • Landing page introduces the boilerplate, stack, and first-run path.
  • Dashboard is the first tenant hub for organizations and empty states.
  • Org navigation hides modules whose NEXT_PUBLIC_FEATURE_* flags are disabled.