Skip to main content
The fastest path is: install dependencies, connect Supabase, add the minimum env vars, push migrations, then run pnpm dev.

Minimum Setup

With only the minimum setup, you can already use:
  • Auth with Supabase
  • Chat
  • Structured Output
  • Basic image generation with OpenAI
  • The dashboard, credits, and app shell
  • The landing page at /landing
These features need extra setup later:
  • Storage-backed flows: chat documents, uploads, generated asset history
  • Video Studio: video model credentials + storage
  • Voice Studio: ElevenLabs + storage
  • Payments, email sync, analytics, and Sentry
  • Multi-provider model access beyond OpenAI
  • PDF RAG and embeddings

What You Need

  • Node.js 18+
  • pnpm
  • A Supabase project
  • An OpenAI API key

1. Clone And Install

git clone https://github.com/fdarkaou/anotherwrapper-premium
cd anotherwrapper-premium
pnpm install

2. Create Your Env File

Use .env.local for local development:
cp .env.example .env.local
Then set the minimum required values:
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
NEXT_SUPABASE_SERVICE_KEY=...
OPENAI_API_KEY=...
The server-side Supabase key in this repo is NEXT_SUPABASE_SERVICE_KEY. Using the wrong variable name is one of the most common setup mistakes.
pnpm exec supabase login
pnpm exec supabase init
pnpm exec supabase link --project-ref your-project-ref
If you already have supabase/config.toml, you can skip pnpm exec supabase init.

4. Configure Supabase Auth URLs

In Supabase, open Authentication -> URL Configuration and set:
  • Site URL: http://localhost:3000
  • Redirect URL: http://localhost:3000/auth/confirm
For production, add your real domain too:
  • https://yourdomain.com
  • https://yourdomain.com/auth/confirm
The app completes sign-in through /auth/confirm, then redirects into the final post-auth flow automatically.

5. Push The Database Schema

pnpm exec supabase db push
This creates the core tables used by auth, profiles, purchases, credits, generations, chat history, and document flows, including the vector-search pieces used by document chat.

6. Start The App

pnpm dev
Open http://localhost:3000.

Verify Your First Run

If the minimum setup is correct, you should be able to:
  • open the landing page
  • sign in with a magic link
  • enter the dashboard
  • use the chat app
  • use Structured Output
  • open the landing page at /landing

Add Optional Features Next

Common Mistakes

  • NEXT_SUPABASE_SERVICE_KEY is missing or uses the wrong name
  • Supabase redirect URLs do not include /auth/confirm
  • you copied .env.example to .env instead of .env.local
  • storage is not configured, but you expect uploads or generated files to work
  • NEXT_PUBLIC_ANALYTICS_PROVIDER uses the wrong syntax for multiple providers