A relegation survival football management game inspired by Championship Manager 01/02. You take over a struggling side at gameweek 19 with 19 games to survive relegation.
Live on GitHub Pages: https://craftkeg.github.io/relman/
- Squad selection, formation, and tactical instructions
- Text-based match engine with live commentary
- League table, fixtures, and results
- AI-powered pre-match press room with journalist questions and manager replies
- AI assistant manager tactical brief and dressing-room team talks
- AI half-time pundit panel and post-match press conferences via Azure OpenAI
- Auto-save and career history
npm install
npm run devRuns on http://localhost:5173/relman/.
For AI features, create .env.local:
VITE_AZURE_FOUNDRY_ENDPOINT=https://your-resource.cognitiveservices.azure.com
VITE_AZURE_FOUNDRY_DEPLOYMENT=your-deployment
AZURE_FOUNDRY_API_KEY=your-key
The top five European leagues use real player names and positions. Each has its own JSON file:
- English Premier League — src/players-epl.json
- Italian Serie A — src/players-seriea.json
- Spanish La Liga — src/players-laliga.json
- French Ligue 1 — src/players-ligue1.json
- German Bundesliga — src/players-bundesliga.json
The Scottish Premiership uses generated names.
To add or remove a player, edit the JSON directly. Each entry is {"nm": "Player Name", "pos": "CODE"}. Valid position codes:
GK— goalkeeperDL,DC,DR— left/centre/right defenderDM— defensive midfielderMC,ML,MR— central/left/right midfielderAM— attacking midfielderST— striker
Team keys must match src/teams.json exactly. The loader prints a console warning on startup if a team is missing, a key is unknown, or a name is duplicated within a team.
Changes only apply to new careers — in-progress saves keep their existing squads. After editing, start a new career to see the updated squads. Pitch view displays the surname only via .split(" ").pop(), so "Virgil van Dijk" shows as "Dijk".
The GitHub Pages build is static, so the AI features need a server-side proxy to hold the API key. An Azure Function in api/ handles this.
- Create an Azure Function App (Node.js 18+, Consumption plan)
- Set app settings:
AZURE_FOUNDRY_ENDPOINT— your Azure OpenAI resource URLAZURE_FOUNDRY_API_KEY— API key from Azure PortalAZURE_FOUNDRY_DEPLOYMENT— model deployment name (default:gpt-oss-120b)
- Deploy the
api/folder (VS Code Azure extension,func azure functionapp publish, or GitHub Actions) - Set
VITE_PRESS_API_URLin the GitHub Pages build environment to your function URL, e.g.https://your-func.azurewebsites.net/api/press-conference
No function needed locally — the Vite dev proxy handles it via .env.local.
- Vite + React
- GitHub Pages (deploy on push to
main) - Azure Function (press conference AI proxy)
MIT