Create Perfect, Professional Cover Letters in Seconds
Demo • Features • Installation • Usage • Contributing
- About
- Demo
- Features
- Screenshots
- Tech Stack
- Prerequisites
- Installation
- Usage
- Project Structure
- API Documentation
- Deployment
- Troubleshooting
- Contributing
- License
- Acknowledgments
CoverCraft AI is a next-generation, AI-powered web application that revolutionizes the job application process. Built with modern JavaScript technologies including Gemini 2.5 Flash AI, Node.js/Express, and Next.js, CoverCraft analyzes your resume and job descriptions to generate perfectly tailored, professional cover letters in under 30 seconds.
- ⚡ Lightning Fast - Generate cover letters in <30 seconds
- 🎯 Highly Personalized - AI analyzes your resume and the job posting
- 🔒 Secure & Private - Your data is encrypted and never stored
- 📄 Google Docs Integration - Export directly to editable Google Docs
- 🎨 Beautiful UI - Modern, dark-themed interface with smooth animations
Experience our stunning landing page with god-level animations and a seamless user journey.
Generate professional cover letters with an intuitive, drag-and-drop interface.
|
|
|
|
Key Elements:
- 📝 Left Panel - Large textarea for job description with character counter
- 📤 Right Panel - Drag & drop resume upload area with file list
- 🎯 Generate Button - Prominent CTA button with disabled state handling
Features:
- 👤 User name and email display
- 🔑 Gemini API key management
- ✅ OAuth permissions list
- 🚪 Logout functionality
Features:
- 📋 Clear instructions with links
- ✅ Validation before saving
- 🔒 Password field for security
- 🎨 Clean, modern design
Features:
- 📄 Full-screen preview
- ✏️ "Cancel & Edit" option
- ✅ "Confirm & Create Document" action
- 🎨 Formatted text display
Features:
- 🖼️ Embedded PDF preview via iframe
- 💾 One-click PDF download
- 📛 Auto-generated filename:
User_Company_CoverLetter.pdf - ✖️ Close button to return to main app
Node.js 18+
├── Express.js 4.18
├── Passport.js (OAuth2)
├── jsonwebtoken (JWT)
├── Google APIs (Node.js client)
│ ├── Docs API
│ └── Drive API (PDF export)
├── pdf-parse (PDF processing)
└── multer (File uploads)
Next.js 15.5.4
├── React 19
├── TypeScript 5
├── Tailwind CSS 4
├── Lucide React (Icons)
└── Dynamic Imports
- Google Gemini API - gemini-1.5-flash (AI generation)
- Google OAuth 2.0 - User authentication
- Google Docs API - Document creation
- Google Drive API - PDF export
Before you begin, ensure you have the following installed:
| Tool | Version | Download |
|---|---|---|
| Node.js | 18+ | Download |
| npm | 9+ | Included with Node.js |
| Git | Latest | Download |
Recommended IDE:
- VS Code with ESLint and TypeScript extensions
git clone https://github.com/yourusername/covercraft-ai.git
cd covercraft-aiStep 1: Create a Google Cloud Project
- Go to Google Cloud Console
- Click "New Project"
- Name: "CoverCraft AI"
- Click "Create"
Step 2: Enable Required APIs
Navigate to APIs & Services > Library and enable:
- ✅ Google Docs API
- ✅ Google Drive API
- ✅ Google+ API (for OAuth)
Step 3: Configure OAuth Consent Screen
- Go to APIs & Services > OAuth consent screen
- Choose External user type
- Fill in application information:
App name: CoverCraft AI User support email: [email protected] Developer contact: [email protected] - Add scopes:
openid.../auth/userinfo.email.../auth/userinfo.profile.../auth/documents.../auth/drive.readonly
- Add test users (your Gmail accounts)
- Click "Save and Continue"
Step 4: Create OAuth 2.0 Credentials
- Go to APIs & Services > Credentials
- Click + Create Credentials > OAuth client ID
- Application type: Web application
- Authorized redirect URIs:
http://localhost:8080/api/v1/auth/google/callback - Click Create
- Copy Client ID and Client Secret
⚠️
- Visit Google AI Studio
- Click "Get API Key"
- Create/Select a project
- Copy the API key
Note: Users will enter their own API keys in the app, but you need one for testing.
- Navigate to
backend/ - Create
.envfrom the template:
cd backend
cp .env.template .env- Edit
.env:
# Server Configuration
PORT=8080
NODE_ENV=development
# Google OAuth Credentials (from Step 4)
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
GOOGLE_CALLBACK_URL=http://localhost:8080/api/v1/auth/google/callback
# JWT Configuration (generate a random 64+ character string)
JWT_SECRET=your_super_secret_jwt_key_minimum_512_bits_long
JWT_EXPIRES_IN=1h
JWT_REFRESH_EXPIRES_IN=7d
# Frontend URL
FRONTEND_URL=http://localhost:3000
# Google API Scopes
GOOGLE_SCOPES=openid,email,profile,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/drive.readonly
# AI Provider
AI_PROVIDER_URL=https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContentcd backend
npm install# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Return to project root
cd ..You need two terminal windows:
# From project root
./gradlew bootRunExpected Output:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.5.6)
...
Started CoverLetterAgentApplication in 4.5 seconds
Tomcat started on port(s): 8080 (http)
✅ Backend ready at http://localhost:8080
# Navigate to frontend
cd frontend
# Start development server
npm run devExpected Output:
▲ Next.js 15.5.4
- Local: http://localhost:3000
- Network: http://192.168.1.x:3000
✓ Ready in 2.5s
✅ Frontend ready at http://localhost:3000
- Open
http://localhost:3000 - View the animated landing page
- Click "Get Started Free" or "Login with Google"
- Google OAuth consent screen appears
- Select your Google account
- Grant requested permissions
- Redirected back to application
- Modal prompts for Gemini API key
- Follow instructions to get key from Google AI Studio
- Paste and save API key (stored in browser localStorage)
Step 1: Upload Resume
- Drag & drop PDF or click "Browse Files"
- See uploaded file with number badge
Step 2: Paste Job Description
- Copy job posting from company website
- Paste into left textarea
Step 3: Generate
- Click "Generate Cover Letter"
- Wait 5-10 seconds for AI processing
Step 4: Review Preview
- Preview modal shows generated content
- Choose "Cancel & Edit" or "Confirm & Create Document"
Step 5: Download Document
- Document viewer shows PDF preview
- Click "Download PDF" to save
- Filename format:
YourName_CompanyName_CoverLetter.pdf
covercraft-ai/
│
├── backend/ # Node.js/Express Backend
│ ├── src/
│ │ ├── config/
│ │ │ ├── jwt.js # JWT utilities
│ │ │ └── passport.js # OAuth configuration
│ │ ├── controllers/
│ │ │ ├── authController.js # Auth endpoints
│ │ │ ├── coverLetterController.js # Generation logic
│ │ │ └── documentController.js # Document management
│ │ ├── middleware/
│ │ │ ├── auth.js # JWT authentication
│ │ │ ├── errorHandler.js # Error handling
│ │ │ └── upload.js # File upload config
│ │ ├── routes/
│ │ │ ├── authRoutes.js # Auth routes
│ │ │ ├── coverLetterRoutes.js # Cover letter routes
│ │ │ └── documentRoutes.js # Document routes
│ │ ├── services/
│ │ │ ├── authService.js # Auth business logic
│ │ │ ├── geminiService.js # AI service
│ │ │ ├── googleDocsService.js # Google Docs/Drive
│ │ │ └── pdfService.js # PDF processing
│ │ └── server.js # Main entry point
│ ├── .env.template # Environment template
│ ├── .gitignore
│ ├── package.json
│ └── README.md
│
├── frontend/ # Next.js Application
│ ├── app/
│ │ ├── components/
│ │ │ └── CoverLetterApp.tsx # Main app component
│ │ ├── landing/
│ │ │ └── page.tsx # Landing page
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Router
│ │ └── globals.css # Global styles
│ ├── public/ # Static assets
│ ├── package.json
│ └── tsconfig.json
│
├── QUICK_START_NODEJS.md # Quick setup guide
├── MIGRATION_GUIDE.md # Technical details
├── TESTING_CHECKLIST.md # QA checklist
├── start-nodejs-backend.bat # Windows startup
├── start-nodejs-backend.sh # Linux/Mac startup
├── .gitignore
└── README.md # This file
Initiates Google OAuth flow
Response: Redirects to Google consent screen
OAuth callback endpoint
Query Params:
code- Authorization code from Google
Response: Redirects to frontend with JWT token
Refresh expired JWT token
Headers:
Authorization: Bearer <expired_jwt>
Response:
{
"token": "new_jwt_token_here"
}Generate cover letter content using AI
Headers:
Authorization: Bearer <jwt_token>
Body (multipart/form-data):
resumes- PDF filejobDescription- StringapiKey- User's Gemini API key
Response:
{
"content": "[H1]John Doe\n[H2]..."
}Create Google Doc from generated content
Headers:
Authorization: Bearer <jwt_token>
Content-Type: application/json
Body:
{
"title": "Cover Letter - Google",
"content": "[H1]John Doe\n..."
}Response:
{
"documentId": "1abc123..."
}Download document as PDF
Headers:
Authorization: Bearer <jwt_token>
Query Params (alternative):
token- JWT token (for iframe)
Response: PDF file stream
# Install Heroku CLI
heroku login
heroku create covercraft-api
# Set environment variables
heroku config:set GOOGLE_CLIENT_ID=your_client_id
heroku config:set GOOGLE_CLIENT_SECRET=your_secret
heroku config:set JWT_SECRET=your_jwt_secret
# Deploy
git push heroku main- Package application:
./gradlew build
- Upload
build/libs/CoverLetterAgent-0.0.1-SNAPSHOT.jar - Configure environment variables in AWS console
Important: Update OAuth redirect URI in Google Cloud Console:
https://api.yourdomain.com/login/oauth2/code/google
# Install Vercel CLI
npm i -g vercel
# Deploy
cd frontend
vercelEnvironment Variables:
NEXT_PUBLIC_API_URL- Your backend URL
- Connect GitHub repository
- Build settings:
- Build command:
cd frontend && npm run build - Publish directory:
frontend/.next
- Build command:
Update API URLs:
In frontend/app/components/CoverLetterApp.tsx, replace:
const response = await fetch('http://localhost:8080/api/...')With:
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080';
const response = await fetch(`${API_URL}/api/...`)❌ "Could not resolve placeholder 'ai.provider.api.key'"
Cause: Missing API key in application.properties
Solution:
- Check
src/main/resources/application.propertiesexists (not just template) - Ensure all required properties are filled
- Restart Spring Boot application
❌ "401 Unauthorized" when generating cover letter
Cause: JWT token expired or invalid
Solution:
- Check browser console for token
- Try logging out and logging in again
- Verify JWT secret is at least 512 bits
❌ "CORS error" in browser console
Cause: Backend not allowing frontend origin
Solution:
- Verify backend is running on port 8080
- Verify frontend is running on port 3000
- Check
WebConfig.javahas correct origins
❌ Google OAuth shows "Error 400: redirect_uri_mismatch"
Cause: Redirect URI not registered in Google Cloud
Solution:
- Go to Google Cloud Console > Credentials
- Edit OAuth 2.0 Client
- Add redirect URI:
http://localhost:8080/login/oauth2/code/google - Save changes
❌ "Module not found: Can't resolve 'lucide-react'"
Cause: Missing frontend dependency
Solution:
cd frontend
npm install lucide-react
npm run dev❌ Gradle build fails with dependency errors
Cause: Cached corrupted dependencies
Solution:
./gradlew clean
rm -rf ~/.gradle/caches/
./gradlew build --refresh-dependenciesWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Backend: Follow Google Java Style Guide
- Frontend: Use ESLint and Prettier
- Commits: Use Conventional Commits format
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Ankit Verma
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
- Google Gemini API - For providing state-of-the-art AI generation
- Google Cloud Platform - For OAuth and Docs API infrastructure
- Spring Boot Team - For the excellent framework
- Vercel & Next.js Team - For the amazing React framework
- Tailwind CSS - For making styling effortless
- Lucide Icons - For beautiful, consistent icons
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
- LinkedIn: Ankit Verma