# rajendrakumar08/re_check architecture

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

- Interactive diagram: https://gitdiagram.com/rajendrakumar08/re_check
- Repository: https://github.com/rajendrakumar08/re_check

## Overview

Re_Check is an AI-assisted interview-preparation application. A user registers or signs in, then can upload a resume for extraction and analysis, compare it with a job description, generate project-specific questions, or start a live voice-and-coding interview. The Express backend serves the HTTP routes and Socket.IO session; MongoDB persists user and interview data, while Gemini supports analysis and live responses. The README documents the major capabilities and API areas; several frontend-to-API links and upload integration details are therefore documented relationships rather than verified from frontend excerpts.

Main entry points: [`backend/index.js`](https://github.com/rajendrakumar08/re_check/blob/main/backend/index.js) (Express and Socket.IO), [`frontend/src/App.jsx`](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/App.jsx) (App routing), [`backend/routes/user.js`](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/user.js) (User API), [`backend/routes/resume.js`](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/resume.js) (Resume analysis API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_authui["Registration and login<br/>[register.jsx]"]
  node_dashboard["Dashboard and profile<br/>[dashboard.jsx]"]
  node_resumeui["Resume upload<br/>[upload-resume.jsx]"]
  node_compatui["Job compatibility"]
  node_projectui["Project questions<br/>[projects.jsx]"]
  node_liveui["Live interview editor<br/>[liveinterviwe.jsx]"]
end

subgraph group_api["Backend API"]
  node_server["Express and Socket.IO<br/>[index.js]"]
  node_authroutes["User API<br/>[user.js]"]
  node_resumeapi["Resume analysis API<br/>[resume.js]"]
  node_uploadapi["Resume file upload<br/>[resume-upload.js]"]
  node_projectapi["Project question API<br/>[project.js]"]
  node_interviewapi["Interview history API<br/>[interview.js]"]
  node_geminiservice["Gemini client<br/>[gemini.js]"]
end

subgraph group_live["Live interview"]
  node_livegemini["Live Gemini bridge<br/>[livegemini.js]"]
end

subgraph group_data["Identity and persistence"]
  node_authmw["Cookie authentication<br/>[auth.js]"]
  node_authservice["Token service<br/>[auth.js]"]
  node_userdb[("User records<br/>[user.js]")]
  node_sessiondb[("Interview sessions<br/>[liveInterview.js]")]
  node_cloudinary["Cloudinary storage<br/>[cloudinary.js]"]
end

node_candidate(("Candidate"))
node_mongodb[("MongoDB")]
node_gemini["Google Gemini"]

node_candidate -->|"uses"| node_app
node_app -.->|"routes to"| node_authui
node_app -.->|"routes to"| node_dashboard
node_app -.->|"routes to"| node_resumeui
node_app -.->|"routes to"| node_compatui
node_app -.->|"routes to"| node_projectui
node_app -.->|"routes to"| node_liveui
node_authui -.->|"uses API"| node_authroutes
node_dashboard -.->|"fetches profile"| node_authroutes
node_resumeui -.->|"submits resume"| node_resumeapi
node_resumeui -.->|"uploads file"| node_uploadapi
node_compatui -.->|"requests match"| node_resumeapi
node_projectui -.->|"requests questions"| node_projectapi
node_liveui -.->|"opens session"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_resumeapi
node_server -->|"mounts"| node_uploadapi
node_server -->|"mounts"| node_projectapi
node_server -->|"mounts"| node_interviewapi
node_authroutes -->|"reads and creates"| node_userdb
node_authroutes -->|"creates and validates tokens"| node_authservice
node_userdb -->|"creates token"| node_authservice
node_authmw -->|"validates token"| node_authservice
node_interviewapi -->|"checks cookie"| node_authmw
node_interviewapi -->|"reads sessions"| node_sessiondb
node_resumeapi -->|"requests analysis"| node_geminiservice
node_projectapi -->|"requests questions"| node_geminiservice
node_geminiservice -.->|"sends prompts"| node_gemini
node_server -->|"creates and updates"| node_sessiondb
node_server -->|"starts live session"| node_livegemini
node_livegemini -->|"streams audio and receives responses"| node_gemini
node_server -.->|"connects"| node_mongodb
node_sessiondb -.->|"persists sessions"| node_mongodb
node_userdb -.->|"persists users"| node_mongodb
node_uploadapi -.->|"stores resume"| node_cloudinary

click node_app "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/register.jsx"
click node_dashboard "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/dashboard.jsx"
click node_resumeui "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/upload-resume.jsx"
click node_compatui "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/jobcompactibility.jsx"
click node_projectui "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/projects.jsx"
click node_liveui "https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/liveinterviwe.jsx"
click node_server "https://github.com/rajendrakumar08/re_check/blob/main/backend/index.js"
click node_authroutes "https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/user.js"
click node_resumeapi "https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/resume.js"
click node_uploadapi "https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/resume-upload.js"
click node_projectapi "https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/project.js"
click node_interviewapi "https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/interview.js"
click node_authmw "https://github.com/rajendrakumar08/re_check/blob/main/backend/middlewares/auth.js"
click node_authservice "https://github.com/rajendrakumar08/re_check/blob/main/backend/services/auth.js"
click node_userdb "https://github.com/rajendrakumar08/re_check/blob/main/backend/models/user.js"
click node_sessiondb "https://github.com/rajendrakumar08/re_check/blob/main/backend/models/liveInterview.js"
click node_cloudinary "https://github.com/rajendrakumar08/re_check/blob/main/backend/services/cloudinary.js"
click node_geminiservice "https://github.com/rajendrakumar08/re_check/blob/main/backend/services/gemini.js"
click node_livegemini "https://github.com/rajendrakumar08/re_check/blob/main/backend/services/livegemini.js"

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_app,node_authui,node_dashboard,node_resumeui,node_compatui,node_projectui,node_liveui toneBlue
class node_server,node_authroutes,node_resumeapi,node_uploadapi,node_projectapi,node_interviewapi,node_geminiservice,node_mongodb toneAmber
class node_livegemini toneMint
class node_authmw,node_authservice,node_userdb,node_sessiondb,node_cloudinary toneRose
class node_candidate,node_gemini toneIndigo
```

## Components

### Frontend experience

- [App routing](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Registration and login](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/register.jsx): `frontend/src/register.jsx`
- [Dashboard and profile](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/dashboard.jsx): `frontend/src/dashboard.jsx`
- [Resume upload](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/upload-resume.jsx): `frontend/src/upload-resume.jsx`
- [Job compatibility](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/jobcompactibility.jsx): `frontend/src/jobcompactibility.jsx`
- [Project questions](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/projects.jsx): `frontend/src/projects.jsx`
- [Live interview editor](https://github.com/rajendrakumar08/re_check/blob/main/frontend/src/liveinterviwe.jsx): `frontend/src/liveinterviwe.jsx`

### Backend API

- [Express and Socket.IO](https://github.com/rajendrakumar08/re_check/blob/main/backend/index.js): `backend/index.js`
- [User API](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/user.js): `backend/routes/user.js`
- [Resume analysis API](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/resume.js): `backend/routes/resume.js`
- [Resume file upload](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/resume-upload.js): `backend/routes/resume-upload.js`
- [Project question API](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/project.js): `backend/routes/project.js`
- [Interview history API](https://github.com/rajendrakumar08/re_check/blob/main/backend/routes/interview.js): `backend/routes/interview.js`
- [Gemini client](https://github.com/rajendrakumar08/re_check/blob/main/backend/services/gemini.js): `backend/services/gemini.js`

### Live interview

- [Live Gemini bridge](https://github.com/rajendrakumar08/re_check/blob/main/backend/services/livegemini.js): `backend/services/livegemini.js`

### Identity and persistence

- [Cookie authentication](https://github.com/rajendrakumar08/re_check/blob/main/backend/middlewares/auth.js): `backend/middlewares/auth.js`
- [Token service](https://github.com/rajendrakumar08/re_check/blob/main/backend/services/auth.js): `backend/services/auth.js`
- [User records](https://github.com/rajendrakumar08/re_check/blob/main/backend/models/user.js): `backend/models/user.js`
- [Interview sessions](https://github.com/rajendrakumar08/re_check/blob/main/backend/models/liveInterview.js): `backend/models/liveInterview.js`
- [Cloudinary storage](https://github.com/rajendrakumar08/re_check/blob/main/backend/services/cloudinary.js): `backend/services/cloudinary.js`

### Other components

- **Candidate**
- **MongoDB**
- **Google Gemini**

## Connections

- Candidate → App routing: uses (evidence: `README.md`)
- App routing → Registration and login: routes to
- App routing → Dashboard and profile: routes to
- App routing → Resume upload: routes to
- App routing → Job compatibility: routes to
- App routing → Project questions: routes to
- App routing → Live interview editor: routes to
- Registration and login → User API: uses API (evidence: `README.md`)
- Dashboard and profile → User API: fetches profile (evidence: `README.md`)
- Resume upload → Resume analysis API: submits resume (evidence: `README.md`)
- Resume upload → Resume file upload: uploads file (evidence: `README.md`)
- Job compatibility → Resume analysis API: requests match (evidence: `README.md`)
- Project questions → Project question API: requests questions (evidence: `README.md`)
- Live interview editor → Express and Socket.IO: opens session (evidence: `README.md`)
- Express and Socket.IO → User API: mounts (evidence: `backend/index.js`)
- Express and Socket.IO → Resume analysis API: mounts (evidence: `backend/index.js`)
- Express and Socket.IO → Resume file upload: mounts (evidence: `backend/index.js`)
- Express and Socket.IO → Project question API: mounts (evidence: `backend/index.js`)
- Express and Socket.IO → Interview history API: mounts (evidence: `backend/index.js`)
- User API → User records: reads and creates (evidence: `backend/routes/user.js`)
- User API → Token service: creates and validates tokens (evidence: `backend/routes/user.js`)
- User records → Token service: creates token (evidence: `backend/models/user.js`)
- Cookie authentication → Token service: validates token (evidence: `backend/middlewares/auth.js`)
- Interview history API → Cookie authentication: checks cookie (evidence: `backend/routes/interview.js`)
- Interview history API → Interview sessions: reads sessions (evidence: `backend/routes/interview.js`)
- Resume analysis API → Gemini client: requests analysis (evidence: `backend/routes/resume.js`)
- Project question API → Gemini client: requests questions (evidence: `backend/routes/project.js`)
- Gemini client → Google Gemini: sends prompts (evidence: `README.md`)
- Express and Socket.IO → Interview sessions: creates and updates (evidence: `backend/index.js`)
- Express and Socket.IO → Live Gemini bridge: starts live session (evidence: `backend/index.js`)
- Live Gemini bridge → Google Gemini: streams audio and receives responses (evidence: `backend/services/livegemini.js`)
- Express and Socket.IO → MongoDB: connects (evidence: `README.md`)
- Interview sessions → MongoDB: persists sessions (evidence: `README.md`)
- User records → MongoDB: persists users (evidence: `README.md`)
- Resume file upload → Cloudinary storage: stores resume (evidence: `README.md`)
