A real-time multiplayer flashcard game built with Next.js, Supabase, and MongoDB.
- Multiplayer Gameplay: Real-time synchronization between players
- Room-based System: Create or join game rooms with unique codes
- User Authentication: Secure login/signup with Supabase
- Score Tracking: Live scoring and game history
- Responsive Design: Works on desktop and mobile
- Professional Email Templates: Beautiful confirmation emails
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB (game history), Supabase (auth)
- Real-time: Supabase Realtime
- Deployment: Render
- Create Account: Sign up or play as guest
- Create/Join Room: Generate a room code or join existing room
- Answer Questions: Race to answer flashcard questions correctly
- Score Points: Earn points for correct answers
- View History: Check your past game results
Create a .env.local file with:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# MongoDB
MONGODB_URI=your_mongodb_connection_string# Clone repository
git clone https://github.com/skdas20/FlashCards.git
# Install dependencies
npm install
# Run development server
npm run dev- Connect your GitHub repository to Render
- Set environment variables in Render dashboard
- Deploy automatically from main branch
- Node Version: 18.x or higher
- Build Command:
npm install && npm run build - Start Command:
npm start
Professional email templates are included in /email-templates/:
confirm-signup.html- Account confirmationinvite.html- User invitationsrecovery.html- Password reset
Copy these to your Supabase dashboard under Authentication > Email Templates.
src/
├── app/
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
│ ├── game/ # Game room pages
│ └── history/ # Game history
├── components/ # React components
├── lib/ # Utilities and configurations
└── data/ # Static data (flashcards)
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is open source and available under the MIT License.
Live Demo: [Coming Soon on Render]
Repository: https://github.com/skdas20/FlashCards