Initial commit: TrueCV CV verification platform
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>
This commit is contained in:
39
src/TrueCV.Domain/Entities/CVCheck.cs
Normal file
39
src/TrueCV.Domain/Entities/CVCheck.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using TrueCV.Domain.Enums;
|
||||
|
||||
namespace TrueCV.Domain.Entities;
|
||||
|
||||
public class CVCheck
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(512)]
|
||||
public string OriginalFileName { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(2048)]
|
||||
public string BlobUrl { get; set; } = string.Empty;
|
||||
|
||||
public CheckStatus Status { get; set; }
|
||||
|
||||
public string? ExtractedDataJson { get; set; }
|
||||
|
||||
public int? VeracityScore { get; set; }
|
||||
|
||||
public string? ReportJson { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
|
||||
// Navigation properties
|
||||
[ForeignKey(nameof(UserId))]
|
||||
public User User { get; set; } = null!;
|
||||
|
||||
public ICollection<CVFlag> Flags { get; set; } = new List<CVFlag>();
|
||||
}
|
||||
31
src/TrueCV.Domain/Entities/CVFlag.cs
Normal file
31
src/TrueCV.Domain/Entities/CVFlag.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using TrueCV.Domain.Enums;
|
||||
|
||||
namespace TrueCV.Domain.Entities;
|
||||
|
||||
public class CVFlag
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid CVCheckId { get; set; }
|
||||
|
||||
public FlagCategory Category { get; set; }
|
||||
|
||||
public FlagSeverity Severity { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(256)]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(2048)]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public int ScoreImpact { get; set; }
|
||||
|
||||
// Navigation property
|
||||
[ForeignKey(nameof(CVCheckId))]
|
||||
public CVCheck CVCheck { get; set; } = null!;
|
||||
}
|
||||
24
src/TrueCV.Domain/Entities/CompanyCache.cs
Normal file
24
src/TrueCV.Domain/Entities/CompanyCache.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace TrueCV.Domain.Entities;
|
||||
|
||||
public class CompanyCache
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(32)]
|
||||
public string CompanyNumber { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(512)]
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(64)]
|
||||
public string Status { get; set; } = string.Empty;
|
||||
|
||||
public DateOnly? IncorporationDate { get; set; }
|
||||
|
||||
public DateOnly? DissolutionDate { get; set; }
|
||||
|
||||
public DateTime CachedAt { get; set; }
|
||||
}
|
||||
24
src/TrueCV.Domain/Entities/User.cs
Normal file
24
src/TrueCV.Domain/Entities/User.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TrueCV.Domain.Enums;
|
||||
|
||||
namespace TrueCV.Domain.Entities;
|
||||
|
||||
public class User
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(256)]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public UserPlan Plan { get; set; }
|
||||
|
||||
[MaxLength(256)]
|
||||
public string? StripeCustomerId { get; set; }
|
||||
|
||||
public int ChecksUsedThisMonth { get; set; }
|
||||
|
||||
// Navigation property
|
||||
public ICollection<CVCheck> CVChecks { get; set; } = new List<CVCheck>();
|
||||
}
|
||||
9
src/TrueCV.Domain/Enums/CheckStatus.cs
Normal file
9
src/TrueCV.Domain/Enums/CheckStatus.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TrueCV.Domain.Enums;
|
||||
|
||||
public enum CheckStatus
|
||||
{
|
||||
Pending,
|
||||
Processing,
|
||||
Completed,
|
||||
Failed
|
||||
}
|
||||
9
src/TrueCV.Domain/Enums/FlagCategory.cs
Normal file
9
src/TrueCV.Domain/Enums/FlagCategory.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace TrueCV.Domain.Enums;
|
||||
|
||||
public enum FlagCategory
|
||||
{
|
||||
Employment,
|
||||
Education,
|
||||
Timeline,
|
||||
Plausibility
|
||||
}
|
||||
8
src/TrueCV.Domain/Enums/FlagSeverity.cs
Normal file
8
src/TrueCV.Domain/Enums/FlagSeverity.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TrueCV.Domain.Enums;
|
||||
|
||||
public enum FlagSeverity
|
||||
{
|
||||
Info,
|
||||
Warning,
|
||||
Critical
|
||||
}
|
||||
8
src/TrueCV.Domain/Enums/UserPlan.cs
Normal file
8
src/TrueCV.Domain/Enums/UserPlan.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace TrueCV.Domain.Enums;
|
||||
|
||||
public enum UserPlan
|
||||
{
|
||||
Free,
|
||||
Professional,
|
||||
Enterprise
|
||||
}
|
||||
13
src/TrueCV.Domain/TrueCV.Domain.csproj
Normal file
13
src/TrueCV.Domain/TrueCV.Domain.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user