Quick Start
Important: Select your backend configuration below. The setup steps differ
depending on your choice. Following the wrong instructions may result in a
broken setup.
Backend Configuration Options
Before proceeding: You need to choose your backend configuration. The
setup steps differ depending on your choice.
🚀 Hono + Bun (Default) - Recommended
- Backend: Hono web framework
- Runtime: Bun (fast JavaScript runtime)
- Structure: Separate server and web applications
- Environment: Variables in separate files (
server/.envandweb/.env) - Performance: Excellent startup time and memory usage
- 📖 Detailed Setup Guide
⚡ NextAPI + Node
- Backend: Next.js API routes
- Runtime: Node.js
- Structure: API routes within Next.js app
- Environment: Copy all variables from
server/.envtoweb/.env - Performance: Standard Node.js performance
- 📖 Detailed Setup Guide
🔧 Hono + Node
- Backend: Hono web framework
- Runtime: Node.js
- Structure: Separate server and web applications
- Environment: Variables in separate files
- Performance: Good performance with Node.js
- 📖 Detailed Setup Guide
🚀 NextAPI + Bun
- Backend: Next.js API routes
- Runtime: Bun (fast JavaScript runtime)
- Structure: API routes within Next.js app
- Environment: Copy all variables from
server/.envtoweb/.env - Performance: Excellent startup time
- 📖 Detailed Setup Guide
Choose Your Backend Configuration
Default Setup: If you’re new to Builder Box, we recommend starting with
Hono + Bun (the default). It provides the best performance and simplest
setup.
- Review the options above and choose your preferred backend configuration
- Note the key differences in environment variable setup:
- Hono backends: Environment variables go in separate files (
server/.envandweb/.env) - NextAPI backends: Copy ALL variables from
server/.envtoweb/.envbecause API routes run within the Next.js app
- Hono backends: Environment variables go in separate files (
- Follow the setup steps below with your chosen configuration in mind
Important: The setup instructions below work for all configurations, but
pay special attention to the environment variable setup differences mentioned
above.
Prerequisites
Before you begin, make sure you have these installed:Step 1: Project Setup
1.1 Access Your Dashboard
Important: You need to purchase the Builder Box to access the dashboard.
If you haven’t purchased it yet, you can buy it here:
https://www.builderbox.ai/#pricing
-
Visit the Dashboard
- Go to: https://www.builderbox.ai/bought/main
- Log in with your account credentials
-
Verify Access
- Once logged in, you’ll see the main dashboard
- This is where you can create and manage your projects
-
Create Your Project
- Click the “Create Project” button on your dashboard
- You’ll be prompted to fill out a project configuration form
-
Configure Your Project
- Project Name: Choose a descriptive name for your project
- Description: Brief description of what you’re building
- Template Options: Select your preferred configuration options
- Answer any additional questions about your project setup
-
Generate Project
- Click “Create Project” to generate your custom boilerplate
- Wait for the project generation to complete (this may take a moment)
-
Clone Your Project
- After project creation, you’ll see a custom npm install command specific to your project
- the command will look something like this:
- run the command to install the project
- once the project is installed, you’ll see a message that the project is installed successfully
What happens next? After cloning, you’ll have a complete Builder Box
project with all the code, but you still need to configure the various
services (database, authentication, payments, etc.) in the following steps.
Step 2: Environment Configuration
Important Setup Difference: - For Hono backends: Environment variables
go in separate files (
server/.env and web/.env) - For NextAPI
backends: Copy ALL variables from server/.env to web/.env because API
routes run within the Next.js app2.1 Database Setup (Supabase)
What is Supabase? It’s your PostgreSQL database hosting service.Create Main Database
-
Go to Supabase and sign up/login
-
Create a new organization
-
Create a new project
- Choose a name for your project
- Important: Save the database password - you’ll need it later

-
Get your database connection strings:
-
Click “Connect” in the top center of your dashboard
-
Copy both connection strings:
- Transaction pooler (for DATABASE_URL)
- Session pooler (for DIRECT_URL)

-
Click “Connect” in the top center of your dashboard
-
Add to
apps/server/.env:
Create CMS Database
Why a separate database? The CMS needs its own database to keep content separate from your main app data.- Create a second Supabase project following the same steps above
- Get the connection string (you only need one this time)
- Add to
apps/cms/.env:
2.2 Authentication Setup
What is BetterAuth? It handles user login/signup, sessions, and OAuth integrations.Generate Authentication Secret
-
Generate a secure secret:
-
Add to
apps/server/.env:
Google OAuth Setup
Why Google OAuth? It allows users to sign in with their Google accounts.- Visit Google Cloud Console
- Create a new project or select an existing one
-
Enable Google+ API:
- Go to APIs & Services → Library
- Search for “Google+ API” and enable it
-
Set up OAuth credentials:
- Go to APIs & Services → Credentials
- Create OAuth 2.0 Client ID
- Set these values:
- Authorized JavaScript origins:
http://localhost:3000,http://localhost:3001 - Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
- Authorized JavaScript origins:
-
Watch this helpful video for detailed setup:
-
Add to
apps/server/.env:
2.3 Email Service Setup (Resend)
What is Resend? It sends transactional emails like password resets and welcome emails.- Visit Resend and sign up
-
Create an API Key:
- Go to API Keys section
- Click “Create API Key”
- Copy the key (starts with
re_)
-
Add to
apps/server/.env:
2.4 Payment Setup (Stripe)
What is Stripe? It handles all payment processing, subscriptions, and billing.Basic Stripe Setup
- Visit Stripe and login
-
Enable Test Mode (toggle in top right)
-
Get your Secret Key:
- Go to Developers → API Keys
- Copy the Secret Key (starts with
sk_test_)
-
Add to
apps/server/.env:
Webhook Setup (Optional but Recommended)
Why webhooks? They notify your app when payments succeed or fail.-
Install ngrok (for local development):
-
In Stripe Dashboard:
- Go to Developers → Webhooks → Add Endpoint
- Enter your ngrok URL:
https://your-ngrok-url.ngrok.io/api/webhooks/stripe - Select events or choose “Send all events”
-
Copy the Webhook Signing Secret and add to
apps/server/.env:
2.5 AI Integration (OpenRouter)
What is OpenRouter? It provides access to multiple AI models through a single API.- Go to OpenRouter
- Create a new API key
- Copy the API key
- Add to
apps/server/.env:
2.6 CMS Secret Generation
What is the CMS? It’s your content management system for blog posts, pages, etc.-
Generate a secure secret:
-
Add to
apps/cms/.env:
2.7 Frontend Configuration
Configure the frontend app to connect to your backend services. Add toapps/web/.env:
Step 3: Database Migration
Set up your database tables using Prisma (database toolkit).3.1 Run Database Setup
What these commands do: -
prisma generate: Creates the database client
code - prisma migrate dev: Creates and applies database migrations - prisma db push: Ensures all schema changes are appliedStep 4: Launch Your App! 🚀
4.1 Start All Services
Since this is a turborepo project, you can start all services with a single command:- Backend Server on port 3000
- Frontend App on port 3001
- CMS on port 3003
Turborepo Magic: The
bun dev command runs all three services in parallel
automatically. You’ll see logs from all services in one terminal window.4.2 Alternative: Individual Services
If you prefer to run services separately (for debugging or development), you can use individual terminals:4.3 Access Your Apps
- Frontend: http://localhost:3001
- Backend API: http://localhost:3000
- CMS: http://localhost:3003
Environment Variables Summary
Here’s a complete overview of all the environment variables you should have configured:Server Environment (apps/server/.env)
Web Environment (apps/web/.env)
CMS Environment (apps/cms/.env)
Troubleshooting
Common Issues
🔥 “Database connection failed”- Double-check your Supabase connection strings
- Ensure your database is running
- Verify you copied the correct pooler URLs
- Make sure your Google OAuth URLs are correct
- Check that your BETTER_AUTH_SECRET is properly set
- Verify Google+ API is enabled
- Ensure you’re in Stripe test mode
- Check that your webhook endpoint is correct
- Verify your product price ID is accurate
- Kill existing processes:
lsof -ti:3000 | xargs kill -9 - Or use different ports in your environment variables
Next Steps
🎉 Congratulations! Your Builder Box is now running. Here’s what you can do next:- Customize the frontend - Edit components in
apps/web/src/components - Add API endpoints - Create new routes in
apps/server/src/routes - Configure CMS - Add content types in
apps/cms/src/collections - Set up production - Deploy to Vercel, Railway, or your preferred platform
- Add features - Extend with additional integrations and functionality