This file is the canonical repository instruction file for coding agents working in this repository. If similar guidance exists in CLAUDE.md or other tool-specific files, keep this file as the primary source of truth.
This is a .NET 10 web application that monitors Azure Blob Storage via the Azurite emulator for incoming XML order files, transforms them to JSON, and writes output back to blob storage. It includes a React UI for viewing processed orders and uploading new files.
- Pipeline flow:
Parse XML -> Validate -> Map Fields -> Transform to JSON -> Store - Dependency injection: services are registered via interfaces in
Program.cs - Background processing:
BlobPollingWorkerpolls blob storage on a timer - Backend API: Minimal API endpoints list, view, upload, and track orders
- Frontend UI: React single-page app served from
wwwrootin production or the Vite dev server in development
src/OrderTransformer/Worker/TransformationPipeline.cs- Orchestrates the processing pipelinesrc/OrderTransformer/Worker/BlobPollingWorker.cs- Polls blob storage for new filessrc/OrderTransformer/Models/OrderModels.cs- Domain models using immutable recordssrc/OrderTransformer/Services/- Service interfaces and implementationssrc/OrderTransformer/Api/OrderEndpoints.cs- Order browsing and upload endpointssrc/OrderTransformer/Api/StatusEndpoints.cs- Upload status endpoint stubui/- React frontend applicationspecs/- Feature specs, design docs, ADRs, and test plans
src/OrderTransformer/Services/OrderValidatorService.cs- Order validation rulessrc/OrderTransformer/Services/FieldMappingService.cs- Display-value mappingsrc/OrderTransformer/Api/StatusEndpoints.cs- Processing status endpointtests/OrderTransformer.Tests/Services/OrderValidatorServiceTests.cs- Validation teststests/OrderTransformer.Tests/Services/FieldMappingServiceTests.cs- Mapping tests
ui/src/hooks/useProcessingStatus.ts- Polling hook for upload statusui/src/components/ProcessingStatus.tsx- Status display componentui/src/api/client.ts-getStatus()implementation
- Treat
specs/as the source of truth for planned work - Read the relevant feature spec before implementing changes
- Keep feature specs focused on business requirements and acceptance criteria
- Put implementation structure, file touchpoints, and test strategy in matching design docs under
specs/design/
- Use records with
initsetters when matching existing models - Follow the existing interface plus implementation service pattern
- Preserve the current namespace structure
- Use xUnit with
[Fact]and[Theory]for tests - Use
System.Text.Jsonfor serialization - Use
System.Xml.Linqfor XML parsing
- Use TypeScript strict mode and avoid
any - Define explicit API response types where needed
- Use functional components with hooks
- Use TailwindCSS for styling
- Use React Router v7 for navigation
- Route frontend API calls through
ui/src/api/client.ts
- Prefer extending existing patterns over introducing new abstractions
- Keep invalid-order handling non-fatal unless a spec explicitly changes that behavior
- For feature work, preserve existing behavior outside the requested scope
- Add or update tests when changing backend or frontend behavior
# .NET
dotnet build src/OrderTransformer
dotnet test tests/OrderTransformer.Tests
dotnet run --project src/OrderTransformer
# UI
cd ui && pnpm install
cd ui && pnpm dev
cd ui && pnpm build
# Docker
docker compose up -d
docker compose --profile app up --build -d