A collaborative cooking game built with Next.js, Supabase, and AI-powered recipe testing.
The Glitch Kitchen is a multiplayer game where brigades (teams) work together to reconstruct a recipe by collecting and decoding fragments. The game features real-time collaboration, AI-powered recipe validation, and multiple game modes.
- Frontend: Next.js 14 (App Router), React, TypeScript
- Styling: Tailwind CSS, shadcn/ui components
- Database: Supabase (PostgreSQL with real-time subscriptions)
- AI: Google Gemini / OpenAI for recipe testing
- State Management: Zustand
- Deployment: Docker, Docker Compose
- Node.js 20+
- npm or yarn
- Supabase account
- Gemini or OpenAI API key
- Clone the repository:
git clone <your-repo-url>
cd the-glitch-kitchen- Install dependencies:
npm install-
Set up environment variables:
- Copy
.env.exampleto.env.local - Fill in your Supabase credentials and API keys
- Copy
-
Set up the database:
- Create a Supabase project
- Run the SQL script from
supabase_schema.sqlin the Supabase SQL Editor
-
Run the development server:
npm run dev├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── admin/ # Admin dashboard
│ │ ├── gm/ # Game Master interface
│ │ ├── player/ # Player interface
│ │ ├── staff/ # Staff interface
│ │ └── api/ # API routes
│ ├── components/ # React components
│ ├── lib/ # Utilities and Supabase client
│ ├── hooks/ # Custom React hooks
│ └── store/ # Zustand state management
├── supabase_schema.sql # Database schema
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose setup
└── DEPLOYMENT.md # Deployment guide
- Real-time Collaboration: Multiple players can work together in brigades
- AI Recipe Testing: Automated recipe validation using AI
- Fragment System: Collect and decode recipe fragments
- Multiple Roles: Admin, Game Master, Staff, and Player interfaces
- Prestige Points: Competitive ranking system
- Game Logs: Track all game events and actions
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
The database includes:
games- Game sessionsbrigades- Teams/groupsplayers- Individual playersrecipe_notes- Recipe reconstruction progressinventory- Fragment storagecatalog_*- Game content catalogsgame_logs- Event logging
See DEPLOYMENT.md for detailed deployment instructions including:
- Docker deployment
- VPS setup
- Nginx configuration
- SSL setup
- Environment configuration
docker-compose up -d --buildRequired environment variables (see .env.example):
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
GEMINI_API_KEY=your_gemini_api_key
OPENAI_API_KEY=your_openai_api_keyMIT