# vinayakamoorthi-tech/resumeanalyser architecture

> Architecture diagram of the GitHub repository vinayakamoorthi-tech/resumeanalyser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vinayakamoorthi-tech/resumeanalyser
- Repository: https://github.com/vinayakamoorthi-tech/resumeanalyser

## Overview

#### Purpose and deployment
PlacementAI is a placement-preparation SPA: resume analysis/building, AI mock interviews and GDs, aptitude practice, company tracking, offer comparison, and dashboard insights. React/Vite is deployed to Vercel; FastAPI is deployed to Render. Key deployment artifacts: `frontend/vercel.json`, `backend/render.yaml`.

#### Entry points and application boundary
The browser application starts at `frontend/src/main.jsx`, renders the routed shell in `frontend/src/App.jsx`, and communicates with a configurable backend URL via `frontend/src/utils/config.js`. The API starts in `backend/main.py`; it owns business endpoints and integrates authentication, persistence, and AI services.

#### Frontend feature composition
Page-level feature modules implement the product workflows rather than a separate frontend domain layer. Major routes include resume workflows (`frontend/src/pages/ResumePage.jsx`, `frontend/src/pages/ResumeBuilderPage.jsx`), interview/GD simulations (`frontend/src/pages/InterviewPage.jsx`, `frontend/src/pages/GDPage.jsx`), and readiness/tracking (`frontend/src/pages/Dashboard.jsx`, `frontend/src/pages/CompanyTrackerPage.jsx`, `frontend/src/pages/AptitudePage.jsx`). Offer and pricing flows are isolated in `frontend/src/pages/OfferComparisonPage.jsx` and `frontend/src/pages/PricingPage.jsx`.

#### Client state and browser integrations
Authentication token handling is centralized in `frontend/src/utils/auth.js`; login and registration UIs are `frontend/src/pages/LoginPage.jsx` and `frontend/src/pages/RegisterPage.jsx`. Cross-cutting UI state uses React contexts: theme persistence in `frontend/src/context/ThemeContext.jsx` and in-app notifications in `frontend/src/context/NotificationContext.jsx`. Resume PDF export uses client-side jsPDF; interview and GD voice input depend on the browser Web Speech API.

#### API, auth, and persistence
`backend/main.py` is the primary FastAPI composition point and API surface. Auth routes live in `backend/routes/auth_routes.py`, with JWT creation/validation and password hashing in `backend/auth.py`. SQLAlchemy initialization is in `backend/database.py`; durable entities are defined in `backend/models/models.py`. SQLite is the configured database boundary, storing users and application histories rather than requiring a separate managed database service.

#### AI processing boundary
AI-assisted operations—resume scoring/matching, cover-letter generation, interview questions/evaluation, GD participants/evaluation, and offer recommendations—are delegated from API handlers to `backend/services/ai_service.py`. That service calls Groq using `GROQ_API_KEY` and the `llama-3.1-8b-instant` model. Static aptitude content and company-tracker data remain application-side rather than AI-generated.

#### Primary flow
A user registers or logs in, receives a JWT, and the frontend attaches that credential for protected API requests. Feature pages submit user text, resume/JD data, answers, or offer details to FastAPI; the backend validates identity, optionally reads/writes SQLAlchemy records, invokes Groq when analysis is required, and returns structured results for presentation or client-side PDF export. External service boundaries are Groq AI, Razorpay sandbox checkout, Vercel hosting, and Render hosting.

Main entry points: [`frontend/src/pages/ResumePage.jsx`](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/pages/ResumePage.jsx) (Feature pages), [`backend/main.py`](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/main.py) (FastAPI API), [`frontend/src/App.jsx`](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/App.jsx) (Routed app shell), [`frontend/src/main.jsx`](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/main.jsx) (Browser entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React SPA"]
  node_main["Browser entry<br/>React entry<br/>[main.jsx]"]
  node_app["Routed app shell<br/>React shell<br/>[App.jsx]"]
  node_feature_pages["Feature pages<br/>product workflows<br/>[ResumePage.jsx]"]
  node_auth_pages["Login and registration<br/>auth UI<br/>[LoginPage.jsx]"]
  node_client_auth["JWT client auth<br/>token handling<br/>[auth.js]"]
  node_client_config["API configuration<br/>backend URL<br/>[config.js]"]
  node_ui_contexts["Theme and notifications<br/>React contexts<br/>[ThemeContext.jsx]"]
  node_browser_apis["Browser PDF and speech<br/>client integrations"]
end

subgraph group_backend["FastAPI API"]
  node_api["FastAPI API<br/>API composition<br/>[main.py]"]
  node_auth_routes["Auth routes<br/>API routes<br/>[auth_routes.py]"]
  node_auth_core["JWT and passwords<br/>auth service<br/>[auth.py]"]
  node_database[("SQLite persistence<br/>SQLAlchemy database<br/>[database.py]")]
  node_models["Durable entities<br/>SQLAlchemy models<br/>[models.py]"]
  node_ai_service["AI operations<br/>AI service<br/>[ai_service.py]"]
end

subgraph group_external["External services"]
  node_vercel{{"Vercel hosting<br/>[vercel.json]"}}
  node_render{{"Render hosting<br/>[render.yaml]"}}
  node_groq{{"Groq Llama 3.1<br/>AI provider"}}
  node_razorpay{{"Razorpay sandbox<br/>payment checkout"}}
end

node_vercel -->|"serves"| node_main
node_main -->|"renders"| node_app
node_app -->|"routes to"| node_feature_pages
node_app -->|"routes to"| node_auth_pages
node_app -->|"provides"| node_ui_contexts
node_auth_pages -->|"stores JWT"| node_client_auth
node_feature_pages -->|"uses credential"| node_client_auth
node_feature_pages -->|"uses API URL"| node_client_config
node_feature_pages -->|"exports PDF / voice input"| node_browser_apis
node_feature_pages -->|"protected API requests"| node_api
node_feature_pages -->|"checkout"| node_razorpay
node_render -->|"hosts"| node_api
node_api -->|"mounts"| node_auth_routes
node_auth_routes -->|"creates and validates JWTs"| node_auth_core
node_api -->|"authorizes requests"| node_auth_core
node_api -->|"reads and writes"| node_models
node_models -->|"mapped to"| node_database
node_api -->|"delegates analysis"| node_ai_service
node_ai_service -->|"AI inference"| node_groq

click node_vercel "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/vercel.json"
click node_main "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/main.jsx"
click node_app "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/App.jsx"
click node_feature_pages "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/pages/ResumePage.jsx"
click node_auth_pages "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/pages/LoginPage.jsx"
click node_client_auth "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/utils/auth.js"
click node_client_config "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/utils/config.js"
click node_ui_contexts "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/context/ThemeContext.jsx"
click node_render "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/render.yaml"
click node_api "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/main.py"
click node_auth_routes "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/routes/auth_routes.py"
click node_auth_core "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/auth.py"
click node_database "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/database.py"
click node_models "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/models/models.py"
click node_ai_service "https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/services/ai_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_app,node_feature_pages,node_auth_pages,node_client_auth,node_client_config,node_ui_contexts,node_browser_apis toneBlue
class node_api,node_auth_routes,node_auth_core,node_database,node_models,node_ai_service toneAmber
class node_vercel,node_render,node_groq,node_razorpay toneMint
```

## Components

### React SPA

Vite browser application deployed to Vercel.

- [Browser entry](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/main.jsx): React entry · `frontend/src/main.jsx`
- [Routed app shell](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/App.jsx): React shell · `frontend/src/App.jsx`
- [Feature pages](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/pages/ResumePage.jsx): product workflows · Resume, interview, GD, dashboard, tracker, aptitude, offers, and pricing routes. · `frontend/src/pages/ResumePage.jsx`
- [Login and registration](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/pages/LoginPage.jsx): auth UI · `frontend/src/pages/LoginPage.jsx`
- [JWT client auth](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/utils/auth.js): token handling · `frontend/src/utils/auth.js`
- [API configuration](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/utils/config.js): backend URL · `frontend/src/utils/config.js`
- [Theme and notifications](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/src/context/ThemeContext.jsx): React contexts · Provides persisted theme and in-app notifications. · `frontend/src/context/ThemeContext.jsx`
- **Browser PDF and speech**: client integrations · jsPDF export and Web Speech voice input.

### FastAPI API

Render-hosted application and business boundary.

- [FastAPI API](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/main.py): API composition · Owns business endpoints and protected workflows. · `backend/main.py`
- [Auth routes](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/routes/auth_routes.py): API routes · `backend/routes/auth_routes.py`
- [JWT and passwords](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/auth.py): auth service · `backend/auth.py`
- [SQLite persistence](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/database.py): SQLAlchemy database · Stores users and application histories. · `backend/database.py`
- [Durable entities](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/models/models.py): SQLAlchemy models · `backend/models/models.py`
- [AI operations](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/services/ai_service.py): AI service · Resume, interview, GD, cover-letter, and offer analysis. · `backend/services/ai_service.py`

### External services

- [Vercel hosting](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/frontend/vercel.json): hosting · `frontend/vercel.json`
- [Render hosting](https://github.com/vinayakamoorthi-tech/resumeanalyser/blob/main/backend/render.yaml): hosting · `backend/render.yaml`
- **Groq Llama 3.1**: AI provider · Called using GROQ_API_KEY and llama-3.1-8b-instant.
- **Razorpay sandbox**: payment checkout

## Connections

- Vercel hosting → Browser entry: serves
- Browser entry → Routed app shell: renders
- Routed app shell → Feature pages: routes to
- Routed app shell → Login and registration: routes to
- Routed app shell → Theme and notifications: provides
- Login and registration → JWT client auth: stores JWT
- Feature pages → JWT client auth: uses credential
- Feature pages → API configuration: uses API URL
- Feature pages → Browser PDF and speech: exports PDF / voice input
- Feature pages → FastAPI API: protected API requests
- Feature pages → Razorpay sandbox: checkout
- Render hosting → FastAPI API: hosts
- FastAPI API → Auth routes: mounts
- Auth routes → JWT and passwords: creates and validates JWTs
- FastAPI API → JWT and passwords: authorizes requests
- FastAPI API → Durable entities: reads and writes
- Durable entities → SQLite persistence: mapped to
- FastAPI API → AI operations: delegates analysis
- AI operations → Groq Llama 3.1: AI inference
