> ## 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.

# Get Started

> Go from zero to running AI app in about 5 minutes

You're about 5 minutes away from running your own AI product locally. Let's go.

<Info>
  **The fast path:** clone the repo, run `pnpm bootstrap`, then `pnpm dev`. That's it.
</Info>

## What you get right away

With just the minimum setup (database + one AI provider), you can already use:

<CardGroup cols={3}>
  <Card title="AI Chat" icon="robot">
    Multi-model chat with streaming
  </Card>

  <Card title="Marketing Plan" icon="chart-line">
    Schema-based business tool
  </Card>

  <Card title="Launch Simulator" icon="sparkles">
    Fun Product Hunt simulation
  </Card>

  <Card title="Dashboard" icon="layout-dashboard">
    Full app shell with credits
  </Card>

  <Card title="Landing Page" icon="browser">
    Marketing site at `/landing`
  </Card>

  <Card title="Auth" icon="shield">
    Email/password sign-in ready
  </Card>
</CardGroup>

<Tip>
  If your first provider is OpenAI, the GPT Image models are configured. To actually save generated media and use the full Image Studio flow, you still need storage. Adding Replicate early unlocks even more image and video models.
</Tip>

<Accordion title="What needs extra setup later?">
  These features work great but need additional configuration beyond the basics:

  * **Storage-backed flows** — chat documents, uploads, generated asset history
  * **Video Studio** — video model credentials + storage
  * **Voice Studio** — ElevenLabs + storage
  * **Payments, email, analytics, Sentry** — all optional
  * **PDF RAG and embeddings** — needs OpenAI + storage + pgvector
  * **Extra AI providers** — beyond your first LLM
</Accordion>

## What you need

Before you start, make sure you have:

* **Node.js 20.9+** (required for Next.js 16)
* **pnpm** (the package manager)
* **A PostgreSQL database** (Supabase recommended)
* **At least one AI provider key** — OpenAI, Google Gemini, Anthropic, Groq, xAI, or DeepSeek

## Setup

<Tabs>
  <Tab title="Quick path (recommended)">
    The bootstrap wizard handles the core setup for you.

    <Steps>
      <Step title="Clone the repo">
        ```bash theme={null}
        git clone https://github.com/fdarkaou/anotherwrapper-premium your-app-name
        cd your-app-name
        rm -rf .git
        git init -b main
        ```

        This gives you a fresh copy with clean git history.
      </Step>

      <Step title="Run the setup wizard">
        ```bash theme={null}
        pnpm bootstrap
        ```

        The wizard walks you through the core setup:

        * Checks your Node version
        * Runs `pnpm install`
        * Sets `NEXT_PUBLIC_APP_URL`
        * Auto-generates `BETTER_AUTH_SECRET`
        * Configures `DATABASE_URL` and runs migrations
        * Sets up your first AI provider and optional extra providers
        * Optionally configures Replicate, ElevenLabs, email, OAuth, analytics, storage, payments, and Sentry
      </Step>

      <Step title="Start the app">
        ```bash theme={null}
        pnpm dev
        ```

        Open [http://localhost:3000](http://localhost:3000) and you're live.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Manual path">
    Prefer to do it yourself? Use `.env.example` as the reference and create `.env.local` manually.

    <Steps>
      <Step title="Clone and install">
        ```bash theme={null}
        git clone https://github.com/fdarkaou/anotherwrapper-premium your-app-name
        cd your-app-name
        rm -rf .git
        git init -b main
        pnpm install
        ```
      </Step>

      <Step title="Create .env.local with the minimum config">
        ```env theme={null}
        NEXT_PUBLIC_APP_URL=http://localhost:3000
        BETTER_AUTH_SECRET=your-secret-here
        DATABASE_URL=postgresql://...
        ```

        Plus at least one AI provider:

        <CodeGroup>
          ```env OpenAI theme={null}
          OPENAI_API_KEY=sk-...
          ```

          ```env Google AI theme={null}
          GOOGLE_GENERATIVE_AI_API_KEY=...
          ```

          ```env Anthropic theme={null}
          ANTHROPIC_API_KEY=sk-ant-...
          ```
        </CodeGroup>

        Groq, xAI, and DeepSeek also work if you prefer them as your first provider.
      </Step>

      <Step title="Set up the database">
        Point `DATABASE_URL` at any PostgreSQL provider. Supabase is recommended — it supports `pgvector` and all the extensions this repo needs.

        ```bash theme={null}
        pnpm db:migrate
        ```

        <Warning>
          If you copy the connection string from Supabase, replace the literal `[YOUR-PASSWORD]` placeholder with your actual database password.
        </Warning>
      </Step>

      <Step title="Optionally add auth email and Google OAuth">
        For magic link and forgot password:

        ```env theme={null}
        NEXT_PUBLIC_EMAIL_PROVIDER=resend
        EMAIL_PROVIDER=resend
        AUTH_EMAIL_FROM="YourApp <auth@yourdomain.com>"
        ```

        For Google sign-in:

        ```env theme={null}
        GOOGLE_CLIENT_ID=...
        GOOGLE_CLIENT_SECRET=...
        NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=true
        ```

        Register these callbacks in Google Cloud:

        * `http://localhost:3000/api/auth/callback/google`
        * `https://yourdomain.com/api/auth/callback/google`

        <Tip>
          `NEXT_PUBLIC_EMAIL_PROVIDER` controls whether the auth UI exposes magic links and password reset. `EMAIL_PROVIDER` is the server-side provider selection and can override the public value when needed.
        </Tip>
      </Step>

      <Step title="Start the app">
        ```bash theme={null}
        pnpm dev
        ```
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Important things to know

<Warning>
  `BETTER_AUTH_SECRET` is required in every environment. Missing it breaks session handling immediately. The bootstrap wizard generates one for you automatically.
</Warning>

<Note>
  The document/RAG features need `pgvector` support in your Postgres database. The repo enables the extension in its migration history, but your database provider must actually allow `CREATE EXTENSION vector`.
</Note>

<Info>
  Supabase PostgreSQL is the recommended database host. It supports all required extensions out of the box. Neon, Railway, Render, Fly, and self-hosted Postgres all work too.
</Info>

## Verify your first run

<Check>
  Your setup is working if you can:

  * Open the landing page
  * Sign in with email/password
  * Enter the dashboard
  * Use the chat app with your configured AI provider
  * Use Marketing Plan or Launch Simulator
  * Open the landing page at `/landing`
</Check>

## What's next?

<CardGroup cols={2}>
  <Card title="Database" icon="database" href="/database/overview">
    Understand the PostgreSQL + Drizzle data layer.
  </Card>

  <Card title="Authentication" icon="shield" href="/setup/authentication">
    Add Google OAuth, magic links, and more.
  </Card>

  <Card title="Storage" icon="hard-drive" href="/services/storage">
    Enable uploads and file-backed workflows.
  </Card>

  <Card title="AI SDK" icon="microchip" href="/services/ai-sdk">
    Learn how the AI layer works across apps.
  </Card>

  <Card title="Payments" icon="money-bill" href="/payments/index">
    Start accepting money with Stripe, LemonSqueezy, or Polar.
  </Card>

  <Card title="Deployment" icon="rocket" href="/setup/deployment">
    Ship it to Vercel when you're ready.
  </Card>
</CardGroup>

<AccordionGroup>
  <Accordion title="Common mistakes to avoid">
    * `BETTER_AUTH_SECRET` is missing
    * `DATABASE_URL` is missing
    * Email provider configured without `AUTH_EMAIL_FROM`
    * Google OAuth callback URLs missing `/api/auth/callback/google`
    * Copied `.env.example` to `.env` instead of `.env.local`
    * Storage not configured but expecting uploads to work
    * `NEXT_PUBLIC_ANALYTICS_PROVIDER` using wrong syntax for multiple providers
  </Accordion>
</AccordionGroup>
