Use IDbContextFactory pattern to create isolated DbContext instances
for each cache operation, making parallel verification thread-safe.
Changes:
- Add IDbContextFactory<ApplicationDbContext> registration
- Update CompanyVerifierService to use factory for cache operations
- Update tests with InMemoryDatabaseRoot for shared test data
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features:
- Add UK institution recognition (170+ universities)
- Add diploma mill detection (100+ blacklisted institutions)
- Add education verification service with date plausibility checks
- Add local file storage option (no Azure required)
- Add default admin user seeding on startup
- Enhance Serilog logging with file output
Security fixes:
- Fix path traversal vulnerability in LocalFileStorageService
- Fix open redirect in login endpoint (use LocalRedirect)
- Fix password validation message (12 chars, not 6)
- Fix login to use HTTP POST endpoint (avoid Blazor cookie issues)
Code improvements:
- Add CancellationToken propagation to CV parser
- Add shared helpers (JsonDefaults, DateHelpers, ScoreThresholds)
- Add IUserContextService for user ID extraction
- Parallelized company verification in ProcessCVCheckJob
- Add 28 unit tests for education verification
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Docker configuration:
- Dockerfile: Multi-stage build with non-root user, health checks
- Dockerfile.migrations: Runs EF Core migrations on startup
- docker-compose.yml: Full stack with SQL Server, Azurite, app
- .dockerignore: Optimized build context
- .env.example: Template for API keys
Application changes:
- Added /health endpoint with EF Core database check
- Conditional HTTPS redirect (disabled in containers)
- DOTNET_RUNNING_IN_CONTAINER environment detection
Usage:
cp .env.example .env # Add your API keys
docker-compose up -d # Start all services
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates database schema for:
- ASP.NET Core Identity (users, roles, claims, tokens)
- ApplicationUser with Plan, StripeCustomerId, ChecksUsedThisMonth
- CVChecks with status tracking and indexes
- CVFlags for verification flags
- CompanyCache for Companies House API caching
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clean architecture solution with:
- Domain: Entities (User, CVCheck, CVFlag, CompanyCache) and Enums
- Application: Service interfaces, DTOs, and models
- Infrastructure: EF Core, Identity, Hangfire, external API clients, services
- Web: Blazor Server UI with pages and components
Features:
- CV upload and parsing (PDF/DOCX) using Claude API
- Employment verification against Companies House API
- Timeline analysis for gaps and overlaps
- Veracity scoring algorithm
- Background job processing with Hangfire
- Azure Blob Storage for file storage
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>