My engineering playbook: opinionated architectures for Next.js, TanStack Start and NestJS, shipped as Claude Code plugins, so every project and every agent works from the same patterns. It began in March 2026 as a template of Giga Psych’s architecture.
Overview
How I build software, written down once and installed into every project that follows it.
Each architecture is a set of rules and patterns for one stack: the folder layout, the data layer, auth, forms, components and the rules that must never be broken. Around them sit the tools that keep a project on them: skills that load the right rules when the work touches them, agents that scaffold and audit, and hooks that remind.
It started as a template of my own code and grew into three stacks, two for the frontend and one for the backend. People and agents read the same doctrine, so a project built with Claude Code looks the way I would have written it.
It’s still under maintenance: I polish the repository in my free time, and any contribution is appreciated.
The architectures
Three stacks, each from a different source: one from code I wrote by hand, one translated from it, and one from the framework’s own guidance.
- Zod schemas at every API boundary, with types inferred from them.
- TanStack Query is the only caching layer: no fetch cache, ISR or revalidateTag.
- Server actions return a Result instead of throwing.
- Services are organised by backend domain, and pages keep their components beside them.
- The browser never talks to a backend: API routes proxy every call.
- Server functions instead of a proxy: createServerFn replaces the API routes.
- URL state is TanStack Router’s typed search params: a Zod schema in validateSearch, no extra library.
- The Start session is the source of truth for auth; backend tokens stay on the server.
- Flat, dot-named files per resource: {resource}.schema.ts, {resource}.functions.ts.
- No React Server Components directives: no “use client” or “use server”.
- shadcn on Base UI, not Radix.
- A modular monolith: each part of the domain is a NestJS module, not a microservice.
- Modules never import each other’s internals; they talk through domain events.
- Two processes from one image: HTTP and WebSockets in one, BullMQ workers in the other.
- Zod for every DTO, instead of class-validator decorators.
- The OpenAPI spec is the contract, and typed clients are generated from it.
The plugins
The repository is a Claude Code plugin marketplace. Projects install the architectures instead of copying them, so one update brings the latest rules, skills and agents to every project at once.
- Skills
Rules that load when needed
Eight doctrine skills, for services, state, UI, auth, forms, modules, decisions and contributing. Each loads only when the work touches its area, and reads the stack from package.json, so one set serves all three architectures.
- Agents
Scaffold and audit
Each frontend stack ships fourteen agents: they plan a migration, scaffold pages, services and widgets, review a project against the architecture, and catch a useQuery that should suspend or a colour that isn’t a token.
- Hooks
Reminders after edits
After an agent edits a file, a hook reminds it of the rules for that kind of file. They are advice, not gates: the checks that must hold run in the project’s CI.
- Sync
Know what a project runs
A script reports which plugins a project has and whether each is current, behind or missing; an audit agent judges what a script can’t, like a local fork of an agent or a rule that drifted.
arch-coreThe doctrine skills, the drift audit and every stack’s reference; the others need itarch-nextjsNext.js agents, hooks and a settings templatearch-tanstack-startTanStack Start agents, hooks and a settings templatearch-nestjs-backendNestJS doctrine, with module scaffolding and audit agentsproduct-designA prototyping skill, visual-language doctrine and a review agent for rendered pages
Install
Add the marketplace once, then install the plugin for the project’s stack. Here, TanStack Start:
claude plugin marketplace add exx0dusss/architecturesclaude plugin install arch-tanstack-start@architectures --scope projectOr let an agent do it: Copy prompt gives Claude Code the steps to pick the plugin for your stack and install it, and Open in Claude starts a chat that reads the repository and helps you choose.
--scope project writes the plugin into the project’s .claude/settings.json, so everyone who clones it gets the same architecture from git. Then run /arch-init once for what a plugin can’t do by itself: the project’s own AGENTS.md index, permissions and component registry. claude plugin update brings later versions.
Codex installs the same skills from the repository’s own Codex marketplace.
History
From the private history and the public repository.
- 24 Mar 2026A template of Giga PsychNext.js · Claude Code agentsGiga Psych’s frontend architecture, written down as the Next.js stack with its building blocks and file templates; by midnight, the first Claude Code agents.
- 25 Mar 2026TanStack StartTanStack Start · Base UIThe Next.js stack, translated to TanStack Start the next night, and SalonSvitlo’s storefront started from it.
- Apr 2026NestJSNestJS · Drizzle · BullMQA backend architecture from NestJS’s own patterns, with new agents beside it.
- Aug 2026Plugins and decisionsClaude Code pluginsThe architectures shipped as Claude Code plugins on 17 August, and a log of architecture decisions began the next day.
- 28 Aug 2026Open sourcePublished under MIT with a fresh history. Giga Psych now installs it back, like any other project.
Design
This page is drawn on a cutting mat.
- Drafting white#ffffff
- Mat green#0f7f74
- Deep mat#0b3b36
Architectures is where plans are drawn before anything is built, so its page borrows the green of a designer’s cutting mat: the surface under every careful line, marked with a grid you can measure against.
White drafting paper takes up most of the gradient and the green runs through it like the mat showing at the edges, quiet and precise, a colour that says “measure twice”. The avatar is the same green: a blueprint on a blob of mat.