StarterApp Docs
Codebase

Project Structure

Detailed directory organization with clear boundaries between applications and packages.

The codebase follows a monorepo structure using pnpm workspaces. Each directory serves a specific purpose with clear boundaries between shared code and application-specific implementations.

Applications Directory

The apps/ directory contains deployable projects:

apps/marketing

Public marketing site with Next.js 15:

page.tsx
layout.tsx
layout.tsx
providers.tsx
globals.css
opengraph-image.tsx
middleware.ts

Pro Tip

Route groups like (marketing) organize pages without affecting URLs. The folder structure keeps related pages together while maintaining clean routes.

apps/dashboard

Authenticated application with Next.js 15:

page.tsx
layout.tsx
layout.tsx
providers.tsx
globals.css
middleware.ts

Cache Flags Required

Protected pages in (dashboard)/ must export cache-disabling flags: export const revalidate = 0; export const dynamic = 'force-dynamic'; export const fetchCache = 'force-no-store';

apps/docs

Documentation site with Fumadocs:

mdx-components.tsx

Packages Directory

Shared libraries in packages/:

packages/app-shell

Core shared package containing:

packages/auth

BetterAuth integration:

packages/billing

UseAutumn integration:

Other Key Packages

Convex Backend

Backend directory structure:

builders.ts
errors.ts
features.ts
auth.ts
identity.ts
security.ts
utils.ts
auth.ts
http.ts
autumn.ts
support.ts
rateLimits.ts
schema.ts
tables.ts
convex.config.ts

AI Context Directory

The llms/ directory provides context for AI development:

File Naming Conventions

Consistent naming enables predictable code organization:

Code Organization Rules

Next Steps