How anirudh-1106/vars works
1. Overall shape
- VARS is a single Flask application that implements a voice-driven resume builder.
- The architecture is a browser UI plus a Python backend, with AI services in the middle for transcription, extraction, and refinement.
2. Frontend boundary
- templates/index.html is the main interaction surface for recording, transcript review, and answering follow-up questions.
- templates/orb_visualizer.html supports the audio-reactive “orb” voice UI.
- static/recorder.js owns client-side audio capture and the step-by-step interaction flow using browser APIs such as MediaRecorder / Web Audio.
3. Backend entry point
- app.py is the orchestration layer.
- It serves pages, accepts uploaded audio or transcript data, coordinates AI calls, normalizes results, and moves the user through the workflow from raw speech to resume output.
4. State management
- state.py holds in-memory application state for the current resume-building session.
- This is where intermediate artifacts likely live: transcript text, extracted resume fields, missing details, follow-up answers, and the current step/status.
- The design is stateful but lightweight; there is no visible database layer in the repo.
5. Audio ingestion path
- The browser records user speech and sends audio to the server as webm and/or wav.
- The uploads/ directory is the temporary persistence boundary for those recordings.
- The presence of recorded artifacts in the repo suggests the backend expects file-based handling rather than pure streaming.
6. AI processing layer
- services/llm_service.py is the AI-specific subsystem.
- It handles the core intelligence: intent classification, structured extraction from transcript text, and refinement of incomplete resume data.
- Per the README, this layer integrates with Whisper Large-v3 for speech transcription/translation and Groq-hosted LLaMA for LLM-based resume processing.
7. Data transformation pipeline
- Raw spoken input becomes transcript text.
- Transcript text is reviewed by the user, then passed into the extraction pipeline.
- The extracted output is converted into structured resume sections such as summary, skills, experience, projects, and contact details.
- The backend also normalizes that data, including ordering experience by recency.
8. Missing-information loop
- A key subsystem is the follow-up question flow.
- After extraction, the app detects missing critical fields such as name, contact info, dates, and links.
- It then asks targeted questions and merges text or voice answers back into the same state until the resume data is complete enough to render.
9. Resume generation boundary
- templates/resume.html is the presentation layer for the generated resume preview.
- The backend turns the structured data into a resume-ready view rather than leaving it as raw JSON-like state.
- This is the final output boundary before save/export/download behavior.
10. Runtime and deployment characteristics
- The stack is Python/Flask on the server and plain HTML/CSS/JavaScript in the browser.
- No external frontend framework or database is visible, so the system is intentionally simple and likely optimized for local or small-scale deployment.
- The external dependencies that matter architecturally are the speech model and the LLM provider, because they define the main processing latency and failure boundaries.
11. End-to-end flow to diagram
- Browser records voice → uploads audio to Flask → transcription/transformation → transcript review → AI extraction into resume sections → missing-detail questions → answer ingestion → final resume preview/rendering.
- The main architectural seams are: client vs. server, upload storage vs. transient state, and AI processing vs. UI orchestration.
Main entry points: app.py Flask app · recorder.js Recorder · llm_service.py LLM service · state.py Session state
Components 15
Frontend
Browser UI and client-side capture
- Main page · Primary interaction surface for recording, review, and follow-up questions
templates/index.html - Orb UI · Audio-reactive voice UI for recording and listening mode
templates/orb_visualizer.html - Recorder · Browser audio capture and step-by-step interaction flow
static/recorder.js - Resume view · Rendered resume preview boundary for final presentation
templates/resume.html
Backend
Flask orchestration and session flow
- Flask app · Serves pages, accepts uploads, coordinates AI calls, and advances workflow
app.py - Session state · Holds transcript, extracted fields, missing details, answers, and current step
state.py - Transcribe · Converts uploaded speech into transcript text
- Review text · Lets the user inspect and confirm transcript before extraction
- Extract resume · Turns transcript into structured resume sections and normalizes ordering
- Ask details · Detects missing fields and gathers targeted follow-up answers
AI Layer
Speech and resume intelligence
- LLM service · Intent classification, extraction, and refinement of resume data
services/llm_service.py - Speech models · Whisper-based transcription and translation boundary
- Groq LLM · Hosted language model used for resume processing and refinement
Storage
Transient audio files and runtime artifacts
- Uploads · Temporary persistence for recorded webm and wav files
uploads - Sample audio · Recorded audio artifact useful for local debugging
debug_recording.webm
Connections 16
- Main page → Recorder: uses · Page loads the client recorder flow
- Orb UI → Recorder: uses · Orb UI relies on the same browser audio capture stack
- Recorder → Flask app: uploads audio · Browser sends recorded speech to Flask
- Flask app → Uploads: stores audio · Backend writes uploaded recordings as temporary files
- Flask app → Session state: reads/writes · Workflow state is kept in memory during the session
- Flask app → Transcribe: starts · Backend initiates transcription from uploaded audio
- Transcribe → Speech models: uses · Speech-to-text is handled by external transcription models
- Flask app → Review text: serves · Transcript is returned for user review
- Review text → Flask app: confirmed text · Reviewed transcript is sent back to the backend
- Flask app → Extract resume: starts · Confirmed transcript is passed into resume extraction
- Extract resume → LLM service: delegates · Structured extraction and refinement are handled by the AI layer
- LLM service → Groq LLM: calls · LLM-backed resume reasoning and completion
- Flask app → Ask details: detects gaps · Missing critical fields trigger targeted questions
- Ask details → Session state: merges answers · New answers are folded into the same session state
- Flask app → Resume view: renders · Final structured data is turned into a resume preview
- Sample audio → Uploads: example of · Shows the file-based audio artifact boundary