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

# Installation

> Clone the repo, install dependencies, push the schema, run dev.

Vibestrap is a standard Next.js 15 monorepo using pnpm. If you've shipped a
Next.js app before, none of this will surprise you.

## Prerequisites

* **Node.js** ≥ 22 — the build uses Edge runtime features that require recent V8.
* **pnpm** ≥ 10 — `corepack enable` then `corepack prepare pnpm@latest --activate`,
  or follow [pnpm.io/installation](https://pnpm.io/installation).
* **PostgreSQL** — local Postgres for dev (Postgres.app on macOS, `brew install postgresql`,
  or Docker). For production: [Neon](https://neon.tech), [Supabase](https://supabase.com),
  [Railway](https://railway.app), [Crunchy Bridge](https://www.crunchybridge.com) — any of
  them work.

## 1. Clone & install

```bash theme={null}
git clone https://github.com/your-fork/vibestrap.git
cd Vibestrap
pnpm install
```

The lockfile is committed — don't run `pnpm install --no-frozen-lockfile` unless you mean to
upgrade. CI uses `--frozen-lockfile`.

## 2. Configure environment

```bash theme={null}
cp .env.example .env.local
```

Open `.env.local` and set at minimum:

```bash theme={null}
DATABASE_URL=postgres://localhost/vibestrap
BETTER_AUTH_SECRET=<32+ random chars, e.g. `openssl rand -base64 32`>
```

Every other env is optional in dev — the corresponding module either no-ops or logs a
friendly warning when its keys are missing. See [Env reference](/env-reference) for
the full list.

## 3. Push the schema

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

This diffs your Drizzle schema (`src/db/*.schema.ts`) against the database and applies the
changes directly. Use it for dev. For production, see
[Deploying to Vercel](/deployment/vercel) → "Database migrations".

## 4. Run dev

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

Open `http://localhost:3000`. The marketing site renders, the AI chat demo works
(`/demos/chat` runs on the offline mock provider), and you can sign up an admin user
via `/register`.

## 5. Sanity-check the install

```bash theme={null}
pnpm typecheck && pnpm lint && pnpm test
```

All three should pass on a fresh install. If anything fails, check
[SUPPORT.md](https://github.com/xiaohu0x/vibestrap/blob/main/SUPPORT.md) for the
common-pitfalls list.

## What's next

* [Quickstart](/quickstart) — wire your own product in 10 minutes
* [Configuration](/configuration) — what `src/config/site.ts` controls
* [Deploying to Vercel](/deployment/vercel) — push to prod
