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.
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
Handles the main home pages, dashboard, resume upload, and resume AI analysis.
views.py— application entry points:home,dashboard,resume_analysis, andresume_resultmodels.py—ResumeAnalysismodel stores resume files, JD text, reports, and scoresforms.py—ResumeFormfor resume upload and JD inputresume_analysis.py— AI resume evaluation workflow usinglangchain,groq, and custom promptsLLM_prompt.py— prompt templates for resume scoring, keyword extraction, JD generation, question generation, and answer evaluationconsumers.py,detection.py,iris_calibration.py,routing.py— optional real-time cheating detection via webcamface_landmarker.task— Mediapipe model asset used by face detection
Manages interview setup, question generation, answer submission, and result display.
views.py— interview lifecycle: setup, rendering questions, saving audio transcripts, evaluating results, and showing reportsmodels.py—InterviewandQuestionAndAnswermodels store interview metadata, questions, audio results, and AI evaluation JSONforms.py—InterviewFormfor interview configurationquestion_and_answer_pipeline.py— question generation and batch answer evaluation using AI models
Implements payment, wallet, coupon, vendor, and credit tracking workflows.
models.py—Wallet,Transaction,Plan,Payment,Vendor,Couponviews.py— payment checkout, order processing, Razorpay verification, success pages, coupon generation, coupon redemption, and user wallet updatessignals.py— automatically create a wallet for each new user with starter credits
Root files:
manage.py— Django CLI entrypointpyproject.toml— project dependencies and metadataREADME.md— project documentationdb.sqlite3— local development database file
Project package:
AI_mock_interviewer/— Django project configurationsettings.py— environment, installed apps, database config, authentication, and third-party keysurls.py— route definitionswsgi.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
- 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
- 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
- Each user automatically receives a wallet on signup
resume_creditsandinterview_creditscontrol access to resume analysis and interview creation- Credits are debited on use and credited on successful payment or coupon redemption
- Razorpay integration for paid plans
Planobjects define pricing and credit bundlesPaymentrecords track orders, verified payments, and linked plans- Coupons may be generated by vendor users and redeemed by customers
- Django built-in auth plus
django-allauth - Google social login provider configured
- Allauth middleware and authentication backends enabled
- 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
Defined in pyproject.toml, including:
django>=6.0.3django-allauthdjango-storageslangchain-community,langchain-groq,langchain-huggingface,langchain-openaigroqazure-storage-blobcashfree-pgrazorpaymediapipeopencv-python,numpysentence-transformers,scikit-learnpython-dotenvpsycopg[binary]
The app uses .env values loaded in settings.py. Common required variables:
DJANGO_SECRET_KEYENVIRONMENTGROQ_API_KEYOPEN_ROUTERAI_CREDITS_APICASHFREE_CLIENT_IDCASHFREE_CLIENT_SECRETCASHFREE_ENVRAZORPAY_TEST_KEYRAZORPAY_TEST_SECRETRAZORPAY_LIVE_KEYRAZORPAY_LIVE_SECRETAZURE_ACCOUNT_NAMEAZURE_ACCOUNT_KEYNEON_DB_URL(optional for production PostgreSQL)
- Create and activate a Python virtual environment.
- Install dependencies:
If
pip install -r requirements.txt
requirements.txtis not present, usepyproject.tomltooling or generate one from dependencies. - Add environment variables to
.env. - Apply migrations:
python manage.py migrate
- Create a superuser and run the server:
python manage.py createsuperuser python manage.py runserver
/— 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
- 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.
- Add a
requirements.txtor 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 configureALLOWED_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.