Skip to content

HenryLodge/FairOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FairOps

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.


Features

  • 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.).

Tech stack

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

Repository structure

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

Prerequisites

  • 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

Getting started

1. Clone and install

git clone https://github.com/HenryLodge/FairOps.git
cd FairOps/fairops
npm install

2. Database (Supabase)

  1. Create a project at supabase.com.
  2. In the SQL Editor, run the contents of fairops/supabase/schema.sql.
  3. Run any migrations in fairops/supabase/migrations/ if present.
  4. In Project Settings ? API, copy the project URL and the service_role key (keep it secret).

3. Auth0

  1. Create an application at auth0.com (e.g. Regular Web Application).
  2. Set Allowed Callback URLs to https://fair-ops.vercel.app/api/auth/callback (and http://localhost:3000/api/auth/callback for local dev).
  3. Set Allowed Logout URLs and Allowed Web Origins to https://fair-ops.vercel.app (and http://localhost:3000 for local dev).
  4. Copy Domain, Client ID, Client Secret. Generate a long random string for AUTH0_SECRET (e.g. openssl rand -hex 32).
  5. (Optional) Configure roles (e.g. organizer / vendor) in Auth0 and map them in your app's claims.

4. Environment variables

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_address

Use your own values; never commit real keys.

5. Run the app

cd fairops
npm run dev

Open 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.


Deploy (e.g. Vercel)

  1. Push the repo and import it in Vercel.
  2. Set Root Directory to fairops.
  3. Add the same environment variables in the Vercel project (Production / Preview).
  4. Set APP_BASE_URL to your deployment URL (e.g. https://your-app.vercel.app).
  5. In Auth0, add that URL to Allowed Callback URLs, Logout URLs, and Web Origins.
  6. Deploy; the build runs next build from the fairops directory.

License

Private / all rights reserved unless otherwise stated.

About

AI-powered operations platform for events to replace spreadsheets, paper maps, and cash promises with AI-optimized layouts, on-chain vendor payments, comprehensive dashboards | HackBeanpot 2026

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors