Skip to Content
LaunchfastDocs

Project structure

Where every part of the kit lives, so you know which file to open.

config.ts
proxy.ts
AGENTS.md
.env.example

What each file owns

PathWhat it owns
src/config.tsSite name, support email, checkout consent, and the plans you sell
src/content/landing.tsEvery word on the landing page
src/components/landing/sections.tsxLanding page layout (reads landing.ts and plans)
src/db/schema.tsEvery database table. Auth tables use the field names Better Auth expects
src/lib/auth.tsBetter Auth config: email and password, social providers, admin plugin, rate limits
src/lib/session.tsgetSession() and requireUser(): the only way pages read the signed-in user
src/lib/billing/dodo.tsAll Dodo Payments code: checkout, portal, webhook verification and handling
src/lib/billing/index.tsThe access rule: getBillingStatus() and getBillingStatuses()
src/lib/billing/actions.tsServer actions for checkout and the billing portal
src/lib/admin.tsAdmin guard (requireAdmin), analytics queries, user list
src/lib/email.tssendEmail() through Resend; prints to the terminal in development without a key
src/lib/repo-access.tsOptional GitHub repository delivery
src/lib/blog.ts, src/content/blog/*.mdxBlog loader and posts
src/app/api/webhooks/dodo/route.tsThe Dodo webhook endpoint
src/proxy.tsFast sign-in redirect for /dashboard and /admin (Next.js 16's renamed middleware)
scripts/setup/The npm run setup script
AGENTS.mdInstructions and rules for AI coding agents

proxy.ts is not a security check

src/proxy.ts only checks that a session cookie exists, to save a round trip. Every page still checks the user itself with requireUser() or requireAdmin().

On this page