Skip to content

dctn/AI-interviewer

Repository files navigation

AI Mock Interviewer SaaS

A Django-based AI-powered SaaS platform for resume analysis, interview preparation, and user credit management. The application combines AI prompt pipelines, document parsing, audio transcription, payment integration, and optional anti-cheating support.

Overview

This repository contains a multi-app Django project named AI_mock_interviewer.

Key functionality:

  • Resume analysis using AI and job descriptions
  • Automated interview question generation from resume and JD
  • Audio recording upload and AI evaluation of interview answers
  • Wallet-based credit system for interview and resume credits
  • Payment support using Razorpay and token/coupon management
  • User authentication via Django Allauth and social login
  • Optional webcam-based cheating detection pipeline

Core Apps

core

Handles the main home pages, dashboard, resume upload, and resume AI analysis.

  • views.py — application entry points: home, dashboard, resume_analysis, and resume_result
  • models.pyResumeAnalysis model stores resume files, JD text, reports, and scores
  • forms.pyResumeForm for resume upload and JD input
  • resume_analysis.py — AI resume evaluation workflow using langchain, groq, and custom prompts
  • LLM_prompt.py — prompt templates for resume scoring, keyword extraction, JD generation, question generation, and answer evaluation
  • consumers.py, detection.py, iris_calibration.py, routing.py — optional real-time cheating detection via webcam
  • face_landmarker.task — Mediapipe model asset used by face detection

interview

Manages interview setup, question generation, answer submission, and result display.

  • views.py — interview lifecycle: setup, rendering questions, saving audio transcripts, evaluating results, and showing reports
  • models.pyInterview and QuestionAndAnswer models store interview metadata, questions, audio results, and AI evaluation JSON
  • forms.pyInterviewForm for interview configuration
  • question_and_answer_pipeline.py — question generation and batch answer evaluation using AI models

payment

Implements payment, wallet, coupon, vendor, and credit tracking workflows.

  • models.pyWallet, Transaction, Plan, Payment, Vendor, Coupon
  • views.py — payment checkout, order processing, Razorpay verification, success pages, coupon generation, coupon redemption, and user wallet updates
  • signals.py — automatically create a wallet for each new user with starter credits

Project Structure

Root files:

  • manage.py — Django CLI entrypoint
  • pyproject.toml — project dependencies and metadata
  • README.md — project documentation
  • db.sqlite3 — local development database file

Project package:

  • AI_mock_interviewer/ — Django project configuration
    • settings.py — environment, installed apps, database config, authentication, and third-party keys
    • urls.py — route definitions
    • wsgi.py / asgi.py — web server interfaces

Apps:

  • core/
  • interview/
  • payment/

Static and templates:

  • static/ — CSS assets for pages like checkout, dashboard, interview, payment, resume analysis, etc.
  • templates/ — HTML templates for the landing page, dashboard, interview flow, payment pages, user account flows, and partials like nav and aside

Important Features

Resume Analysis

  • Upload a PDF resume and provide a job description
  • Uses langchain, groq, and GPT-like models to compute:
    • resume score
    • keyword match percentage
    • missing skills
    • recruiter feedback
    • predictions for interview questions
  • Stores the AI analysis output in JSON on ResumeAnalysis.report

Interview Preparation

  • Users can create interviews by uploading a resume and JD, selecting experience and difficulty
  • AI generates a set of interview questions tailored to resume skills and job requirements
  • Interview answers are captured as uploaded audio files
  • Uses audio transcription and evaluation through AI to compute question-level scores and feedback

Credit Wallet System

  • Each user automatically receives a wallet on signup
  • resume_credits and interview_credits control access to resume analysis and interview creation
  • Credits are debited on use and credited on successful payment or coupon redemption

Payments and Coupons

  • Razorpay integration for paid plans
  • Plan objects define pricing and credit bundles
  • Payment records track orders, verified payments, and linked plans
  • Coupons may be generated by vendor users and redeemed by customers

Authentication

  • Django built-in auth plus django-allauth
  • Google social login provider configured
  • Allauth middleware and authentication backends enabled

Optional Cheating Detection

  • Websocket consumer for real-time analysis
  • Mediapipe face landmarks and gaze/head movement detection
  • Provides a reusable structure for online proctoring or user attention monitoring

Dependencies

Defined in pyproject.toml, including:

  • django>=6.0.3
  • django-allauth
  • django-storages
  • langchain-community, langchain-groq, langchain-huggingface, langchain-openai
  • groq
  • azure-storage-blob
  • cashfree-pg
  • razorpay
  • mediapipe
  • opencv-python, numpy
  • sentence-transformers, scikit-learn
  • python-dotenv
  • psycopg[binary]

Environment Variables

The app uses .env values loaded in settings.py. Common required variables:

  • DJANGO_SECRET_KEY
  • ENVIRONMENT
  • GROQ_API_KEY
  • OPEN_ROUTER
  • AI_CREDITS_API
  • CASHFREE_CLIENT_ID
  • CASHFREE_CLIENT_SECRET
  • CASHFREE_ENV
  • RAZORPAY_TEST_KEY
  • RAZORPAY_TEST_SECRET
  • RAZORPAY_LIVE_KEY
  • RAZORPAY_LIVE_SECRET
  • AZURE_ACCOUNT_NAME
  • AZURE_ACCOUNT_KEY
  • NEON_DB_URL (optional for production PostgreSQL)

Setup and Run

  1. Create and activate a Python virtual environment.
  2. Install dependencies:
    pip install -r requirements.txt
    If requirements.txt is not present, use pyproject.toml tooling or generate one from dependencies.
  3. Add environment variables to .env.
  4. Apply migrations:
    python manage.py migrate
  5. Create a superuser and run the server:
    python manage.py createsuperuser
    python manage.py runserver

Key URLs

  • / — landing page
  • /dashboard/ — user dashboard
  • /resume_analysis/ — resume analysis workflow
  • /result/<analysis_id> — view resume analysis report
  • /interview_setup/ — interview creation page
  • /interview/<interview_id>/ — interview question session page
  • /payment/checkout/<plan_id> — checkout page
  • /payment/payment_success/<payment_id>/ — payment result page
  • /accounts/ — authentication and social login routes

Notes

  • The project is designed as a SaaS workflow with credit management and paid plan support.
  • Some payment routes show a Cashfree flow that is currently commented out, while Razorpay is active.
  • The AI model selection logic includes fallback to cheaper models if the primary model call fails.
  • The app uses both local SQLite and optional remote database configuration.

Suggested Improvements

  • Add a requirements.txt or Poetry lock file for reproducible installs
  • Complete the optional Cheating detection UI and websocket activation
  • Add tests for interview scoring, payment verification, and resume analysis flows
  • Harden production settings, remove DEBUG=True, and configure ALLOWED_HOSTS
  • Add documentation or comments for the AI prompt generation and expected JSON outputs

This README describes the full SaaS app architecture, core modules, and major workflows for the AI mock interviewer platform.

About

AI Mock Interviewer , Django SaaS for resume analysis, AI-driven interview practice, and credit-based payments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors