How vara910/resumeanalyzer works
Project Type and Purpose
• This is a monolithic full-stack Flask web application.
File Structure
• Top-level Python modules:
• app.py – Main Flask application entry point
• auth.py – Authentication routes
• models.py – ORM models (SQLAlchemy)
• forms.py – WTForms definitions
• utils.py – Helper functions (text extraction, preprocessing, feature extraction, similarity, scoring)
• init.py – Application factory or initialization logic
• Directories:
• templates/ – Jinja2 HTML templates (base, auth, errors, pages)
• assets/ – Static images (screenshots, UI assets)
• instance/ – Runtime database file (resume_analyzer.db) and configuration overrides
• logs/ – Application logs (app.log)
• Configuration & CI:
• requirements.txt, .env.example – Dependencies and env setup
• .github/, azure-pipelines*.yml – GitHub Actions and Azure Pipelines for CI/CD
• Runtime artifacts (uploads/) are created at runtime.
README for Architecture Insights
• Tech stack: Python, Flask, SQLite/PostgreSQL, NLTK, scikit-learn, PyMuPDF, python-docx, textract.
• Workflow stages described: Text Extraction → Preprocessing → Feature Extraction → Similarity Calculation → Weighted Scoring → Visualization.
• External dependencies: SMTP server for email, optional PostgreSQL in production.
Main Components & Interactions
a. User Interface (Browser)
– HTML templates, CSS, JS assets delivered by Flask.
b. Flask Application Server
– Blueprints or route modules (app.py, auth.py) handle requests.
– Controllers (routes) invoke:
• Authentication Module (auth.py + Flask-Security)
• Form Handling (forms.py)
• NLP Pipeline (utils.py)
• Data Access Layer (models.py + SQLAlchemy)
c. File Storage
– Uploaded resumes & job descriptions stored on disk (uploads/ or instance/).
d. Database
– SQLite during development (instance/resume_analyzer.db), PostgreSQL in production.
e. NLP & ML Subsystem
– Text Extraction (PyMuPDF, python-docx, textract)
– Preprocessing (NLTK pipelines)
– Feature Extraction (TF-IDF with scikit-learn)
– Scoring Engine (cosine similarity + custom weighting)
f. External Services
– SMTP Email Server for account activation, password reset
– (Optional) External storage or analytics services if integrated
g. CI/CD Pipelines
– GitHub Actions, Azure Pipelines for build/test/deploy
• Browser → Flask (HTTP requests: login, upload, analyze)
• Flask → Database (ORM queries)
• Flask → File Storage (save/upload files, read for analysis)
• Flask → NLP Subsystem (invoke utils.py functions)
• Flask → External SMTP (send emails)
• Flask → CI/CD (trigger build & deploy)
Architectural Patterns & Principles
• MVC-like separation:
• Models (models.py) for data
• Views (templates/) for presentation
• Controllers (routes in app.py/auth.py)
• Single-process monolith, can be refactored into microservices (e.g., separate NLP service) later.
• Application Factory pattern (init.py) to support testability and multiple environments.