> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anotherwrapper.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Project Structure

> A quick map of the codebase so you always know where to look

Here's the map of your new codebase. This is a single Next.js app (not a monorepo), and everything is organized by **what it does**, not by file type. Let's walk through it.

## Top-Level Folders

<AccordionGroup>
  <Accordion title="app/ -- Routes, pages, and API endpoints">
    This is your Next.js App Router directory. Everything that has a URL lives here.

    * `app/(apps)/` -- The main product apps (chat, image studio, voice, etc.)
    * `app/auth/` -- Auth UI pages (sign-in, reset password, auth errors)
    * `app/page.tsx` -- The signed-in home/dashboard route (`/`)
    * `app/landing/` -- The public marketing page
    * `app/api/` -- Shared API routes (Better Auth, avatars, payments, OG images)
    * `app/blog/` -- Blog pages
  </Accordion>

  <Accordion title="components/ -- All your UI">
    Reusable components organized by what they belong to.

    * `components/ui/` -- Base UI primitives (buttons, inputs, dialogs)
    * `components/landing/` -- Marketing page components
    * `components/(apps)/` -- App-specific UI components
    * `components/(ui-components)/` -- Shared product UI (auth, payments, blog, alerts, account center)
  </Accordion>

  <Accordion title="lib/ -- Shared business logic">
    The brain of your app. Cross-app behavior and integrations live here.

    * `lib/ai/` -- Model configuration and AI helpers
    * `lib/auth/` -- Server-side auth helpers
    * `lib/db/` -- Domain-first database modules + Drizzle client
    * `lib/db/schema/` -- Database schema (source of truth)
    * `lib/actions/` -- Server actions
    * `lib/config/` -- Static registries and app catalogs
    * `lib/payments/` -- Provider-agnostic billing logic
    * `lib/analytics/` -- Product analytics and event tracking
    * `lib/email/` -- Contact sync
    * `lib/storage/` -- Object storage
    * `lib/rag/` -- Document chunking, embeddings, retrieval, and citations
    * `lib/shared/` -- Small cross-domain helpers (formatting, cookies, etc.)
    * `lib/integrations/` -- Thin vendor SDK wrappers
    * `lib/observability/` -- Sentry and monitoring adapters
  </Accordion>

  <Accordion title="drizzle/ -- Database migrations">
    Generated and custom SQL migration files. This is the migration history for your database -- don't edit generated files by hand.
  </Accordion>

  <Accordion title="blog/ -- Blog content">
    MDX blog posts that power the content collections blog pipeline.
  </Accordion>

  <Accordion title="docs/ -- Documentation">
    * `docs/public/` -- The Mintlify docs site (what you're reading now!)
    * `docs/architecture/` -- Internal implementation notes for maintainers
  </Accordion>
</AccordionGroup>

## The Marketing + Product Split

Your repo contains both the public-facing marketing site **and** the signed-in product in one place. Here's how they stay separate:

<CardGroup cols={3}>
  <Card title="Marketing" icon="megaphone">
    `app/landing/` and `components/landing/`
  </Card>

  <Card title="Product Apps" icon="grid-2">
    `app/(apps)/` and `components/(apps)/`
  </Card>

  <Card title="Shared Infra" icon="gear">
    `lib/` for everything both sides need
  </Card>
</CardGroup>

This split is great because you can work on "sell the product" and "use the product" without the code getting tangled together.

## Product Apps Included

Your app ships with these product surfaces:

* **Chat** -- AI chat with optional PDF/document context
* **Marketing Plan** -- AI-powered marketing plan generator
* **Launch Simulator** -- Simulate a product launch
* **Image Studio** -- AI image generation
* **Video Studio** -- AI video generation
* **Voice Studio** -- AI voice synthesis
* **Audio** -- Audio transcription and processing
* **Vision** -- Image analysis and understanding
* **Dashboard** -- Account center, credits, and billing

## Where to Start Exploring

<Tip>
  New to the codebase? Start with these folders to build your mental model:

  * `/app/(apps)/chat` -- The flagship AI app, great for understanding the full pattern
  * `/lib/ai` -- How models and providers are configured
  * `/lib/rag` -- How document chat works
  * `/components/landing` -- How the marketing site is built
  * `/lib/payments` -- How billing works
</Tip>
