Launch NowDocs

Project structure

An overview of the folders and files in Launch Now, the App Router routes, and the conventions the codebase follows.

This page gives an overview of the project's folders and files, the routes defined in app/, and where each kind of code belongs.

Top-level folders

FolderPurpose
appApp Router: pages, layouts, route handlers and metadata files.
componentsShared, feature-agnostic React components (UI kit, layouts, sidebar).
featuresFeature modules: the components and hooks for one domain (billing, admin…).
libServer and shared logic: auth, env, server actions, email, storage, config.
hooksGeneric React hooks (use-mobile, use-copy-to-clipboard, use-is-client).
drizzleDatabase schema, client, SQL migrations and resource specs.
emailsReact Email templates.
contentMDX content for the in-app docs (content/docs) and blog (content/blog).
scriptstsx scripts run by package.json (seeds, Stripe, generator, reset).
publicStatic assets: favicons, icons, logo and marketing images.
typesShared TypeScript types, such as PageParams and LayoutParams.
.githubThe CI workflow.

Top-level files

FilePurpose
package.jsonDependencies, scripts, Git hooks and commitizen config.
next.config.mjsNext.js config, wrapped with Fumadocs MDX.
proxy.tsNext.js proxy (formerly middleware): the "always open the app" redirect.
drizzle.config.tsdrizzle-kit config: schema path, migrations folder and database URL.
components.jsonshadcn/ui config and extra component registries.
vercel.jsonVercel build command (pnpm build:deploy).
.vercelignoreFiles excluded from Vercel uploads.
.env.exampleTemplate for your .env file.
tsconfig.jsonTypeScript config, with the @/* path alias pointing to the root.
eslint.config.mjsESLint config.
.prettierrcPrettier config, with the Tailwind CSS plugin.
knip.jsonKnip config for unused files, exports and dependencies.
commitlint.config.jsConventional commit rules.
.release-it.jsonrelease-it config: changelog, Git tag and GitHub release.
pnpm-workspace.yamlpnpm settings, including which packages may run build scripts.
AGENTS.mdInstructions for AI coding agents.
CHANGELOG.mdRelease notes written by release-it.

Routes in app/

Launch Now uses route groups (folders in parentheses) to share layouts without changing the URL.

Public pages

RouteFolderDescription
/app/page.tsxMarketing homepage.
/pricingapp/pricingPlans and comparison table.
/blog, /blog/...app/blogBlog, from content/blog.
/docs/...app/docsProduct docs, from content/docs.
/changelogapp/changelogRelease notes, plus /changelog/rss.xml.
/statusapp/statusPublic status page (mock data).
/legal, /legal/[document]app/legalLegal documents index and pages.

Authentication

RouteFolderDescription
/auth/signinapp/auth/signinSign in with a code or OAuth.
/auth/signupapp/auth/signupCreate an account.
/auth/onboardingapp/auth/onboardingFirst-run questions for new users.
/accept-invitation/[invitationId]app/accept-invitationAccept or decline an organization invitation.

The app: app/(app)

Everything under app/(app) requires a session: app/(app)/layout.tsx redirects signed-out visitors to /auth/signin and renders the sidebar shell.

RouteFolderDescription
/dashboard(app)/(dash)/dashboardMain dashboard.
/demo(app)/(dash)/demoDemo page (removed by reset-project).
/account, /account/...(app)/accountProfile, security, API keys, notifications, billing, danger zone.
/notifications(app)/notificationsNotification inbox.
/orgs(app)/orgs/page.tsxList of your organizations.
/orgs/[orgSlug](app)/orgs/[orgSlug]Organization overview.
/orgs/[orgSlug]/settings/...(app)/orgs/[orgSlug]/settingsGeneral, members, billing, security, danger zone.
/orgs/[orgSlug]/org-projects(app)/orgs/[orgSlug]/org-projectsExample organization-scoped CRUD.
/projects, /categories(app)/projects, (app)/categoriesExample user-scoped CRUD.
/admin/...(app)/adminPlatform admin: users, organizations, feedback, notifications, newsletter.

The (dash) group only groups the dashboard pages; it does not appear in the URL. The admin layout (app/(app)/admin/layout.tsx) redirects anyone whose role is not admin to /dashboard.

Route handlers: app/api

RoutePurpose
/api/auth/[...all]Better Auth handler (sign-in, OAuth callbacks, organizations…).
/api/webhook/stripeStripe webhook, handled by the Better Auth Stripe plugin.
/api/upload/avatarAvatar upload to S3.
/api/files/[...key]Redirects to a short-lived signed URL for avatars and logos.
/api/newsletter/confirmNewsletter double opt-in confirmation link.
/api/searchSearch index for the docs.

Special files

app/ also holds the root layout.tsx, globals.css (Tailwind CSS and theme tokens), not-found.tsx, forbidden.tsx, unauthorized.tsx, global-error.tsx, and the metadata routes sitemap.ts, robots.ts, manifest.ts and opengraph-image.tsx.

The features/ convention

Pages in app/ stay thin: they load data and compose components from features/. Each folder in features/ groups the UI and client logic for one domain.

FolderContents
accountProfile form, security settings, sessions, 2FA setup, api-keys/.
adminAdmin tables, user and organization details, impersonation banner.
authSign-in and sign-up forms, social buttons, demo sign-in, callback URL.
billingBilling actions, invoice list, past-due banner.
organizationOrganization list, overview, settings panels, slug input.
onboardingOnboarding form, setup progress card.
notificationsBell, inbox, preferences, admin broadcast composer.
newsletterSignup form, composer, history, preference card.
pricingPricing cards, comparison table, subscribe button.
marketingHomepage sections (hero, features, FAQ…), nav and footer.
legalLegal document definitions in documents/.
changelogChangelog entries (changelog-data.ts) and components.
statusStatus page data and sections.
cookie-consentCookie consent banner.
dialog-managerA global store and renderer to open dialogs from anywhere.
resource-kitGeneric table, form sheet and detail view used by generated resources.
projects, categories, org-projectsExample CRUD features.

Files that only run on the server use the .server.ts suffix, like features/newsletter/newsletter.server.ts. Server actions live in lib/, not in features/.

The lib/ folder

File or folderPurpose
auth.tsBetter Auth server config: providers, plugins and hooks.
auth-client.tsBetter Auth client for React components.
auth-server.tsgetSession and getUser, cached per request.
env.tsValidated environment variables.
safe-action.tsaction, authAction and nonDemoAction clients, ActionError.
*-actions.tsServer actions per domain (account, admin, organization, notification, newsletter, feedback, onboarding…).
organization-server.tsServer helpers for organization pages and membership checks.
plans.tsPlan queries and price formatting.
stripe.tsThe Stripe client.
email.tsResend client and sendEmail.
storage.tsS3 upload, download, delete and signed URLs.
notifications/Notification event types and the notify function.
onboarding.tsSetup status used by the dashboard progress card.
config/site-config.tsProduct name, URL, links and other identity settings.
config/legal.tsCompany and legal details used by the legal pages.
seo/createSeoHead metadata helper and JSON-LD.
resource-kit/Manifest and helpers for generated resources.
source.ts, blog.tsFumadocs loaders for content/docs and content/blog.
providers.tsx, query.tsxClient providers: theme, tooltips, TanStack Query, toasts, dialog manager, cookie consent.
fonts/Font definitions with next/font (Geist, Geist Mono, Instrument Serif).
utils.ts, utils/cn, slug helpers, user agent formatting, validation errors.

The components/ folder

FolderContents
uishadcn/ui components plus a few custom ones (submit-button, settings-card, stat…).
layoutsPage layout, legal page layout, sidebar and navigation configs.
layouts/sidebarApp sidebar, organization switcher, search command, plan selector.
layouts/nav-configsSidebar navigation for the dashboard, account, organization and admin contexts.
data-tableFaceted filter for TanStack tables.
evilcharts, shadcn-space, spectrumuiComponents installed from third-party shadcn registries.
motionAnimated components, such as a rolling number.
svgsInline SVG icons.

Top-level files in components/ hold shared widgets used across features: the avatar uploader, breadcrumb, feedback dialog, MDX components, theme provider and toggle, and the user dropdown.

The drizzle/ folder

PathPurpose
auth-schema.tsThe whole database schema (auth, organizations, billing, app tables).
db.tsThe Drizzle client, on a pg connection pool.
migrate.tsApplies migrations; run by pnpm db:migrate.
0000_*.sqlGenerated SQL migrations, applied in order.
meta/drizzle-kit snapshots and the migration journal.
resources/JSON specs for the resource generator.

The scripts/ folder

ScriptRun with
seed-plans.tspnpm db:seed:plans
seed-demo.tspnpm db:seed:demo
stripe-create-products.tspnpm stripe:products
stripe-update-features.tspnpm stripe:update-features
generate-resource.tspnpm resource:generate
reset-project.tspnpm reset-project
legal-check.tspnpm legal:check
db-baseline.tspnpm db:baseline

scripts/templates/ holds the code templates used by the resource generator, and scripts/reset/templates/ the clean files that reset-project writes in place of demo ones.

Generated and tool folders

  • .next/ and .source/ are generated by Next.js and Fumadocs. Do not edit them.
  • .claude/skills/legal-docs is a Claude Code skill that fills lib/config/legal.ts.
  • examples/ appears after you run pnpm reset-project. It holds the moved demo code and is excluded from the build.

Next steps