Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

205 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SmartNShine - ATS Optimized Resume Builder

A complete MERN stack application that uses Google's Gemini AI to transform resumes into ATS-friendly, optimized documents. Upload PDF or DOCX files, get AI-powered enhancements, and download professionally formatted resumes that pass Applicant Tracking Systems.

πŸš€ Features

  • Smart Upload & Parsing: Upload PDF/DOCX resumes and automatically extract structured data using AI
  • AI Enhancement: Gemini-powered content optimization with action verbs, metrics, and ATS keywords
  • Rich Text Editor: Edit resume sections with TipTap WYSIWYG editor
  • ATS-Friendly Templates: Single-column, text-based PDF output optimized for ATS parsing
  • Drag & Reorder: Reorganize experience, education, and project sections
  • User Authentication: JWT-based auth to save and manage multiple resumes
  • Live Preview: Real-time preview of resume with PDF export functionality
  • Responsive Design: Built with TailwindCSS for mobile and desktop

πŸ›  Tech Stack

Backend

  • Node.js + Express: REST API server
  • MongoDB + Mongoose: Database and ODM
  • Gemini AI API: AI parsing and content enhancement
  • Multer: File upload handling
  • pdf-parse: PDF text extraction
  • mammoth: DOCX text extraction
  • JWT: Authentication
  • bcryptjs: Password hashing

Frontend

  • React 18 + Vite: Modern React with fast HMR
  • TailwindCSS: Utility-first CSS framework
  • TipTap: Rich text editor for resume content
  • React Router: Client-side routing
  • React Dropzone: Drag-and-drop file uploads
  • react-to-print: Text-based PDF generation
  • Axios: HTTP client

πŸ“‹ Prerequisites

  • Node.js 18+ and npm/yarn
  • MongoDB Atlas account (or local MongoDB)
  • Google Gemini API Key (Get one here)

πŸ”§ Installation & Setup

1. Clone the Repository

cd ATS_RESUME_GENERATOR

2. Server Setup

cd server
npm install

# Copy environment template
cp .env.example .env

# Edit .env with your credentials
nano .env

Configure .env:

PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/ats_resume
GEMINI_API_KEY=your_gemini_api_key_here
JWT_SECRET=your_super_secret_jwt_key_change_this
CLIENT_ORIGIN=http://localhost:5173

Start the server:

npm run dev

Server runs on http://localhost:5000

3. Client Setup

cd ../client
npm install

# Start development server
npm run dev

Client runs on http://localhost:5173

πŸ“š API Documentation

Base URL

http://localhost:5000/api

Authentication Endpoints

Register User

POST /api/auth/register
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "password123"
}

Login

POST /api/auth/login
Content-Type: application/json

{
  "email": "john@example.com",
  "password": "password123"
}

# Response includes JWT token
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": { "id": "...", "email": "...", "name": "..." }
}

Get Current User

GET /api/auth/me
Authorization: Bearer <token>

Resume Endpoints

Upload & Parse Resume

POST /api/resume/upload
Content-Type: multipart/form-data

# Upload file with field name 'resume'
curl -X POST http://localhost:5000/api/resume/upload \
  -F "resume=@/path/to/resume.pdf"

Response:

{
  "message": "Resume uploaded and parsed successfully",
  "data": {
    "name": "John Doe",
    "contact": { "email": "john@example.com", ... },
    "summary": "Experienced software engineer...",
    "skills": [...],
    "experience": [...],
    "education": [...],
    "rawText": "..."
  }
}

Enhance Content

POST /api/resume/enhance
Content-Type: application/json

{
  "content": ["Worked on backend systems", "Fixed bugs"],
  "sectionType": "experience"
}

Response:

{
  "message": "Content enhanced successfully",
  "enhanced": [
    "Architected and implemented scalable backend systems serving 10K+ users",
    "Resolved critical production bugs, improving system stability by 40%"
  ]
}

Generate Summary

POST /api/resume/generate-summary
Content-Type: application/json

{
  "resumeData": { ... }
}

Save Resume (Auth Required)

POST /api/resume/save
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "John Doe",
  "contact": { ... },
  "summary": "...",
  ...
}

Update Resume (Auth Required)

PUT /api/resume/:id
Authorization: Bearer <token>
Content-Type: application/json

List User Resumes (Auth Required)

GET /api/resume/list
Authorization: Bearer <token>

Get Resume by ID (Auth Required)

GET /api/resume/:id
Authorization: Bearer <token>

Delete Resume (Auth Required)

DELETE /api/resume/:id
Authorization: Bearer <token>

πŸ§ͺ Testing Checklist

Manual Testing Flow

  1. Upload Flow

    • Navigate to /upload
    • Drag and drop a PDF resume
    • Verify file upload shows loading state
    • Confirm redirect to /editor with parsed data
    • Check all sections populated correctly
  2. Editor Flow

    • Edit personal information fields
    • Modify summary text
    • Add/remove skills categories
    • Edit experience bullets using TipTap
    • Click "Enhance" on experience section
    • Verify AI-enhanced content appears
    • Reorder experience items (up/down arrows)
    • Add new project/education entries
  3. Preview & Export

    • Click "Show Preview"
    • Verify resume renders correctly
    • Check ATS-friendly formatting (single column, clear sections)
    • Click "Download PDF"
    • Open PDF and verify text is selectable (not image)
    • Copy text from PDF to confirm ATS can parse
  4. Authentication

    • Register new account at /register
    • Login at /login
    • Click "Save Resume" in editor
    • Navigate to /dashboard
    • Verify saved resume appears
    • Click "Open" to load resume
    • Delete a resume and confirm removal
  5. Error Handling

    • Upload invalid file type (e.g., .txt)
    • Upload file > 5MB
    • Try to enhance with empty content
    • Try to save without authentication
    • Verify error messages display

cURL Test Examples

Test Upload:

curl -X POST http://localhost:5000/api/resume/upload \
  -F "resume=@sample_resume.pdf" \
  -v

Test Register:

curl -X POST http://localhost:5000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"name":"Test User","email":"test@example.com","password":"test123"}' \
  -v

Test Enhance:

curl -X POST http://localhost:5000/api/resume/enhance \
  -H "Content-Type: application/json" \
  -d '{"content":["Developed features"],"sectionType":"experience"}' \
  -v

Test with Auth:

TOKEN="your_jwt_token_here"

curl -X GET http://localhost:5000/api/resume/list \
  -H "Authorization: Bearer $TOKEN" \
  -v

🌐 Deployment

Deploy Backend (Railway/Render)

  1. Create new project on Railway or Render
  2. Connect GitHub repository
  3. Set environment variables:
    • MONGODB_URI
    • GEMINI_API_KEY
    • JWT_SECRET
    • CLIENT_ORIGIN (frontend URL)
  4. Deploy from server directory

Deploy Frontend (Vercel)

  1. Create new project on Vercel
  2. Set build settings:
    • Framework: Vite
    • Root Directory: client
    • Build Command: npm run build
    • Output Directory: dist
  3. Add environment variable:
    • VITE_API_URL: Your backend URL
  4. Deploy

🎯 ATS Optimization Best Practices

The generated PDFs follow these ATS-friendly guidelines:

βœ… Single-column layout - No tables or multi-column formatting βœ… Standard section headings - "Experience", "Education", "Skills" βœ… Simple fonts - Arial/Helvetica for maximum compatibility βœ… Text-based PDF - Not image/scanned document βœ… Clear hierarchy - Consistent heading styles (H1, H2) βœ… No graphics/images - Text only for ATS parsing βœ… Standard date formats - "Month YYYY" format βœ… Bullet points - Standard bullet lists, not custom symbols

πŸ” Security Notes

  • API keys stored in .env (never commit)
  • Passwords hashed with bcrypt (10 rounds)
  • JWT tokens expire after 7 days
  • File upload size limited to 5MB
  • CORS configured for specific origin
  • Input validation on all endpoints

πŸ› Troubleshooting

MongoDB Connection Failed:

Error: MongooseServerSelectionError
  • Check MONGODB_URI in .env
  • Verify MongoDB Atlas IP whitelist (allow 0.0.0.0/0 for development)
  • Ensure database user has read/write permissions

Gemini API Error:

Failed to parse resume with AI
  • Verify GEMINI_API_KEY is valid
  • Check API quota limits
  • Ensure resume text extracted successfully

File Upload Error:

Invalid file type
  • Only PDF and DOCX files supported
  • Max file size: 5MB
  • Ensure file is not password-protected

TipTap Editor Not Loading:

  • Check browser console for errors
  • Ensure @tiptap/react and @tiptap/starter-kit installed
  • Clear node_modules and reinstall

πŸ“ Project Structure

ATS_RESUME_GENERATOR/
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── multer.config.js       # File upload configuration
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ auth.controller.js     # Authentication logic
β”‚   β”‚   └── resume.controller.js   # Resume CRUD operations
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── auth.middleware.js     # JWT verification
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ User.model.js          # User schema
β”‚   β”‚   └── Resume.model.js        # Resume schema
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.routes.js         # Auth endpoints
β”‚   β”‚   └── resume.routes.js       # Resume endpoints
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── gemini.service.js      # Gemini AI integration
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── fileExtractor.js       # PDF/DOCX extraction
β”‚   β”œβ”€β”€ uploads/                   # Temporary file storage
β”‚   β”œβ”€β”€ .env.example               # Environment template
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js                  # Express app entry
β”‚
β”œβ”€β”€ client/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout.jsx         # App layout wrapper
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx         # Navigation bar
β”‚   β”‚   β”‚   β”œβ”€β”€ EditableSection.jsx # TipTap editor component
β”‚   β”‚   β”‚   └── ResumePreview.jsx  # PDF preview template
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”‚   └── AuthContext.jsx    # Auth state management
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.jsx           # Landing page
β”‚   β”‚   β”‚   β”œβ”€β”€ Upload.jsx         # File upload page
β”‚   β”‚   β”‚   β”œβ”€β”€ Editor.jsx         # Resume editor
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx      # User resumes list
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx          # Login form
β”‚   β”‚   β”‚   └── Register.jsx       # Registration form
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── api.js             # Axios API client
β”‚   β”‚   β”œβ”€β”€ App.jsx                # Router configuration
β”‚   β”‚   β”œβ”€β”€ main.jsx               # React entry point
β”‚   β”‚   └── index.css              # Tailwind styles
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.js
β”‚   β”œβ”€β”€ tailwind.config.js
β”‚   └── postcss.config.js
β”‚
└── README.md

πŸ“š Documentation

For detailed documentation, visit the docs/ directory:

🀝 Contributing

Contributions welcome! Please follow these steps:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

πŸ“„ License

MIT License - feel free to use this project for personal or commercial purposes.

πŸ™ Acknowledgments

  • Google Gemini AI for intelligent parsing and enhancement
  • TipTap for the excellent rich text editor
  • React community for amazing tools and libraries

πŸ“§ Support

For issues, questions, or suggestions:

  • Open a GitHub issue
  • Check existing documentation
  • Review troubleshooting section

Built with ❀️ using MERN Stack + Gemini AI

About

Ai Resume Generator

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages