A web-based RPG game set in a Wizard school. Battle fellow wizards, collect gold, bet on broom races, and join fellowships!
- Docker & Docker Compose
# Production-like build
docker compose up --build
# Open the game
open http://localhost:3000
# API docs (Swagger)
open http://localhost:5000/swagger# Uses docker-compose.override.yml automatically
docker compose up --build
# Frontend dev server: http://localhost:5173
# Backend API: http://localhost:5000
# Database: localhost:5432Wizard-RPG/
├── backend/ # C# .NET 8 Web API
│ ├── WizardRPG.Api/ # Main API project
│ │ ├── Controllers/ # REST endpoints
│ │ ├── Services/ # Business logic
│ │ ├── Models/ # EF Core entities
│ │ ├── DTOs/ # Data transfer objects
│ │ ├── Hubs/ # SignalR WebSocket hubs
│ │ └── Data/ # DbContext + seed data
│ ├── WizardRPG.Tests.Unit/ # xUnit unit tests
│ └── WizardRPG.Tests.Integration/ # Integration tests
├── frontend/ # Vue 3 + TypeScript
│ ├── src/
│ │ ├── views/ # Page components
│ │ ├── stores/ # Pinia state stores
│ │ ├── components/ # Reusable components
│ │ ├── router/ # Vue Router config
│ │ └── api/ # Axios + API types
│ └── tests/e2e/ # Playwright E2E tests
├── docker-compose.yml # Production config
└── docker-compose.override.yml # Dev overrides (hot reload)
| Feature | Description |
|---|---|
| 🔐 Authentication | Register/Login with JWT tokens |
| 💰 Gold Coins | Earn gold through battles and fellowships |
| 🏦 Bank | Deposit gold and store magical items |
| 🧹 Broom Game | Bet on broom league races |
| 🤝 Fellowships | Join guilds with referral links for steady income |
| ⚔️ Battles | Turn-based spell battles between wizards |
| 📖 Narrator | LLM-powered story narration for battles |
| 👑 Admin Panel | Game Master controls and player management |
| Method | Path | Description |
|---|---|---|
| POST | /api/auth/register | Register new player |
| POST | /api/auth/login | Login and receive JWT |
| GET | /api/player/me | Get current player profile |
| GET | /api/bank | Get bank account info |
| POST | /api/bank/deposit | Deposit gold to bank |
| POST | /api/bank/withdraw | Withdraw gold from bank |
| GET | /api/broomgame/leagues | List broom leagues |
| POST | /api/broomgame/bet | Place a bet |
| GET | /api/fellowship | Get current fellowship |
| POST | /api/fellowship | Create a fellowship |
| POST | /api/fellowship/join | Join via referral code |
| POST | /api/battle/challenge | Challenge a player |
| POST | /api/battle/{id}/cast | Cast a spell in battle |
| GET | /api/admin/players | List all players (admin) |
Full API documentation available at /swagger when running.
cd backend
dotnet test# Start the app first
docker compose up -d
cd frontend
npx playwright testcd backend
dotnet restore
# Update appsettings.Development.json with your local PostgreSQL connection
dotnet run --project WizardRPG.Apicd frontend
npm install
npm run devSee docs/IMPROVEMENT_IDEAS.md for a comprehensive list of planned features and improvement proposals, including:
- 🏆 Ranking System — ELO ratings, rank tiers, seasonal leaderboards
- 🏠 House System — Four houses with house points, inter-house competitions, and house cups
- 🤝 Collaboration — Group quests, cooperative boss battles, fellowship wars, mentorship
- 📈 Player Growth — Referral rewards, onboarding tutorial, social sharing, demo mode
- 🎯 Engagement — Daily quests, achievements, seasonal events, login rewards
Screenshots are auto-generated by Playwright E2E tests after each test run.
- Backend: C# .NET 8, ASP.NET Core, Entity Framework Core, SignalR
- Database: PostgreSQL 16
- Frontend: Vue 3, TypeScript, Vite, Pinia, Tailwind CSS
- Real-time: SignalR WebSockets
- Tests: xUnit, Moq, Playwright
- Infrastructure: Docker, Docker Compose