Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GapWise AI 🎯

RAG & AI-powered interview preparation platform β€” upload your resume, paste the job description, and get a personalized interview report, predicted questions, skill gap analysis, and a tailored resume PDF in seconds.

GapWise AI Node.js React MongoDB Google Gemini Docker GitHub Actions


✨ Features

  • πŸ” JWT Authentication System
  • πŸ“„ Resume Upload and PDF Parsing
  • 🧠 RAG-Powered Resume Matching Pipeline
  • πŸ€– AI Interview Report Generation (Gemini + Zod schema)
  • πŸ€– AI Interview Report Generation (Zod schema)
  • πŸ“Š Match Score Normalization and Skill Gap Analysis
  • πŸ’¬ Technical and Behavioral Questions with intent and answer guidance
  • πŸ“… Personalized Preparation Roadmap
  • πŸ“₯ ATS-Friendly Resume PDF Generator
  • πŸͺŸ Windows-safe PDF generation fallback (local Chrome/Edge support)
  • πŸ“š Interview Report History
  • 🐳 Dockerized Full Stack Application
  • βš™οΈ GitHub Actions CI/CD Pipeline
  • πŸ§ͺ Automated API Testing with Jest and Supertest

πŸ› οΈ Tech Stack

Backend

Technology Purpose
Node.js + Express REST API server
MongoDB + Mongoose Database
JWT + bcryptjs Authentication
Google Gemini AI via @google/genai Interview report and resume HTML generation
Local RAG service Resume chunking, embedding, retrieval
Puppeteer Core + Chromium HTML to PDF conversion
Multer Resume upload handling
pdf-parse PDF text extraction
Zod + zod-to-json-schema AI output schema enforcement
Jest + Supertest API tests

Frontend

Technology Purpose
React 19 + Vite Frontend framework
React Router v7 Routing
Axios API requests
SASS Styling

DevOps and Deployment

Technology Purpose
Docker Containerization
Docker Compose Multi-container orchestration
GitHub Actions CI/CD automation
Nginx Frontend production server
Render Deployment platform

πŸš€ Local Development Setup

Prerequisites

  • Node.js >= 18
  • Docker and Docker Compose
  • MongoDB Atlas account or local MongoDB
  • Google Gemini API key
  • Pinecone account and API key

1. Clone Repository

git clone https://github.com/Akshay4754/GapWiseAI.git
cd GapWiseAI

2. Backend Setup

cd Backend
npm install

Create .env inside Backend/

PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
GOOGLE_GENAI_API_KEY=your_gemini_api_key
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_INDEX_NAME=gapwise-ai-rag-google
GOOGLE_EMBEDDING_MODEL=gemini-embedding-001
GOOGLE_EMBEDDING_DIMENSIONS=768
FRONTEND_ORIGIN=http://localhost:5173,http://localhost:5174

Run backend

npm run dev

If npm run dev has trouble with nodemon, run:

npm start

3. Frontend Setup

cd Frontend
npm install

Create .env inside Frontend/

VITE_API_URL=http://localhost:3000

Run frontend

npm run dev

Frontend runs at

http://localhost:5173

🐳 Docker Setup

Run Full Application

docker-compose up --build

Containers expose

Build Containers Individually

Backend

docker build -t gapwise-backend ./Backend

Frontend

docker build -t gapwise-frontend ./Frontend

βš™οΈ CI/CD Pipeline

GitHub Actions workflow in .github/workflows/ci.yml automatically

  • βœ… Installs backend and frontend dependencies
  • βœ… Runs Jest + Supertest tests
  • βœ… Builds Docker images
  • βœ… Pushes Docker images on push to main, only if tests pass

πŸ” Required GitHub Secrets

Go to GitHub Repository β†’ Settings β†’ Secrets and variables β†’ Actions

Add

DOCKER_USERNAME
DOCKER_PASSWORD
MONGO_URI_TEST
GEMINI_API_KEY

πŸ“ Updated Project Structure

GapWiseAI/
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci.yml                      # GitHub Actions CI/CD pipeline
β”‚
β”œβ”€β”€ docker-compose.yml                  # Multi-container orchestration
β”‚
β”œβ”€β”€ Backend/
β”‚   β”œβ”€β”€ Dockerfile                      # Backend container setup
β”‚   β”œβ”€β”€ env.example                     # Environment variables template
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ server.js                       # Backend entry point
β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   └── api.test.js                 # Jest + Supertest tests
β”‚   β”‚
β”‚   └── src/
β”‚       β”œβ”€β”€ app.js                      # Express app configuration
β”‚       β”œβ”€β”€ config/                     # MongoDB configuration
β”‚       β”œβ”€β”€ controllers/                # Route handlers
β”‚       β”œβ”€β”€ middlewares/                # Auth + file middleware
β”‚       β”œβ”€β”€ models/                     # Mongoose models
β”‚       β”œβ”€β”€ routes/                     # Express routes
β”‚       └── services/
β”‚           β”œβ”€β”€ ai.service.js           # Gemini integration + PDF generation
β”‚           └── rag.service.js          # Resume chunking, embedding, retrieval
β”‚
β”œβ”€β”€ Frontend/
β”‚   β”œβ”€β”€ Dockerfile                      # Frontend container setup
β”‚   β”œβ”€β”€ nginx.conf                      # Nginx production config
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── _redirects                  # SPA routing fix
β”‚   └── src/
β”‚       β”œβ”€β”€ app.routes.jsx              # React routes
β”‚       └── features/
β”‚           β”œβ”€β”€ auth/                   # Authentication feature
β”‚           └── interview/              # Interview dashboard and API services
β”‚
└── README.md

🌐 Deployment

Backend on Render Web Service

Setting Value
Root Directory Backend
Build Command npm install
Start Command npm start

Environment Variables

MONGO_URI
JWT_SECRET
GOOGLE_GENAI_API_KEY
PINECONE_API_KEY
PINECONE_INDEX_NAME=gapwise-ai-rag-google
GOOGLE_EMBEDDING_MODEL=gemini-embedding-001
GOOGLE_EMBEDDING_DIMENSIONS=768
FRONTEND_ORIGIN=https://your-frontend-url.onrender.com

Frontend on Render Static Site

Setting Value
Root Directory Frontend
Build Command npm install && npm run build
Publish Directory dist

Environment Variables

VITE_API_URL=https://your-backend-url.onrender.com

Pinecone Setup

Create a plain dense Pinecone index for the RAG pipeline with:

Index name: gapwise-ai-rag-google
Vector type: Dense
Dimensions: 768
Metric: Cosine
Region: us-east-1

Notes:

  • Do not use an integrated embedding index for this project.
  • The backend generates embeddings itself using Google Gemini embeddings.
  • The Pinecone index dimension must match GOOGLE_EMBEDDING_DIMENSIONS=768.

πŸ§ͺ Running Tests

From Backend/

npm test

Uses

  • Jest
  • Supertest

Test location

Backend/tests/api.test.js

πŸ”‘ API Endpoints

Auth Routes

Method Endpoint Description
POST /api/auth/register Register user
POST /api/auth/login Login user
GET /api/auth/logout Logout user
GET /api/auth/get-me Current user

Interview Routes

Method Endpoint Description
POST /api/interview/ Generate interview report
GET /api/interview/ Fetch all reports
GET /api/interview/report/:id Fetch single report
POST /api/interview/resume/pdf/:id Generate and download resume PDF

🧠 AI and RAG Workflow

  1. User submits job description and either resume PDF, self-description, or both
  2. Resume PDF is parsed to text
  3. RAG service chunks resume text, generates local embeddings, and stores a per-user collection
  4. Job description is embedded and used to retrieve top relevant resume chunks
  5. Retrieved chunks are sent to Gemini for structured report generation
  6. Match score is normalized to 0 to 100 before persistence and UI rendering
  7. Interview report is saved with ragMetadata fields used and chunksRetrieved
  8. For resume download, Gemini generates resume HTML, then Puppeteer renders ATS-friendly PDF
  9. PDF generation falls back to local Chrome/Edge binaries when needed for reliability

<<<<<<< HEAD MIT Β© Akshay Anand

4971bbfe600b7393b581d5e744459f64c6a1cf07

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages