Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Implements a .NET Core API for generating professional CV/resume PDFs from structured user data using selectable templates.

Architecture

Clean Architecture with 4 layers:

  • Domain: Core entities (CV, PersonalInfo, Education, WorkExperience, Skill, Certification) and service interfaces
  • Application: DTOs, FluentValidation validators, AutoMapper profiles, orchestration services
  • Infrastructure: QuestPDF-based PDF generation with 3 templates (Modern, Classic, Creative)
  • API: RESTful endpoints with Swagger/OpenAPI documentation

Dependencies flow inward: API → Infrastructure → Application → Domain

Key Components

Domain Layer

public interface ICVGeneratorService
{
    Task<byte[]> GeneratePdfAsync(CV cv, CVTemplate template);
}

public enum CVTemplate { Modern, Classic, Creative }

Application Layer

  • Validation: Comprehensive rules (email format, date ranges, GPA bounds, URL validation)
  • Mapping: AutoMapper profiles for DTO ↔ Entity conversion
  • Services: CVService orchestrates validation, mapping, and PDF generation

Infrastructure Layer

Three QuestPDF templates with distinct layouts:

  • Modern: Single-column, blue accents, professional
  • Classic: Traditional centered layout, black/white, formal
  • Creative: Two-column sidebar, purple accents, modern

API Endpoints

POST /api/cv/generate     # Generate PDF from CV data + template selection
GET  /api/cv/templates    # List available templates with descriptions
GET  /api/cv/health       # Health check

Technical Stack

  • .NET 8.0 / ASP.NET Core Web API
  • AutoMapper 12.0.1 (matching versions for DI extensions)
  • FluentValidation 12.1.1
  • QuestPDF 2025.7.4
  • Swagger/OpenAPI

Code Quality

  • Constants extracted for layout dimensions and validation limits
  • Proper async/await throughout
  • Structured error responses with validation details
  • XML documentation for public APIs
  • CodeQL scan: 0 vulnerabilities

Documentation

  • README.md: Getting started, API reference, technology stack
  • ARCHITECTURE.md: Clean Architecture details, SOLID principles, data flow
  • API-EXAMPLES.md: Complete examples (curl, PowerShell, JavaScript, Python)
Original prompt

Design a .NET Core app called CVGenerator to collect user data, validate it, map it, and generate CVs using selectable templates. Use Clean Architecture, SOLID, DI, DTOs, AutoMapper, FluentValidation, and a PDF engine like QuestPDF. Provide folder structure, models, services, API endpoints, template examples, and best-practice code.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 10, 2025 04:31
Co-authored-by: Muhammadulawal <33093903+Muhammadulawal@users.noreply.github.com>
Co-authored-by: Muhammadulawal <33093903+Muhammadulawal@users.noreply.github.com>
Co-authored-by: Muhammadulawal <33093903+Muhammadulawal@users.noreply.github.com>
Co-authored-by: Muhammadulawal <33093903+Muhammadulawal@users.noreply.github.com>
Copilot AI changed the title [WIP] Design .NET Core app for CV generation Implement CVGenerator: Clean Architecture .NET Core CV/Resume Generator with PDF Templates Dec 10, 2025
Copilot AI requested a review from Muhammadulawal December 10, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants