This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
dotnet build
dotnet run # Starts on http://localhost:5089 or https://localhost:7068
dotnet watch run # Hot-reload during developmentNo test projects exist in this solution.
Blazor Web App (.NET 10.0, interactive server rendering) — a Trackmania mini-games site. Currently has one game: "Guess the Map."
App.razor— Root HTML document (replaces the old_Host.cshtml). Contains<HeadOutlet>and<Routes>with@rendermode="InteractiveServer".Routes.razor— Router component that maps URLs to page components.Program.cs— Registers services viaAddRazorComponents().AddInteractiveServerComponents()and maps endpoints viaMapRazorComponents<App>().AddInteractiveServerRenderMode().
- Pages/ — Razor components.
GuessTheMap.razoris the main game with all game logic in its@codeblock (state management, clue progression, API calls). - TmExchangeApi/ — API clients and data models:
TmExchangeApiCaller— callstrackmania.exchangefor map metadataTrackmaniaIoApiCaller— callstrackmania.iofor leaderboard data (world records)StaticIds.cs— hardcoded map IDs and pack definitions (season campaigns + TMGL/World Tour)MapDataModel.cs/TrackManiaMapLeaderboardModel.cs— DTOs
- Shared/ — Layout (
MainLayout.razor) and navigation (NavMenu.razor)
Program.cs registers TmExchangeApiCaller and TrackmaniaIoApiCaller as singletons. Both use static HttpClient instances with a custom User-Agent header.
All API calls require a User-Agent header (set in HttpClientHelpers.cs). Map thumbnails/screenshots come from trackmania.exchange URLs.
Key NuGet packages: ManiaAPI.* (Nadeo/Trackmania API wrappers), TmEssentials (time formatting via TimeInt32), Newtonsoft.Json.