A modern web implementation of the popular word association board game Codenames, built with Next.js, TypeScript, and Supabase.
- Real-time multiplayer gameplay using Supabase Realtime
- Modern, responsive UI built with Tailwind CSS and Radix UI
- Server-side authentication and game state management
- Type-safe development with TypeScript
- Dark/light theme support
- Frontend Framework: Next.js 15
- Language: TypeScript
- Styling: Tailwind CSS and Shadcn UI
- UI Components: Radix UI
- State Management: React Hooks with use-immer
- Form Handling: React Hook Form with Zod validation
- Backend & Real-time: Supabase
- Package Manager: pnpm
- Node.js (Latest LTS version recommended)
- pnpm package manager
- Supabase account and project
- Docker and Docker Compose (for local Supabase development)
- Install the Supabase CLI:
# Using npm
npm install -g supabase
# Or using Homebrew (macOS)
brew install supabase/tap/supabase- Start the local Supabase development environment:
supabase startThis will:
- Start a local Supabase instance using Docker
- Create a local database with the schema defined in
supabase/schemas/ - Set up local API endpoints and authentication
- Generate local API credentials
- Update your
.env.localfile to use local Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0- To stop the local Supabase instance:
supabase stop- To reset the local database:
supabase db reset- To view the local Supabase dashboard:
supabase dashboard- Clone the repository:
git clone https://github.com/marlanperumal/codenames.git
cd codenames- Install dependencies:
pnpm install- Set up environment variables:
Create a
.env.localfile in the root directory with your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key- Generate Supabase types:
pnpm supabase-gen-typesRun the development server:
pnpm devOpen http://localhost:3000 with your browser to see the result.
pnpm build
pnpm start/app- Next.js app router pages and layouts/components- Reusable React components/hooks- Custom React hooks/lib- Utility functions and shared logic/public- Static assets/utils- Helper functions and type definitions/supabase- Supabase configuration and migrations
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Original Codenames board game by Vlaada Chvátil
- Next.js team for the amazing framework
- Supabase team for the real-time database solution