Skip to content

Architecture Lab

A small projects and tasks API, built five times with five backend structures: Layered, Feature modules, Hexagonal, Clean and Use-case-first. All five answer the same over HTTP; what changes is how the code is organized.

The goal is to learn when a structure helps, what it costs and which decisions do not depend on folder names.

The product

Two resources, projects and tasks, with six operations and three business rules. The contract is explained and tested in the playground.

How to use this site

  • Playground: choose one of the five APIs, send requests and see the full response.
  • Architectures: one card per app and a table that compares the five.

Run the apps

Requires Node.js 24.21.0 and pnpm 12.6.0, which comes with Corepack (corepack enable). From the repository root:

pnpm install
pnpm --filter @architecture-lab/<app> db:reset   # database with sample data
pnpm --filter @architecture-lab/<app> start
pnpm --filter @architecture-lab/web dev          # the site

Each app runs in its own terminal; for the playground, start all five.

What it is not

No architecture is presented as the best. The numbers in the comparison are observations about this repo, not scores (caveats).