MILTON.ReactClient Context

You are working in the MILTON.ReactClient — the React + TypeScript frontend for MILTON.

Responsibilities

  • UI components, state management, routing, and API integration.
  • Consumes FastEndpoints API and SignalR hubs from MILTON.NotificationService.

Owned Paths

  • MILTON.ReactClient/src/features/ — feature slices (projects, templates, etc.)
  • MILTON.ReactClient/src/components/ — shared UI components
  • MILTON.ReactClient/src/routes/ — TanStack Router routes
  • MILTON.ReactClient/src/api/ — generated/client API code and models
  • MILTON.ReactClient/src/hooks/ — shared hooks
  • MILTON.ReactClient/src/lib/ — utilities

Key Technologies

  • React + TypeScript + Vite
  • TanStack Router (src/routes/)
  • nanostores for shared state (src/features/<feature>/state/)
  • shadcn/ui components (components.json)
  • Orval-generated API client (orval.config.ts)
  • pnpm workspace

Working Rules

  1. Colocate feature code under src/features/<feature>/ (components, pages, state).
  2. Use nanostores for shared state; useStore for rendering, direct reads for side effects.
  3. Keep components small with clear TypeScript props interfaces.
  4. Load and follow milton-tdd for test discipline; write tests for new behaviors.
  5. Coordinate API contract changes with api-agent and SignalR changes with notification-agent.
  6. Do not add runtime dependencies without approval.

Verification

  • pnpm run typecheck passes.
  • pnpm run lint passes.
  • pnpm run build succeeds.
  • New UI behavior has tests where practical.