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

# Quickstart

> Get Sabo running locally in under 10 minutes with this step-by-step installation and setup guide.

<Info>
  This quickstart covers installing Sabo, configuring essential environment variables, running the database migration, and verifying your local setup. For detailed feature configuration (Stripe, PostHog, etc.), see the linked Core Features guides.
</Info>

## Prerequisites

Before you begin, ensure you have the following installed:

<AccordionGroup>
  <Accordion title="Required">
    * **Node.js 18.18+** – Install from [nodejs.org](https://nodejs.org/) or use [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) with `nvm install 18 && nvm use 18`
    * **pnpm** – Enable Corepack (`corepack enable && corepack prepare pnpm@latest --activate`) or follow the [official guide](https://pnpm.io/installation)
    * **Git** – Already bundled on most systems; if missing, install from [git-scm.com](https://git-scm.com/) or via your package manager
  </Accordion>

  <Accordion title="Optional (for full features)">
    * **Supabase account** ([Sign up free](https://supabase.com/))
    * **Stripe account** (test mode is free) ([Sign up](https://stripe.com/))
    * **PostHog account** (optional, for analytics) ([Sign up free](https://posthog.com/))
  </Accordion>
</AccordionGroup>

Prefer installing from the terminal? Use the commands below as a starting point.

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    # Install Node.js 18 via nvm (recommended)
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    source ~/.nvm/nvm.sh
    nvm install 18
    nvm use 18

    # Enable Corepack and install the latest pnpm
    corepack enable
    corepack prepare pnpm@latest --activate

    # Install Git if it's not already available
    brew install git # macOS (Homebrew)
    sudo apt install git # Debian/Ubuntu
    ```
  </Tab>

  <Tab title="Windows (PowerShell)">
    ```powershell theme={null}
    # Install Node.js LTS (includes npm)
    winget install OpenJS.NodeJS.LTS

    # Enable Corepack and activate pnpm
    corepack enable
    corepack prepare pnpm@latest --activate

    # Install Git for Windows
    winget install Git.Git
    ```
  </Tab>
</Tabs>

## Installation

<Steps>
  <Step title="Clone the repository">
    Clone the Sabo repository and navigate into the project directory:

    ```bash theme={null}
    git clone <your-repository-url>
    cd sabo
    ```

    <Note>
      If you purchased Sabo or received access, use the repository URL provided to you.
    </Note>
  </Step>

  <Step title="Install dependencies">
    Install all required packages using pnpm:

    ```bash theme={null}
    pnpm install
    ```

    <Check>
      This installs Next.js 16, React 19, Tailwind CSS 4, and all integrated libraries (\~282KB pnpm-lock.yaml).
    </Check>
  </Step>

  <Step title="Create environment file">
    Create a `.env.local` file in the `sabo` directory. This file stores sensitive configuration and is excluded from version control.

    ```bash theme={null}
    touch .env.local
    ```

    <Warning>
      Never commit `.env.local` to git. It's already included in `.gitignore`.
    </Warning>
  </Step>
</Steps>

***

## Configuration

### Minimal Setup (for UI exploration)

If you just want to explore the UI without authentication or payments, add these minimal variables:

```bash .env.local theme={null}
# Site URL (required)
NEXT_PUBLIC_SITE_URL=http://localhost:3000
```

<Note>
  With this minimal setup, you can browse the marketing site, blog, and changelog, but authentication and protected routes won't work.
</Note>

### Full Setup (recommended)

For a fully functional Sabo installation with authentication and payments:

<Steps>
  <Step title="Set up Supabase for authentication">
    Create a free Supabase project and configure environment variables for user authentication.

    <Check>
      See [Auth with Supabase](/core-features/auth-with-supabase) for detailed setup instructions.
    </Check>
  </Step>

  <Step title="Run database migration">
    Execute the included SQL migration to create user tables and enable Row Level Security.

    <Check>
      The migration creates `user_profiles`, `user_subscriptions`, and `payment_history` tables. See [Database with Supabase](/core-features/database-supabase) for details.
    </Check>
  </Step>

  <Step title="Configure Stripe for payments (optional)">
    Add Stripe test mode keys to enable payment processing and subscription management.

    <Check>
      See [Payments with Stripe](/core-features/payments-with-stripe) for complete setup and webhook configuration.
    </Check>
  </Step>

  <Step title="Add PostHog for analytics (optional)">
    Set up PostHog to track user behavior and feature usage.

    <Check>
      See [Analytics with PostHog](/core-features/analytics-posthog) for configuration and event tracking.
    </Check>
  </Step>
</Steps>

***

## Run Sabo

<Steps>
  <Step title="Start the development server">
    Run the Next.js development server:

    ```bash theme={null}
    pnpm dev
    ```

    <Check>
      The server starts on [http://localhost:3000](http://localhost:3000). Open this URL in your browser.
    </Check>
  </Step>

  <Step title="Verify the installation">
    Test that Sabo is working correctly:

    **Marketing pages (no auth required):**

    * Home page: `http://localhost:3000/`
    * Pricing: `http://localhost:3000/pricing`
    * Contact: `http://localhost:3000/contact`
    * Blog: `http://localhost:3000/blog`
    * Changelog: `http://localhost:3000/changelog`

    **Authentication (requires Supabase setup):**

    * Sign up: `http://localhost:3000/sign-up`
    * Sign in: `http://localhost:3000/sign-in`

    **Dashboard (requires authentication):**

    * Dashboard: `http://localhost:3000/dashboard`
    * Settings: `http://localhost:3000/dashboard/settings/general`

    <Check>
      If you can view the home page and navigate to other marketing pages, your installation is successful!
    </Check>
  </Step>

  <Step title="Test authentication (if Supabase configured)">
    1. Go to `http://localhost:3000/sign-up`
    2. Enter an email and password
    3. Check your email for the verification link
    4. Click the link to verify your account
    5. Sign in at `http://localhost:3000/sign-in`
    6. You should be redirected to `http://localhost:3000/dashboard`

    <Warning>
      If email verification doesn't work, check your Supabase Dashboard → **Authentication → URL Configuration** and ensure the redirect URL is correct.
    </Warning>
  </Step>
</Steps>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Error: Invalid Supabase URL or key">
    **Problem:** The app shows authentication errors or protected pages don't work.

    **Check:**

    * Verify all three Supabase environment variables are set correctly in `.env.local`
    * Ensure there are no extra spaces or quotes around the values
    * Restart the dev server (`pnpm dev`) after changing `.env.local`
    * Check the Supabase Dashboard to confirm your project is active
  </Accordion>

  <Accordion title="Error: Cannot connect to database">
    **Problem:** Settings pages show errors about missing tables.

    **Fix:**

    * Run the database migration (see Step 3 in Full Setup above)
    * Verify tables exist in Supabase Dashboard → **Table Editor**
    * Check that `user_profiles`, `user_subscriptions`, and `payment_history` tables are present
  </Accordion>

  <Accordion title="Email verification not working">
    **Problem:** Signup completes but no verification email arrives.

    **Check:**

    * Go to Supabase Dashboard → **Authentication → URL Configuration**
    * Ensure **Site URL** is `http://localhost:3000`
    * Add `http://localhost:3000/auth/callback` to **Redirect URLs**
    * Check your email spam folder
    * In Supabase Dashboard → **Authentication → Email Templates**, ensure templates are enabled
  </Accordion>

  <Accordion title="OAuth sign-in doesn't work">
    **Problem:** Google/GitHub sign-in redirects fail or show errors.

    **Setup required:**

    * OAuth providers must be configured in Supabase Dashboard
    * Go to **Authentication → Providers**
    * Enable and configure each provider (Google, GitHub, Apple)
    * Add OAuth credentials from each provider's developer console
    * See [Auth with Supabase](/core-features/auth-with-supabase#oauth-setup) for detailed setup
  </Accordion>

  <Accordion title="Port 3000 already in use">
    **Problem:** `pnpm dev` fails because port 3000 is occupied.

    **Fix:**

    ```bash theme={null}
    # Find and kill the process using port 3000
    lsof -ti:3000 | xargs kill

    # Or run on a different port
    pnpm dev -- -p 3001
    ```

    <Note>
      If you change the port, update `NEXT_PUBLIC_SITE_URL` in `.env.local` and restart the server.
    </Note>
  </Accordion>

  <Accordion title="Module not found errors">
    **Problem:** The app shows "Module not found" errors for dependencies.

    **Fix:**

    ```bash theme={null}
    # Clear pnpm cache and reinstall
    rm -rf node_modules
    rm pnpm-lock.yaml
    pnpm install
    ```
  </Accordion>
</AccordionGroup>

***

## Development Commands

Once Sabo is running, use these commands for development:

```bash theme={null}
# Start development server
pnpm dev

# Build for production
pnpm build

# Start production server (requires pnpm build first)
pnpm start

# Run linter
pnpm lint

# Format code
pnpm format

# Run E2E tests
pnpm test:e2e

# Run E2E tests in UI mode
pnpm test:e2e:ui

# Run E2E tests with browser visible
pnpm test:e2e:headed
```

<Tip>
  Run `pnpm build` locally before deploying to catch any build errors early.
</Tip>
