Calculates NZ income tax, ACC levy, and KiwiSaver contributions from an annual salary.
Single container — the .NET API serves the React frontend from wwwroot/.
docker-compose up --build- App + API: http://localhost:3000
- Swagger UI: http://localhost:3000/swagger
Frontend types are generated from the OpenAPI spec at Docker build time — no manual sync required.
To regenerate locally after an API change (requires Docker to be running):
cd web
npm run generate:typesThis hits http://localhost:3000/swagger/v1/swagger.json and writes src/types/api.generated.ts. Commit the updated file so the contract change is visible in the PR diff.
dotnet test api/API (api/) — ASP.NET Core (.NET 10), controller + service + repository layers.
TaxController— validates input, delegates to serviceTaxCalculationService— pure calculation logic, injected viaITaxCalculationService- Repository pattern for configuration data (
ITaxBandRepository,IAccSettingsRepository,IKiwiSaverRateRepository) — currently in-memory, swappable for database persistence - xUnit tests covering all tax bands, ACC, KiwiSaver, and net pay calculations
- Serves the React SPA from
wwwroot/in Docker viaUseStaticFiles()+MapFallbackToFile
Frontend (web/) — React 19 + TypeScript + Vite.
- CSS Modules with CSS custom properties for design tokens
- TanStack Query for API calls with caching
- React Compiler enabled for automatic memoisation
- Strict type-aware ESLint rules (
strictTypeChecked+eslint-plugin-react-x)
