A clone-ready Next.js 16 module starter that imports @plinth-dev/* packages. Authentication, authorization, audit, observability, error boundaries, and security headers — all pre-wired.
Status: v0.1.0 — Phase C in progress. Cloneable, but the
@plinth-dev/*packages it depends on are still in design.
git clone https://github.com/plinth-dev/starter-web my-module
cd my-module
pnpm install
pnpm dev # http://localhost:3000For everything-running-locally:
docker compose up --build # Postgres, Cerbos, NATS, SigNoz, the module- Next.js 16 with App Router, Turbopack, standalone Docker output, React 19 server components.
- Three-layer route group:
app/(module)/layout.tsxdoesrequireAuth+ batchedcheckPermissions+<PermissionsProvider>wrap. - Error boundaries:
app/error.tsx,app/global-error.tsx,app/not-found.tsx. - Security headers in
next.config.ts: CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy. - i18n via
paraglide-js(compile-time message keys). - Forms via
@plinth-dev/forms(server actions + Zod). - Tables via
@plinth-dev/tables(TanStack + nuqs URL state). - Tests: Vitest unit tests, Playwright E2E, Storybook visual review.
- Lint + format: Biome 2.
This is a starter, not a kitchen sink. Things you bring yourself:
- Domain logic (one canonical example resource —
Items— is included; delete it). - Brand styling (Tailwind v4 + shadcn/ui primitives ship vendored; restyle freely).
- Specific integrations (no Slack, Stripe, etc).
After cloning, search the repo for // TODO: Customize for your module and walk each one. Then update:
package.json—name,description,repository.next.config.ts— production hostnames inimages.remotePatternsand CSP.app/(module)/layout.tsx— module name in metadata.cerbos/*.yaml— replaceItemwith your resource kind.
starter-api— the matching Go backend.sdk-ts— the SDK packages this starter imports.cli—plinth newautomates the rename + register flow.
MIT — see LICENSE.