Wiki / Fork Your Instance

Fork Your Instance

Run your own copy of the BARs Engine. This guide walks you through forking the repo, configuring your environment, and deploying to Vercel in under 30 minutes.

1. Fork the repository

Go to the BARs Engine GitHub repository and click Fork. This creates your own copy of the codebase under your GitHub account.

github.com/johnair01/bars-engine

2. Set up your database

Create a free PostgreSQL database on Railway, Supabase, or Neon. Copy the connection string — you'll need it as DATABASE_URL.

3. Configure environment variables

You'll need: DATABASE_URL (PostgreSQL), OPENAI_API_KEY (for AI generation), NEXTAUTH_SECRET (any random string), and ENABLE_LOBBY=true (to access your Game Lobby).

4. Deploy to Vercel

Connect your forked repo to Vercel. Add your environment variables in the Vercel dashboard. Vercel will build and deploy automatically.

5. Import your config bundle

If you were given a config bundle by the host, go to /admin and use the import tool to seed your instance with the same configuration.

6. Create your first instance

Go to /lobby (as an admin) and click "Create new instance" to run the Instance Creation Wizard. Your game is live.