Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.65 KB

File metadata and controls

40 lines (24 loc) · 1.65 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Run Commands

# Build entire solution
dotnet build

# Run the web app (default: http://localhost:5125, https://localhost:7140)
dotnet run --project OrdleApp/OrdleApp.csproj

# Run the data processing utility (regenerates word list files)
dotnet run --project SaolDataFixer/SaolDataFixer.csproj

# Publish for release
dotnet publish -c Release OrdleApp/OrdleApp.csproj

There are no test projects in this solution.

Architecture

Swedish Wordle ("Ordle") built with Blazor Server (.NET 10). Two projects in the solution:

  • OrdleApp — Blazor Web App. The game runs as an interactive server-side component over SignalR.
  • SaolDataFixer — Console tool that processes raw Swedish dictionary files (SAOL versions 13/14) into cleaned 5-letter word lists used by OrdleApp.

Data Flow

Word lists are loaded once at startup in Program.cs into singleton services (SaolWords, MatchiWords), each wrapping a HashSet<string> for O(1) lookup. The game component (OrdleGame.razor) injects these services to pick a random target word and validate guesses.

Two word sources are available: SAOL (primary, ~36KB) and Matchi (alternative, ~2.5KB). Only characters A-Z, Å, Ä, Ö are valid.

Component Hierarchy

App.razor (root HTML) → Routes.razor (router) → MainLayout.razorOrdleGame.razor (the entire game lives here at route /).

All game state and logic (guesses, validation, win/loss, color feedback) is in OrdleGame.razor. There is no separate service layer or API — it's a single interactive component.