Ankit-can-ctrl/ai-interviewer

★ 0Forks 0TypeScriptGitHub ↗Compare

README

AI Recruitment System

A clickable MVP prototype demonstrating an AI-powered recruitment workflow with resume screening and automated interview assessment.

Project Structure

├── frontend/     # React + Vite → deploy to Vercel
├── backend/      # Express API → deploy to Render
├── render.yaml   # Render Blueprint (optional)
└── package.json  # Local dev scripts only

Features

  • HR Login — Mock authentication ([email protected] / hr123)
  • Dashboard — Stats cards, charts, recent candidates
  • Create Job — Define job title, department, skills, and description
  • Resume Upload — Upload PDF/DOCX resumes with AI-powered screening
  • Candidate Ranking — Scored and ranked by AI with skills match analysis
  • Interview Links — Generate unique interview URLs for shortlisted candidates
  • AI Interview — 5–8 role-specific questions with progress tracking
  • AI Evaluation — Technical, communication, and overall scores with recommendations
  • HR Review — Select, reject, or hold candidates with full reports

Tech Stack

Layer Technology
Frontend React, TypeScript, Tailwind CSS, shadcn/ui, Recharts
Backend Node.js, Express
Database PostgreSQL (Neon)
AI Groq API (Llama 3.3, with mock fallback)

Local Development

1. Install dependencies

npm run install:all

2. Configure backend

Copy backend/.env.example to backend/.env:

DATABASE_URL=postgresql://user:password@host/neondb?sslmode=require
GROQ_API_KEY=gsk-your-key-here
GROQ_MODEL=llama-3.3-70b-versatile
USE_MOCK_AI=false

3. Start the servers

Terminal 1 — Backend:

npm run dev:backend

Terminal 2 — Frontend:

npm run dev:frontend

Open http://localhost:5173. The Vite dev server proxies /api and /uploads to the backend on port 3001.

Deploy to Render (Backend)

  1. Push this repo to GitHub.
  2. In Render, create a Web Service from the repo.
  3. Set Root Directory to backend.
  4. Build Command: npm install
  5. Start Command: npm start
  6. Add environment variables:
    • DATABASE_URL — your Neon PostgreSQL connection string
    • GROQ_API_KEY — your Groq API key
    • GROQ_MODEL — llama-3.3-70b-versatile
    • USE_MOCK_AI — false
    • FRONTEND_URL — your Vercel frontend URL (e.g. https://your-app.vercel.app)

Alternatively, use the included render.yaml Blueprint for one-click setup.

Note: Render's filesystem is ephemeral — uploaded resumes are lost on redeploy. For production, swap file storage for S3 or similar.

Deploy to Vercel (Frontend)

  1. In Vercel, import the same GitHub repo.
  2. Set Root Directory to frontend.
  3. Framework preset: Vite (auto-detected).
  4. Add environment variables (Production):
    • VITE_API_URL — https://your-backend.onrender.com/api
    • VITE_BACKEND_URL — https://your-backend.onrender.com
  5. Deploy.

The frontend calls the Render backend directly via these env vars. CORS is configured on the backend using FRONTEND_URL.

Demo Workflow

  1. Login with [email protected] / hr123
  2. Create a Job — e.g. "Senior Frontend Developer" with skills like React, TypeScript, Node.js
  3. Upload Resumes — Select the job, upload PDF/DOCX files, click "Analyze with AI"
  4. Review Results — Candidates ranked by score with matched/missing skills
  5. Shortlist — Click "Shortlist & Copy Link" to generate an interview URL
  6. Interview — Open the link in a new tab/browser as the candidate
  7. Submit — Answer all questions and submit for AI evaluation
  8. HR Review — Go to Candidates → Review to see scores and make a decision

API Endpoints

Method Endpoint Description
GET /api/health Health check
POST /api/auth/login HR login
GET /api/dashboard/stats Dashboard statistics
GET/POST /api/jobs List/create jobs
POST /api/candidates/upload/:jobId Upload & analyze resumes
GET /api/candidates List candidates
PATCH /api/candidates/:id/status Update candidate status
POST /api/candidates/:id/shortlist Generate interview link
GET /api/interview/:token Get interview session
POST /api/interview/:token/submit Submit & evaluate interview

Notes

This is a prototype/MVP — mock authentication, mock AI fallback, and simplified parsing are intentional.

Contributors

Ankit-can-ctrl

Issues