Deploy Your Prediction Market in 15 Minutes
This guide will walk you through deploying a production-ready prediction market using Vercel’s one-click deployment and Supabase integration.Prerequisites: You’ll need GitHub and Vercel accounts. Both are free to get started.
Deployment Steps
Fork the Repository
First, star and fork the Kuest repository to your GitHub account:
- Visit github.com/kuestcom/prediction-market
- Click the ⭐ Star button (top right)
- Click Fork to create your own copy
Configure Environment Variables
Before deploying, you need to configure your environment variables. Download and edit the Admin wallets can:This enables WalletConnect v2 for wallet connections (MetaMask, Rainbow, etc.).
.env.example file:- Download
.env.example - Edit the file with your configuration (details below)
- Save it for Step 3 when you’ll import it to Vercel
Required Environment Variables
Kuest CLOB Authentication
Generate your trading credentials at auth.kuest.com by connecting your Polygon wallet:.env
These credentials authenticate your fork with the shared Kuest CLOB (Central Limit Order Book) for order matching.
Admin Configuration
.env
- Access the admin panel at
/admin - Create custom markets
- Configure platform settings and fees
- Manage categories and tags
Reown AppKit (Wallet Connection)
Create a free project at dashboard.reown.com:.env
Better Auth (Session Management)
Generate a random 32-character secret at better-auth.com:.env
Cron Secret
Create a random secret (16+ characters) for securing your cron jobs:.env
Optional Environment Variables
Image Optimization
.env
Monitoring (Sentry)
Optional error tracking and monitoring:.env
Deploy to Vercel
Now deploy your forked repository to Vercel:
- Go to vercel.com/new
- Click Add New → Project
- Import your forked repository (connect GitHub if needed)
- In the import modal, expand Environment Variables
- Click Import .env and select your edited
.env.examplefile - Click Deploy
- Wait for deployment to complete (2-3 minutes)
- Click Continue to Dashboard
The first deployment will succeed but won’t be functional yet - we need to add the database in Step 4.
Create Supabase Database
Vercel provides one-click Supabase integration:
- In your Vercel project, navigate to Storage tab
- Click Create Database → Supabase
- Accept default settings (creates a Supabase account if you don’t have one)
- Click Create
- After creation completes, click Connect Project
- Creates a Supabase project
- Sets up PostgreSQL database
- Configures Supabase Storage bucket
- Adds connection environment variables to Vercel
Supabase provides 500MB database and 1GB storage on the free tier - perfect for getting started.
Redeploy with Database
Now that the database is connected, redeploy to initialize the schema:
- Go to the Deployments tab
- Find your latest deployment
- Click the three dots (…) menu
- Select Redeploy
- Confirm and wait for deployment to complete
- Run database migrations
- Initialize database schema
- Sync initial market data
- Make your prediction market fully functional
Enable Fork Sync (GitHub Actions)
Keep your fork updated with upstream changes:
- In your forked repository on GitHub, go to Settings → Actions → General
- Under “Actions permissions”, select Allow all actions and reusable workflows
- Click Save
Complete Admin Setup
Your prediction market is now live! Complete the setup:
- Visit your deployed site (find the URL in Vercel dashboard)
- Connect your wallet (must be one of the
ADMIN_WALLETS) - Navigate to Admin → General
- Configure:
- Company name and branding
- Trading fees and affiliate settings
- Theme colors and logos
- Default language and localization
The admin panel is only accessible to wallets listed in the
ADMIN_WALLETS environment variable.Your Market is Live! 🎉
Congratulations! You now have a fully functional prediction market. Here’s what you can do next:Create Markets
Learn how to create custom prediction markets
Customize Branding
Update colors, logos, and theme settings
Configure Fees
Set custom trading fees for your fork
API Integration
Build trading bots with our APIs
Optional: Add Custom Domain
Want to use your own domain? In Vercel:- Go to Settings → Domains
- Add your custom domain
- Follow DNS configuration instructions
- Wait for DNS propagation (5-30 minutes)
Custom domains are included in Vercel’s free tier!
Alternative Deployment Options
While Vercel + Supabase is the fastest path, Kuest supports multiple deployment targets:Docker
Self-host with Docker Compose
Kubernetes
Deploy to any Kubernetes cluster
Cloud Run
Google Cloud Run deployment
Fly.io
Deploy to Fly.io edge network
Troubleshooting
Deployment fails with database error
Ensure you completed Step 5 (Redeploy with Database). The first deployment won’t work without database connection.”Admin access denied” error
Verify your wallet address is correctly added toADMIN_WALLETS in Vercel environment variables:
- Go to Vercel → Settings → Environment Variables
- Check
ADMIN_WALLETSvalue matches your wallet address (case-insensitive) - Redeploy if you made changes
Markets not loading
Check the cron jobs are running:- Vercel → Deployments → Latest deployment logs
- Look for
/api/sync/endpoint calls - Ensure
CRON_SECRETis set correctly
Wallet connection fails
VerifyREOWN_APPKIT_PROJECT_ID is set correctly:
- Check dashboard.reown.com
- Copy the Project ID from your AppKit project
- Update environment variable in Vercel
- Redeploy
Next Steps
Now that your prediction market is deployed:- Architecture: Understand how everything works together
- Configuration: Explore all configuration options
- Features: Learn about market types and trading features
- Operations: Create and manage markets