Skip to content

d-stel/copilot-course-cv-processor

Repository files navigation

CV & IFU Skill Extraction Tool

A full-stack application that processes employee CVs, extracts structured data using GitHub Copilot API, and stores it in a SQLite database.

πŸš€ Quick Start

This repository contains two main projects:

  • Frontend: React-based SPA built with Vite
  • Backend: .NET 9 Web API with Entity Framework Core

Prerequisites

Configuration

1. Set up GitHub Copilot API Token

cd backend
dotnet user-secrets init
dotnet user-secrets set "GitHubCopilot:ApiToken" "your-github-token-here"

Or alternatively, update backend/appsettings.Development.json:

{
  "GitHubCopilot": {
    "ApiToken": "your-github-token-here"
  }
}

2. Initialize Database

cd backend
dotnet ef database update

The database file cvprocessor.db will be created automatically on first run.

Running the Application

1. Start the Backend

cd backend
dotnet run

The API will be available at:

  • HTTP: http://localhost:5024
  • HTTPS: https://localhost:7239
  • Swagger UI (dev only): http://localhost:5024/swagger

2. Start the Frontend

In a new terminal:

cd frontend
npm install
npm run dev

The web application will be available at http://localhost:5173

πŸ“– Usage

  1. Upload a CV:

    • Navigate to the home page
    • Click "Choose File" or drag & drop a PDF file
    • Click "Upload CV" to process
  2. Review Processed CVs:

    • Click "Review CVs" in the navigation
    • View list of all processed CVs
    • Click "View Details" to see extracted data
  3. View CV Details:

    • See personal information
    • Review education history
    • Browse work experience and responsibilities
    • Toggle JSON view to see original API response

πŸ“ Project Structure

copilot-course-cv-processor/
β”œβ”€β”€ frontend/              # React + TypeScript + Vite
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # UI components
β”‚   β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”‚   β”œβ”€β”€ services/      # API integration
β”‚   β”‚   └── types/         # TypeScript definitions
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/               # .NET 10 Web API
β”‚   β”œβ”€β”€ Controllers/       # API controllers
β”‚   β”œβ”€β”€ Models/           # Data models
β”‚   β”œβ”€β”€ Services/         # Business logic
β”‚   └── Program.cs
β”‚
└── README.md

πŸ› οΈ Technology Stack

Frontend

  • React 19 - Latest React with modern features
  • TypeScript 5.9 - Type safety
  • Vite 7.2 - Fast build tool and dev server
  • React Router 6 - Client-side routing
  • ESLint - Code quality and linting

Backend

  • .NET 9 - Latest .NET framework
  • ASP.NET Core Web API - RESTful API
  • Entity Framework Core 9 - ORM for database access
  • SQLite - Lightweight database
  • OpenAPI - API documentation
  • CORS - Frontend integration

Integration

  • GitHub Copilot API - AI-powered CV data extraction
  • User Secrets - Secure API token storage

πŸ“š Documentation

🎯 Features

  • βœ… PDF CV upload with drag & drop support
  • βœ… AI-powered data extraction using GitHub Copilot API
  • βœ… Structured data storage in SQLite database
  • βœ… Personal information extraction
  • βœ… Education history parsing
  • βœ… Work experience with responsibilities
  • βœ… CV list view with pagination
  • βœ… Detailed CV view with formatted display
  • βœ… JSON data toggle for debugging
  • βœ… Delete CV functionality
  • βœ… RESTful API architecture
  • βœ… TypeScript for type safety
  • βœ… Responsive UI design
  • βœ… Print-friendly CV layout
  • βœ… Error handling and validation
  • βœ… Loading states and user feedback

πŸ”§ Development

Frontend Development

cd frontend
npm run dev      # Start dev server
npm run build    # Build for production
npm run lint     # Run ESLint

Backend Development

cd backend
dotnet run           # Run the application
dotnet build         # Build the project
dotnet watch run     # Run with auto-reload

πŸ“ API Endpoints

CV Processing

  • POST /api/cv/upload - Upload and process a PDF CV
  • GET /api/cv/list - Get all processed CVs (paginated)
  • GET /api/cv/{id} - Get specific CV by ID
  • GET /api/cv/latest - Get most recently processed CV
  • GET /api/cv/search - Search CVs by name or email
  • DELETE /api/cv/{id} - Delete a processed CV

Health & Status

  • GET /api/cv/health - Health check
  • GET /api/cv/copilot/validate - Validate GitHub Copilot API connection

Legacy Endpoints

  • GET /api/skills/health - Skills service health check
  • POST /api/skills/extract - Extract skills from document

πŸ—„οΈ Database Schema

The application uses SQLite with the following tables:

  • ProcessedCVs - Main CV records with metadata and JSON storage
  • PersonalInformation - Personal details (1:1 with ProcessedCV)
  • Education - Education history entries (1:N with ProcessedCV)
  • WorkExperience - Work experience entries (1:N with ProcessedCV)
  • WorkResponsibilities - Individual responsibilities (1:N with WorkExperience)

🚧 Troubleshooting

GitHub Copilot API Connection Issues

If you encounter "GitHub Copilot API unavailable" messages:

  1. Verify your API token is set correctly
  2. Check token has required permissions
  3. Test connection at /api/cv/copilot/validate
  4. The system will fall back to placeholder data if API fails

Database Issues

If database operations fail:

  1. Ensure cvprocessor.db file exists in backend folder
  2. Run dotnet ef database update to apply migrations
  3. Check file permissions
  4. Delete cvprocessor.db and re-run migrations if corrupted

CORS Errors

If frontend cannot connect to backend:

  1. Verify backend is running on http://localhost:5024
  2. Verify frontend is running on http://localhost:5173
  3. Check CORS policy in Program.cs allows frontend origin

🚧 TODO / Future Enhancements

  • Implement actual PDF text extraction (currently placeholder)
  • Add user authentication and authorization
  • Add CV comparison features
  • Add skill extraction and categorization
  • Add export to PDF/Word functionality
  • Add comprehensive unit and integration tests
  • Add CI/CD pipeline
  • Add Docker support
  • Add production deployment configuration
  • Add error monitoring and analytics

πŸ“„ License

This project is part of a Copilot course exercise.

About

Fullstack app to process and summarize CVs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published