Manifest

Our Approach

A Next.js 16 monorepo with Clean Architecture + DDD. Here's why we built it this way.

The Context

AI tools write code fast. Really fast. You describe what you want, and thousands of lines appear. It's impressive.

But we noticed something: the code that's easy to generate isn't always easy to maintain. When AI hallucinates or introduces subtle bugs, you need to be able to step in and fix things.

That's only possible if you can actually understand the code. And that's easier when there's a clear structure to follow.

The Structure

Why Clean Architecture + DDD

We picked these patterns because they work well with AI tools and make debugging straightforward.

AI Knows These Patterns

Clean Architecture and DDD are well-documented. When you ask for a 'SignInUseCase', AI tools know exactly what that means.

Easy to Navigate

Domain logic in src/domain/. Use cases in src/application/. Each file does one thing. You can find what you're looking for quickly.

Explicit Error Handling

Result<T> makes failures visible. No hidden exceptions to discover in production.

Same Pattern, Any Scale

First feature or fiftieth, same structure. No rewrites needed as the project grows.

The flow is consistent:

Controller
Use Case
Domain
Repository
What's Included

Out of the Box

  • Complete authentication (sign up, sign in, sessions, email verification)
  • Patterns documented in CLAUDE.md
  • Every layer with working examples
  • Type-safe from domain to API
  • AI skills for code generation (/gen-domain, /gen-usecase, /gen-tests)
A Note

About Complexity

More files doesn't mean more work. You're writing the same code — it just lives in different places.

Whether you use Clean Architecture or not, you still need to:

  • Validate user input
  • Execute business logic
  • Save data to a database
  • Handle errors
  • Return a response

Same code. Different organization.

The structure makes it easier to find things later. That's the tradeoff we chose.

Get Started

pnpm install && cp .env.example .env
pnpm db && pnpm db:push
pnpm dev

Documentation

AI Skills

  • /feature-prdConversational PRD with EventStorming
  • /gen-domainGenerate domain layer code
  • /gen-usecaseGenerate use case with DTOs
  • /gen-testsGenerate BDD tests

Tech Stack

Next.js 16TypeScript 5.9Drizzle ORMPostgreSQLBetterAuthTurborepoTailwind CSS 4shadcn/uiBiomeVitest