AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Project Scaffolding

skill-param087-saas-starter-skills-project-scaffolding · by param087

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.

No reviews yet
0 installs
34 views
0.0% view→install

Install

$ agentstack add skill-param087-saas-starter-skills-project-scaffolding

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-param087-saas-starter-skills-project-scaffolding)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Project Scaffolding? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 in server/ — turns a leaked import into a build error.
  • Path alias @/*src/* in tsconfig.json so 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: true plus "noUncheckedIndexedAccess": true in 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, zod

Keep 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.ts dumping ground — split lib/ (pure) from server/ (privileged).
  • Deferring strict mode — every week without it adds any you'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.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.