From radix, shadcn, atoms, templates, blocks, micros — to full masterpiece.
Our architecture is engineered from the ground up for reusability, modularity, and a world-class developer experience. It's not just a system for building applications; it's a framework for composing "atomic" automation components into a powerful, collaborative, and AI-augmented ecosystem. We prioritize a scalable, feature-based structure to ensure that every contribution adds lasting, discoverable value to the entire codebase.
Every URL route produces two directories: one in app/ for routing and layouts, one in components/ for all feature logic. This 1:1 mapping means if you know the URL, you instantly know where to find both the page and its components.
For example, the route /abc creates:
app/[lang]/abc/ — page.tsx, layout.tsxcomponents/abc/ — content.tsx, actions.ts, form.tsx, validation.ts, types.ts, use-abc.ts, README.md, ISSUE.md, etc.This predictable structure eliminates guesswork. New features follow the same pattern. Refactoring is straightforward. AI tools understand it instantly.
src/— Source code directoryapp/— Next.js App Router (Routing & Layouts)[lang]/— i18n supportabc/— URL route: /abcpage.tsx— Route entry pointlayout.tsx— Route layoutcomponents/— Component Logic (Mirrors app structure)abc/— Mirrors app/[lang]/abc/content.tsx— Page UI: headings, sections, layoutactions.ts— Server actions: validate, mutateconfig.ts— Enums, option lists, defaultsvalidation.ts— Zod schemas & refinementstypes.ts— Domain and UI typesform.tsx— Typed forms (RHF)card.tsx— KPIs, summaries, quick actionsall.tsx— List view with table, filtersdetail.tsx— Detail view with sectionscolumn.tsx— Table column buildersuse-abc.ts— Feature hooksREADME.md— Feature purpose, APIs, decisionsISSUE.md— Known issues and follow-upsatom/— Atomic UI componentstemplate/— Reusable layout templatesui/— Base UI components (shadcn/ui)Each feature directory follows these naming conventions:
| File | Purpose |
|---|---|
content.tsx | Compose feature/page UI: headings, sections, layout orchestration |
actions.ts | Server actions & API calls: validate, scope tenant, mutate |
config.ts | Enums, option lists, labels, defaults for the feature |
validation.ts | Zod schemas & refinements; parse and infer types |
types.ts | Domain and UI types; generic helpers for forms/tables |
form.tsx | Typed forms (RHF) with resolvers and submit handling |
card.tsx | Card components for KPIs, summaries, quick actions |
all.tsx | List view with table, filters, pagination |
featured.tsx | Curated feature list showcasing selections |
detail.tsx | Detail view with sections, relations, actions |
util.ts | Pure utilities and mappers used in the feature |
column.tsx | Typed Table column builders and cell renderers |
use-abc.ts | Feature hooks: fetching, mutations, derived state |
README.md | Feature README: purpose, APIs, decisions |
ISSUE.md | Known issues and follow-ups for the feature |
app/[lang]/ must have a mirrored directory in components/button.tsx, user-profile.tsx)user-profile, sign-in)use-leads.ts, use-upwork.ts)| File | Purpose |
|---|---|
src/auth.ts | NextAuth configuration |
src/middleware.ts | Auth & i18n routing |
src/routes.ts | Public/private route definitions |
prisma/schema.prisma | Database schema |
src/app/globals.css | Theme variables |
src/components/ui/ | Base shadcn/ui components |
src/components/atom/ | Atomic design components |
src/components/template/ | Layout templates (header, sidebar) |
CLAUDE.md | Project-wide architectural guidelines |
Watch out for these common mistakes:
config.tsactions.ts patternsform.tsx on the Next.js frontend, triggering a Server Action from actions.tsvalidation.tstypes.tsuse-abc.ts, efficiently updating the UI