project-scaffolding
Skill2 starsChanged 6 months agoMITView on GitHub
Use when starting a new SaaS app or adding structure to one — sets up a Next.js (App Router) + TypeScript project with a sane folder layout, path aliases, server/client boundaries, and the conventions the rest of the stack builds on.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Oct 5, 2026
- hemapriyan-rk/claude-rigor-skillstheir own version, first seen Sep 26, 2026
- zeeshanhanif/agentic-sdlc-kittheir own version, first seen Aug 19, 2026
- arjunprabhulal/agent-skillstheir own version, first seen Aug 3, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- fmind/dot★ 10same name
- zeeshanhanif/agentic-sdlc-kit★ 8same name
- arjunprabhulal/agent-skills★ 4same name
- hemapriyan-rk/claude-rigor-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- api-routes-and-validationSkill
- authenticationSkill
- authorization-rbacSkill
- background-jobsSkill
- data-access-layerSkill
- database-schemaSkill
- deployment-and-ciSkill
- environment-and-configSkill
- file-uploads-and-storageSkill
- multi-tenancySkill
- observability-and-errorsSkill
- payments-stripeSkill
- subscription-billingSkill
- transactional-emailSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
Keep next.config minimal; add experimental.serverActions only if your version needs it.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Scaffolding
Overview
A SaaS codebase lives or dies by its boundaries. Pick Next.js App Router + TypeScript and commit to one rule: business logic lives in server-only modules, the UI imports from a typed data-access layer, and secrets never cross into client components. Get the skeleton right and every later skill (auth, billing, jobs) slots in cleanly.
When to use
- Bootstrapping a new SaaS app from zero.
- An existing app has logic scattered across components and route handlers.
- You need a layout that supports multi-tenancy, billing, and background jobs later.
Folder layout
src/
app/ # routes (App Router)
(marketing)/ # public pages
(app)/ # authenticated app, wrapped in a layout that checks session
[org]/ # tenant-scoped routes (see multi-tenancy)
api/ # route handlers (webhooks, integrations)
server/ # SERVER-ONLY. never imported by client components
db/ # schema + drizzle client (database-schema)
services/ # business logic, one file per domain
auth/ # session helpers (authentication)
lib/ # isomorphic helpers (pure, no secrets)
components/ # UI (ui/* are shadcn primitives)
env.ts # typed env (environment-and-config)Conventions that pay off
import "server-only"at the top of every file inserver/— turns a leaked import into a build error.- Path alias
@/*→src/*intsconfig.jsonso imports don't rot. - Server Actions for mutations, route handlers for webhooks/integrations. Don't build a REST layer you don't need.
- One service per domain (
server/services/billing.ts), called by actions and route handlers alike — never duplicate logic in the UI. strict: trueplus"noUncheckedIndexedAccess": truein tsconfig from day one; retrofitting strictness is misery.
Recommended baseline
npx create-next-app@latest --ts --app --tailwind --eslint
# then add: drizzle-orm + drizzle-kit, your auth lib, stripe, zodKeep next.config minimal; add experimental.serverActions only if your version needs it.
Pitfalls
- Putting DB calls in client components — they can't run there and you'll leak the connection string. Use the data-access layer + server components/actions.
- A
utils.tsdumping ground — splitlib/(pure) fromserver/(privileged). - Deferring
strictmode — every week without it addsanyyou'll never remove. - Route handlers for everything — Server Actions are less boilerplate for first-party mutations.
- No route groups — mixing marketing and app routes makes auth layouts awkward.
Hand-off
A typed skeleton with clear server/client boundaries. Next: environment-and-config for typed secrets, then database-schema to model data.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

