Code fixed

This commit is contained in:
Yaojia Wang
2026-02-13 10:31:54 +01:00
parent 26d0c41203
commit f319c6e772
34 changed files with 18234 additions and 16670 deletions

View File

@@ -24,18 +24,45 @@ frontend/ -- React SPA (Vite dev server :5173)
docs/ -- Architecture, API, DB schema docs (Chinese)
```
## Compiler Constraints
`Directory.Build.props` enforces globally -- all code must satisfy:
- `TreatWarningsAsErrors` enabled -- zero warnings allowed
- `Nullable` enabled -- all reference types are non-nullable by default, use `?` for nullable
- `StyleCop.Analyzers` -- code style enforced at build time
- `EnforceCodeStyleInBuild` enabled
## Layer Dependencies (strict)
```
Core -- zero external NuGet deps, no project references
Application -- references Core only. MediatR, AutoMapper, FluentValidation
Infrastructure-- references Application. EF Core, Npgsql, Polly, Azure Storage, Identity
Integrations -- references Core only. HttpClient-based provider implementations
Api -- references Application, Infrastructure, Integrations. Serilog, Swashbuckle
UnitTests -- references Application, Core. xUnit, Moq, FluentAssertions
IntegrationTests -- references Api. WebApplicationFactory, Testcontainers.PostgreSql
```
## Commands
```bash
# Backend
cd backend && dotnet restore && dotnet build
# Infrastructure
docker-compose up -d # PostgreSQL + Redis
# Backend (from backend/)
dotnet restore && dotnet build
dotnet run --project src/FiscalFlow.Api
dotnet test
dotnet test tests/FiscalFlow.UnitTests
dotnet test --collect:"XPlat Code Coverage" # with coverage
# Frontend
cd frontend && npm install
npm run dev
# EF Core migrations (from backend/)
dotnet ef migrations add <Name> --project src/FiscalFlow.Infrastructure --startup-project src/FiscalFlow.Api
dotnet ef database update --project src/FiscalFlow.Infrastructure --startup-project src/FiscalFlow.Api
# Frontend (from frontend/)
npm install && npm run dev
npm run build
npm run lint
```