A Vite + React 2D racing game that teaches Software Engineering skills from beginner to Principal level. Race cars while answering programming questions at checkpoints, with semantic similarity detection to prevent duplicate questions.
- Docker and Docker Compose
- .NET 9 SDK
- Node.js 18+
# Start backend and database
./start-simple.sh
# In a new terminal, start frontend
cd frontend
npm run dev# 1. Start PostgreSQL
docker-compose up -d postgres
# 2. Setup database
cd backend
dotnet ef database update
cd ..
# 3. Start backend
cd backend
dotnet run --launch-profile http
# Backend will be available at http://localhost:5000
# 4. In a new terminal, start frontend
cd frontend
npm run dev
# Frontend will be available at http://localhost:5173- Start a Race: Click "๐ Start Race"
- Drive: Use arrow keys to control your car
- โ Arrow: Accelerate
- โ Arrow: Brake/Reverse
- โ โ Arrows: Steer
- Answer Questions: Hit orange checkpoints to trigger programming quizzes
- Lives System: You have 3 lives - lose one for each wrong answer
- Spectator Mode: After 3 wrong answers, watch the AI complete the race
- Leaderboard: Complete races are ranked by time and score
- Game Engine: PIXI.js 60 FPS 2D rendering
- State Management: Zustand with async API integration
- Styling: Tailwind CSS
- Real-time Communication: API calls with planned SignalR integration
- APIs: Minimal APIs with Entity Framework Core 9
- Database: PostgreSQL with EF Core migrations
- Semantic Similarity: Cosine similarity for question uniqueness
- Real-time: SignalR hubs for multiplayer features
- โ 60 FPS racing with physics
- โ 10-second quiz countdown
- โ Spectator mode after 3 wrong answers
- โ Score submission and leaderboard
- โ Semantic question similarity detection
- โ Real-time multiplayer foundation
GET /health- Health checkPOST /v1/sessions- Create new race sessionPATCH /v1/sessions/{id}/answer- Submit quiz answerGET /v1/questions/random- Get random questionGET /v1/leaderboards- Get top 10 leaderboardPOST /v1/admin/seed- Seed sample questions
# Test API health
curl http://localhost:5000/health
# Get a random question
curl http://localhost:5000/v1/questions/random
# View leaderboard
curl http://localhost:5000/v1/leaderboardsThe docker-compose.yml includes:
- PostgreSQL 16: Primary database
- Milvus: Vector database for semantic similarity (planned)
cd backend
dotnet build
dotnet test
dotnet runcd frontend
npm install
npm run dev
npm run buildIf you see "Cannot find module @rollup/rollup-*", run:
cd frontend
rm -rf node_modules package-lock.json
npm installBackend should run on port 5000. Check backend/Properties/launchSettings.json if needed.
Ensure PostgreSQL is running:
docker-compose up -d postgresThis is the Minimal Playable Game (MPG) implementation. Future enhancements include:
- User authentication and profiles
- Advanced multiplayer with live race spectating
- Full Milvus vector database integration
- Cloud deployment (Azure AKS)
- Mobile app (React Native)
- AI-generated questions
MIT License - see LICENSE file for details.