create-comwit AI-native · Next.js full-stack
One command. A codebase your agent can’t get wrong.
Next.js as the whole stack, with the architecture, the agent rulebook and the lint rules that enforce it in one project — so a non-developer with a coding agent builds like a senior team, and the code stays maintainable for a hundred years.
npm create comwit@latest my-appBuild like a developer, without being one.
AGENTS.md, an.ai.mdbeside every layer and one-time skills (app-setup,auth-setup,seo-optimize) tell Claude Code, Codex or Antigravity where things go and how they are written. Your prompts stay about the product.Full-stack in one repo.
The api layer is the backend: typed server functions over the kit’s own transport — parallel calls, only
ActionErrorreaches the browser, Server Components call them with no HTTP hop. No second service to run.Maintainable for a hundred years.
Screens sliced by service and domain, four layers that depend one way. A change to posts touches the post slice and nothing else.
Rules that enforce themselves.
Two dozen Oxlint rules fail
pnpm run validatewhen a boundary is crossed, before anyone reviews.
One slice per domain. Four layers inside it.
append usersadminoperatorspageposts/profile/cart/members/reports/stateusePostuseUseruseCartuseMemberuseReportapifindAll()getMe()addItem()suspend()summary()repositorysrc/server/repositoryshared by every servicepost.tsuser.tscart.tsreport.tsapp/post lives in page/posts/, state/post/ and api/post/, and reads post.ts.
page → state → api → repository. Never backwards, never around.Inside the kit
Chosen
- Next.js 16 App RouterCache Components, service worker, offline page
@comwit/statecomwit-uiinstalled as source, Tailwind v4 tokens- Better Auth + Drizzle
- Oxlint
Yours
- The database
- The bucket
- The hosting (or
--opennextfor Cloudflare Workers) - The brand tokens
- The UI language (Korean by default, one file)
Read on
- Why domains, not layersThe reasoning behind the folder structure — change arrives per domain, so code should be sliced per domain.
- Folder structureEvery folder in the template, what may import what, and the order to write things in.
- The four layersWhat each layer is allowed to do, with the patterns the .ai.md files ask for.
- Design decisionsThe choices behind the kit and why they were made — starting with how server functions are wired.
- Working with coding agentsAGENTS.md, the .ai.md guides, the bundled skills and the workflow they assume.