AI-powered operations for fairs, carnivals, and festivals. Built at HackBeanpot 2026.
FairOps replaces spreadsheets and cash handshakes with AI layout optimization, Solana escrow payments, and a unified organizer/vendor dashboard.
- AI layout generation ? Draw a venue boundary on a map; Gemini generates an optimized, color-coded layout (vendor type, space, power, safety).
- Layout refinement ? Natural language feedback (e.g. "Move food vendors near the entrance") to regenerate the layout.
- Solana escrow ? Vendors pay booth fees in SOL; funds held in escrow until approval; auto-refund on reject.
- Vendor portal ? Apply for booths, connect Phantom wallet, track application and payment status.
- Organizer dashboard ? Review/approve vendors, draw venue boundaries (Leaflet), run AI optimize, track payments.
- AI copilot ? Conversational assistant for event data (vendor mix, revenue, safety checklist, etc.).
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4 |
| Maps | Leaflet, React-Leaflet, Leaflet-Draw |
| Auth | Auth0 (organizer / vendor roles) |
| Database | Supabase (PostgreSQL) |
| AI | Google Gemini (layout + chat) |
| Payments | Solana (devnet), Phantom, @solana/web3.js |
| Server | @napi-rs/canvas for boundary image generation |
FairOps/
??? fairops/ # Next.js app (run and deploy from here)
? ??? app/ # Routes, API, layout, pages
? ??? components/ # UI and dashboard components
? ??? lib/ # Supabase, Auth0, Gemini, Solana, canvas helpers
? ??? supabase/ # schema.sql, migrations
? ??? package.json
??? projdocs/ # Pitch and project docs
??? README.md # This file
- Node.js 20+
- Supabase project (for PostgreSQL)
- Auth0 application (for login and roles)
- Google AI API key (Gemini) from Google AI Studio
- Solana ? devnet for development; Phantom or other wallet for testing payments
git clone https://github.com/HenryLodge/FairOps.git
cd FairOps/fairops
npm install- Create a project at supabase.com.
- In the SQL Editor, run the contents of
fairops/supabase/schema.sql. - Run any migrations in
fairops/supabase/migrations/if present. - In Project Settings ? API, copy the project URL and the service_role key (keep it secret).
- Create an application at auth0.com (e.g. Regular Web Application).
- Set Allowed Callback URLs to
https://fair-ops.vercel.app/api/auth/callback(andhttp://localhost:3000/api/auth/callbackfor local dev). - Set Allowed Logout URLs and Allowed Web Origins to
https://fair-ops.vercel.app(andhttp://localhost:3000for local dev). - Copy Domain, Client ID, Client Secret. Generate a long random string for
AUTH0_SECRET(e.g.openssl rand -hex 32). - (Optional) Configure roles (e.g. organizer / vendor) in Auth0 and map them in your app's claims.
In fairops/, create .env.local (do not commit it). Example:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://YOUR_PROJECT.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Auth0
AUTH0_DOMAIN=your-tenant.us.auth0.com
AUTH0_CLIENT_ID=your_client_id
AUTH0_CLIENT_SECRET=your_client_secret
AUTH0_SECRET=your_long_random_secret
APP_BASE_URL=https://fair-ops.vercel.app
# Google Gemini
GEMINI_API_KEY=your_gemini_api_key
# Solana (devnet for dev)
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
ESCROW_WALLET_SECRET_KEY=your_escrow_wallet_secret_key
NEXT_PUBLIC_ESCROW_WALLET_ADDRESS=your_escrow_public_addressUse your own values; never commit real keys.
cd fairops
npm run devOpen https://fair-ops.vercel.app. Sign in with Auth0, create an event, draw a venue, and use the vendor flow and AI optimize from the dashboard.
- Push the repo and import it in Vercel.
- Set Root Directory to
fairops. - Add the same environment variables in the Vercel project (Production / Preview).
- Set
APP_BASE_URLto your deployment URL (e.g.https://your-app.vercel.app). - In Auth0, add that URL to Allowed Callback URLs, Logout URLs, and Web Origins.
- Deploy; the build runs
next buildfrom thefairopsdirectory.
Private / all rights reserved unless otherwise stated.