Skip to content
Julien LeveneurFull-stack & AI engineer
← Back to projects

Nº 05 — Starter monorepo

Next.js starter

A production-ready Next.js monorepo: authentication, multi-tenant organizations, a typed API, and a complete verification pipeline. Exported as a new repository with one command.

Nº 05 — Diagram
envdbauthauthzemailapiweb
Year
2026
Role
Author
Stack
Next.jsBetter AuthoRPCDrizzlePostgreSQLTurborepoBunPlaywright

01Context

Every new project started with the same weeks: authentication, roles, database, lint, tests, CI. This starter settles them once, with deliberate, documented choices.

02What I built

  • Organizations with roles and permissions, shared between server and browser without pulling the database into the client.
  • oRPC procedures composed from guards: session, tenant, then permission. Every query is scoped by organization.
  • Transactional email through Resend, with a local outbox to clone and test without an account.
  • bun run check: format, type-aware lint, typecheck, dead code, React Doctor and unit tests, plus integration and Playwright suites.

03Technical decisions

  • One dependency direction, env → db → auth → api → web: a cycle between packages is a design error.
  • Scope is a feature: queues, caching, payments and analytics were removed on purpose.
Next projectVPS & services