Skip to content

Enes-CE/AI-Powered_Cover_Letter_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AI-Powered Cover Letter Generator

Upload your CV. Paste the job description. Get a tailored, interview-ready cover letter in seconds.

Tired of sending the same generic cover letter to every job? This tool analyzes your CV against each specific job posting, identifies skill matches and gaps, then generates a personalized cover letter β€” in your tone, in your language.

Next.js FastAPI TypeScript Python Ollama

Demo β€’ Features β€’ Tech Stack β€’ Installation β€’ Usage β€’ API


πŸ“Έ Demo & Screenshots

🎨 Modern UI with Dark Blue Theme

Main Interface

Beautiful glassmorphism design with animated background elements and Turkish interface

Features shown in this screenshot:

  • Job Posting Section: Large text area for pasting job descriptions
  • Form Fields: Company name, position title, years of experience, key achievements
  • CV/Resume Section: Text area with PDF upload functionality
  • Generation Settings: Tone selection (Formal) and variant count (2 Variants)
  • Modern Design: Dark blue gradient background with glassmorphism effects
  • Turkish Interface: Localized UI elements and labels

🎯 Application Interface with Sample Data

Application Interface

Real application interface showing Turkish job posting and CV data

What's displayed in this screenshot:

  • Job Posting: "KΔ±demli YazΔ±lΔ±m MΓΌhendisi - Full Stack Geliştirme" with detailed requirements
  • Form Data: TechCorp company, 6 years experience, Senior Software Engineer position
  • CV Content: Professional summary in Turkish with technical skills and work experience
  • PDF Upload: Drag & drop area for CV upload with automatic text extraction
  • Generation Options: Formal tone selected, 2 variants to generate
  • Modern UI: Dark blue gradient with glassmorphism design elements

πŸ€– AI-Powered Generation

AI Generation AI Generation

Real-time cover letter generation with skill matching analysis

πŸ“„ PDF Upload & Export

PDF Features

Seamless PDF upload and professional export options

πŸ“Š Smart Analysis Dashboard

Analysis Dashboard

Comprehensive skill matching and job analysis


✨ Features

πŸ€– AI-Powered Intelligence

  • Local LLM Integration: Uses Ollama with Llama 3.1 8B for high-quality, privacy-focused AI generation
  • Smart NLP Processing: Advanced skill extraction and matching using SpaCy
  • Multi-language Support: Generate cover letters in Turkish and English
  • Context-Aware Generation: AI understands job requirements and CV content

🎨 Modern User Experience

  • Dark Blue Theme: Professional glassmorphism design with animated elements
  • Responsive Design: Perfect experience on desktop, tablet, and mobile
  • Smooth Animations: Beautiful transitions and hover effects
  • Intuitive Interface: User-friendly form with smart validation

πŸ“„ Advanced Document Handling

  • PDF Upload: Drag & drop CV PDFs with automatic text extraction
  • Multi-format Export: Download as PDF or DOCX with professional formatting
  • Batch Generation: Create multiple cover letter variants with different tones
  • Real-time Preview: See generated content before export

πŸ“Š Smart Analysis & Matching

  • Skill Extraction: AI identifies key skills from job postings and CVs
  • Match Analysis: Shows skill compatibility with confidence scores
  • Gap Analysis: Identifies missing skills and provides recommendations
  • Experience Mapping: Aligns your experience with job requirements

πŸ”„ Flexible Generation Options

  • Tone Selection: Choose from Formal, Friendly, or Concise writing styles
  • Multi-variant: Generate 1-5 different cover letter versions
  • Custom Instructions: Add specific requirements or preferences
  • Real-time Generation: Fast, responsive AI-powered content creation

πŸ› οΈ Tech Stack

Frontend

Technology Version Purpose
Next.js 14.0.4 React framework with App Router
TypeScript 5.0 Type-safe JavaScript
Tailwind CSS 3.3 Utility-first CSS framework
Lucide React 0.263.1 Beautiful icon library

Backend

Technology Version Purpose
FastAPI 0.104.1 Modern Python web framework
Ollama Latest Local LLM for AI generation
SpaCy 3.7.5 Industrial-strength NLP
PyPDF2 3.0.1 PDF text extraction
ReportLab 4.0.7 PDF generation
python-docx 1.1.0 DOCX generation

πŸš€ Installation

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Ollama (for local AI generation)

Quick Start

  1. Clone the repository
git clone https://github.com/Enes-CE/AI-Powered_Cover_Letter_Generator.git
cd AI-Powered_Cover_Letter_Generator
  1. Install Ollama
# macOS/Linux
curl -fsSL https://ollama.ai/install.sh | sh

# Download Llama 3.1 8B model
ollama pull llama3.1:8b
  1. Backend Setup
cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python -m spacy download en_core_web_sm
  1. Frontend Setup
cd frontend
npm install
  1. Start the Application
# Terminal 1: Start Backend
cd backend
source venv/bin/activate
python -c "import uvicorn; from main import app; uvicorn.run(app, host='0.0.0.0', port=8003)"

# Terminal 2: Start Frontend
cd frontend
npm run dev
  1. Open Application

πŸ“ Usage Guide

Step 1: Enter Job Information

  • Job Posting: Paste the complete job description
  • Company Name: Enter the company name
  • Position Title: Specify the job title
  • Years of Experience: Your relevant experience
  • Key Achievements: Highlight your accomplishments

Step 2: Add Your CV

  • Text Input: Paste your CV content directly
  • PDF Upload: Drag & drop or select a PDF file
  • Auto-extraction: Text is automatically extracted from PDFs

Step 3: Configure Generation

  • Writing Tone: Choose Formal, Friendly, or Concise
  • Number of Variants: Generate 1-5 different versions
  • Custom Instructions: Add specific requirements (optional)

Step 4: Generate & Export

  • Generate: Click to create AI-powered cover letters
  • Review: Check the generated content and analysis
  • Export: Download as PDF or DOCX
  • Copy: Copy to clipboard for immediate use

πŸ”§ Configuration

AI Provider Settings

# backend/app/settings.py
AI_PROVIDER = "ollama"  # ollama | openai | template
OLLAMA_MODEL = "llama3.1:8b"
AI_TIMEOUT = 180  # seconds

Frontend API Configuration

// frontend/src/lib/api.ts
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8003';

Environment Variables

# Backend
AI_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.1:8b
AI_TIMEOUT=180

# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8003

πŸ“š API Documentation

Core Endpoints

Generate Cover Letter

POST /api/generate-cover-letter
Content-Type: application/json

{
  "job_posting": {
    "job_posting_text": "Senior Software Engineer position..."
  },
  "cv_data": {
    "cv_text": "Experienced developer with 5+ years..."
  },
  "company_name": "TechCorp",
  "position_title": "Senior Software Engineer",
  "years_of_experience": "5 years",
  "key_achievements": "Led team of 5 developers...",
  "tone": "formal",
  "variants": 2
}

Extract CV Text from PDF

POST /api/extract-cv-text
Content-Type: multipart/form-data

file: [PDF file]

Export to PDF

POST /api/export-pdf
Content-Type: application/json

{
  "cover_letter": "Generated cover letter text...",
  "company_name": "TechCorp",
  "position_title": "Senior Software Engineer"
}

Export to DOCX

POST /api/export-docx
Content-Type: application/json

{
  "cover_letter": "Generated cover letter text...",
  "company_name": "TechCorp",
  "position_title": "Senior Software Engineer"
}

πŸ—οΈ Project Structure

AI-Powered_Cover_Letter_Generator/
β”œβ”€β”€ πŸ“ backend/                    # FastAPI backend
β”‚   β”œβ”€β”€ πŸ“ app/
β”‚   β”‚   β”œβ”€β”€ πŸ“ api/               # API endpoints
β”‚   β”‚   β”‚   └── cover_letter.py   # Main API routes
β”‚   β”‚   β”œβ”€β”€ πŸ“ models/            # Pydantic models
β”‚   β”‚   β”‚   └── schemas.py        # Request/response schemas
β”‚   β”‚   β”œβ”€β”€ πŸ“ services/          # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ ai_service.py     # AI service interface
β”‚   β”‚   β”‚   β”œβ”€β”€ ollama_service.py # Ollama integration
β”‚   β”‚   β”‚   └── spacy_service.py  # NLP processing
β”‚   β”‚   └── settings.py           # Configuration
β”‚   β”œβ”€β”€ requirements.txt          # Python dependencies
β”‚   β”œβ”€β”€ main.py                   # FastAPI app entry
β”‚   └── railway.json              # Railway deployment config
β”œβ”€β”€ πŸ“ frontend/                   # Next.js frontend
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ app/              # App Router pages
β”‚   β”‚   β”‚   └── page.tsx         # Main application page
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/       # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ ExportButtons.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PdfUpload.tsx
β”‚   β”‚   β”‚   └── Toast.tsx
β”‚   β”‚   └── πŸ“ lib/              # Utilities
β”‚   β”‚       └── api.ts           # API client
β”‚   β”œβ”€β”€ package.json             # Node.js dependencies
β”‚   β”œβ”€β”€ tailwind.config.js       # Tailwind configuration
β”‚   └── vercel.json              # Vercel deployment config
β”œβ”€β”€ README.md                     # Project documentation
└── .gitignore                   # Git ignore rules

πŸ§ͺ Testing

Backend Testing

cd backend
source venv/bin/activate
pytest

Frontend Testing

cd frontend
npm test

API Testing

# Health check
curl http://localhost:8003/health

# Generate cover letter
curl -X POST http://localhost:8003/api/generate-cover-letter \
  -H "Content-Type: application/json" \
  -d '{"job_posting":{"job_posting_text":"Test job"}, "cv_data":{"cv_text":"Test CV"}, "tone":"formal"}'

πŸ’Ό Need Something Similar Built?

I build custom AI-powered tools and ML solutions for businesses β€” from predictive models and NLP pipelines to full-stack AI applications like this one.


GitHub stars GitHub forks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors