This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Never commit to git unless explicitly instructed to
- Keep internal plans, research, reviews and implementation notes in the private
devkit/docs/repository. Do not create or commit an internaldocs/tree in this public repository. - This application does not support hot-reload — rebuild to see changes
- Do NOT add
Co-Authored-Bylines to commit messages - Do NOT add "Generated with Claude" / AI-attribution footers to PR bodies or GitHub issue/PR comments
- When adding/changing public component API (new params, components, or features), add a demo example in
demos/BlazorBlueprint.Demo.Shared(live example +CodeExamples/.../*.txtsnippet + API Reference entry) — don't just temp-add an example to test and then revert it - Always create a new branch from
developwhen starting work, unless explicitly told otherwise
# Accept new API surface snapshots after reviewing .received.txt files
# (copy .received.txt → .verified.txt in tests/BlazorBlueprint.Tests/ApiSurface/)
./scripts/run-tests.sh --accept
# Demo apps — each host is pinned to its own port
dotnet run --project demos/BlazorBlueprint.Demo.Server # port 7172
dotnet run --project demos/BlazorBlueprint.Demo.Wasm # port 7173
dotnet run --project demos/BlazorBlueprint.Demo.Auto # port 7174Tailwind CSS: Built automatically during dotnet build via standalone CLI (tools/tailwindcss.exe). Input: src/BlazorBlueprint.Components/wwwroot/css/blazorblueprint-input.css → Output: wwwroot/blazorblueprint.css.
Two-layer component library inspired by shadcn/ui and Radix UI, targeting .NET 10 Blazor (Server, WASM, and Auto render modes): Primitives are headless and unstyled, Components are styled and built on top of them.
Components → Primitives + Icons.Lucide (ProjectReference locally, PackageReference when packing for NuGet).
Components inherit directly from ComponentBase (no custom base class). Text inputs (Input, Textarea, InputGroupInput, InputGroupTextarea) implement their own Value/ValueChanged pattern rather than InputBase<T>.
Overlay components (Dialog, Sheet, Popover, Tooltip, etc.) render through <PortalHost /> which must be placed in the root layout. Uses IPortalService + FloatingPortal + IPositioningService for positioning.
Tests use Verify (snapshot testing) to detect unintended public API changes. When you add/change/remove public API:
- Run tests — they will fail with a
.received.txtdiff - Review the diff in
tests/BlazorBlueprint.Tests/ApiSurface/ - Accept: copy
.received.txt→.verified.txt(or run./scripts/run-tests.sh --accept)
Style is enforced mechanically by .editorconfig + TreatWarningsAsErrors — the build is the source of truth, so it isn't restated here. The one convention the config does not enforce:
- Private fields:
camelCasewith no underscore prefix (deliberately unlike the common C#_camelCasedefault)