Battle Royale Snake — compete against 15 AI opponents in a 30-second arena.
PoSnakeGame/
├── web/ # React 19 + Vite + Tailwind CSS v4
│ └── src/
│ ├── components/ # GameCanvas, HighScoreModal, HighScoreTable
│ ├── pages/ # HomePage, GamePage, DiagPage
│ └── lib/api.ts # API client with offline fallback
├── PoSnakeGame.Api/ # .NET 10 API (high scores, health, diag)
├── PoSnakeGame.Core/ # Domain models (HighScore) & interfaces
├── PoSnakeGame.Infrastructure/ # Azure Table Storage repositories
├── tests/
│ ├── PoSnakeGame.Tests.Unit/ # xUnit — model tests
│ ├── PoSnakeGame.Tests.Integration/# xUnit — API + Testcontainers
│ └── e2e/ # Playwright E2E (TypeScript)
└── infra/ # Bicep IaC for Azure deployment
# 1. Start Azurite (local Azure Storage emulator)
azurite --silent --location ./AzuriteData
# 2. Start the API
dotnet run --project PoSnakeGame.Api
# 3. Start the React dev server
cd web && npm install && npm run devOpen http://localhost:5173 to play.
| Method | Route | Description |
|---|---|---|
| GET | /health |
Health check (JSON) |
| GET | /diag |
Diagnostics (masked secrets) |
| GET | /api/highscores?count=10 |
Top scores |
| POST | /api/highscores |
Submit score |
| GET | /api/highscores/check/{score} |
Check if score qualifies |
| GET | /openapi/v1.json |
OpenAPI spec |
| GET | /swagger |
Scalar API docs |
# Unit tests
dotnet test tests/PoSnakeGame.Tests.Unit
# Integration tests (requires Docker for Testcontainers)
dotnet test tests/PoSnakeGame.Tests.Integration
# E2E tests (requires API + React running)
cd tests/e2e && npx playwright test- Frontend: React 19, Vite 6, Tailwind CSS v4, TypeScript
- Backend: .NET 10 Minimal API, Serilog, OpenTelemetry
- Storage: Azure Table Storage (Azurite for local dev)
- Testing: xUnit, FluentAssertions, Testcontainers, Playwright
- Infra: Azure Static Web Apps + App Service, Bicep IaC