How jainikbhandari/resumeiq works
1. Overall shape
ResumeIQ is a two-tier MERN application: a React/Vite single-page app in client/ talks to an Express API in server/, and the backend persists users and resume reports in MongoDB Atlas. The frontend and backend are deployed separately, so the main architecture boundary is the REST API.
2. Frontend entry and shell
The client boots from main.jsx, renders App.jsx, and uses React Router to switch between public pages and authenticated dashboard pages. The page set includes login/register/reset-password flows plus the protected product areas: upload, result, dashboard, and history.
3. Frontend state and auth boundary
Authentication is centralized in context/AuthContext.jsx plus the useAuth hook, with route gating handled by ProtectedRoute.jsx. This is the client-side boundary that decides whether a user can enter the dashboard/history/result surfaces or must be redirected to login.
4. Client API layer
All backend communication is funneled through the small API layer in src/api/axios.js and src/api/config.js. That keeps the UI components and pages separated from backend URLs and request wiring, which matters for the diagram as the client does not directly embed business logic.
5. Public auth flows
The auth pages (Login, Register, ForgotPassword, ResetPassword) use the auth API to create accounts, sign users in, support Google login, and run password reset email/token flows. GoogleAuthButton is the client entry point for OAuth login, while auth.js in utils likely provides token/session helpers.
6. Resume upload and analysis flow
The main product flow starts on UploadResume.jsx: the user submits a PDF and optional job/role context. The backend accepts the multipart upload, extracts PDF text, scores the resume, runs Gemini-based analysis, generates interview questions and job-match insights, then returns a structured report that is shown in Result.jsx and persisted for history.
7. Backend request pipeline
server/app.js is the composition root: it connects Express routes, database initialization, middleware, and likely CORS/body parsing. Requests are split into authRoutes.js and resumeRoutes.js, with authMiddleware.js protecting all user-specific resume endpoints and uploadMiddleware.js handling PDF file ingestion.
8. Backend domain controllers
controllers/authController.js owns registration, login, Google token verification, profile lookup, forgot/reset password, and JWT issuance. controllers/resumeController.js owns upload, analysis orchestration, history retrieval, single-report fetch, and deletion. This is the main separation between identity logic and resume-processing logic.
9. Processing and AI services
The resume analysis pipeline is decomposed into service-like utilities: utils/atsScoring.js for deterministic ATS-style scoring, utils/gemini.js for LLM-generated analysis, and utils/sendEmail.js for password-reset mail. This separation keeps the controller layer thin and makes the AI/scoring logic reusable across requests.
10. Persistence model
MongoDB is modeled with models/User.js and models/Resume.js. User records support authentication and recovery data, while resume records store per-user analysis results so the history page can list, reopen, and delete previous reports independently for each account.
11. User-facing dashboard features
The dashboard area is composed from reusable UI pieces such as Navbar, AppLoader, and GoogleAuthButton, plus pages for Dashboard, History, and Result. The app also includes accessibility and usability features like read-aloud, report PDF download, light/dark mode, and mobile bottom navigation, all driven from the frontend layer.
12. External services and deployment
The backend depends on MongoDB Atlas, Google OAuth, Gemini API, and SMTP email delivery; the frontend is a static SPA hosted on Vercel, and the API is hosted on Render. Environment variables are therefore a critical architectural boundary: the client only needs the API base URL and Google client ID, while the server owns database, JWT, Gemini, OAuth, and email secrets.
13. Data flow summary
The typical end-to-end path is: browser login/session state → protected dashboard → PDF upload to Express → auth/file middleware → PDF text extraction and scoring/LLM analysis → MongoDB persistence → response rendering in the client → optional history lookup, deletion, or report download. That’s the key flow an architecture diagram should emphasize.
Main entry points: App.jsx App shell · axios.js API layer · resumeController.js Resume controller · app.js Express app
Components 31
Client
React/Vite single-page app and UI flows
- Main · Bootstraps the React app and renders the root shell
client/src/main.jsx - App shell · Defines the application routes and page composition
client/src/App.jsx - Auth context · Central client-side auth state and session handling
client/src/context/AuthContext.jsx - Protected route · Blocks dashboard areas unless the user is authenticated
client/src/components/ProtectedRoute.jsx - API layer · Shared Axios configuration and backend endpoint wiring
client/src/api/axios.js - Login · Signs users in and starts the session
client/src/pages/Login.jsx - Register · Creates new user accounts
client/src/pages/Register.jsx - Password reset · Forgot and reset password screens
client/src/pages/ForgotPassword.jsx - Upload resume · Main intake screen for PDF upload and role context
client/src/pages/UploadResume.jsx - Result view · Displays analysis, score, and generated insights
client/src/pages/Result.jsx - Dashboard · Authenticated landing area and summary surface
client/src/pages/Dashboard.jsx - History · Lists prior reports for the current user
client/src/pages/History.jsx
Server
Express API, middleware, controllers, and persistence
- Express app · Composes middleware, routes, and database setup
server/app.js - Auth routes · HTTP endpoints for sign-in, signup, profile, and recovery
server/routes/authRoutes.js - Resume routes · HTTP endpoints for upload, report retrieval, history, and deletion
server/routes/resumeRoutes.js - Auth controller · Registration, login, Google auth, profile, and password reset logic
server/controllers/authController.js - Resume controller · Upload orchestration, analysis, persistence, history, and deletion
server/controllers/resumeController.js - Auth middleware · Verifies JWTs for user-specific resume endpoints
server/middleware/authMiddleware.js - Upload middleware · Handles multipart PDF ingestion
server/middleware/uploadMiddleware.js - Database config · Connects the API to MongoDB
server/config/db.js - User model · Stores auth and recovery data
server/models/User.js - Resume model · Stores per-user analysis reports and history
server/models/Resume.js - ATS scoring · Deterministic resume scoring and rule-based checks
server/utils/atsScoring.js - Gemini analysis · LLM-backed resume insights and interview question generation
server/utils/gemini.js - Email service · Sends password-reset messages
server/utils/sendEmail.js
External services
Managed services the app integrates with
- MongoDB Atlas · Persistent storage for users and resume reports
- Google OAuth · Google sign-in and token verification
- Gemini API · Generative analysis provider used by resume processing
- SMTP provider · Outbound email transport for recovery flows
- Vercel · Static hosting for the client SPA
- Render · Hosting for the Express API
Connections 38
- Main → App shell: renders · Application entry mounts the router shell
- App shell → Auth context: uses · Route and session decisions depend on auth state
- App shell → Protected route: protects · Authenticated sections are wrapped with route guarding
- App shell → Login: routes to · Public auth flow for sign-in
- App shell → Register: routes to · Public auth flow for account creation
- App shell → Password reset: routes to · Password recovery flow
- App shell → Upload resume: routes to · Primary resume submission screen
- App shell → Result view: routes to · Displays the generated report
- App shell → Dashboard: routes to · Authenticated landing area
- App shell → History: routes to · Report history surface
- Login → API layer: calls · Uses shared HTTP client for auth requests
- Register → API layer: calls · Uses shared HTTP client for signup requests
- Password reset → API layer: calls · Uses shared HTTP client for recovery requests
- Upload resume → API layer: submits · Uploads resume and context to the API
- Result view → API layer: fetches · Retrieves report data when needed
- History → API layer: lists · Loads prior reports from the API
- Auth context → API layer: attaches · Auth layer adds session-aware request handling
- Express app → Auth routes: mounts · Wires auth endpoints into the API
- Express app → Resume routes: mounts · Wires resume endpoints into the API
- Express app → Database config: connects · Initializes database connection on startup
- Auth routes → Auth controller: delegates · Auth requests are handled by the controller
- Resume routes → Auth middleware: guards · Protects user-scoped resume operations
- Resume routes → Upload middleware: ingests · Handles PDF multipart upload before processing
- Resume routes → Resume controller: delegates · Resume requests are handled by the controller
- Auth controller → User model: reads/writes · Creates and updates user records
- Auth controller → Google OAuth: verifies · Validates Google login tokens
- Auth controller → Email service: sends · Triggers password reset emails
- Email service → SMTP provider: uses · Relies on outbound mail transport
- Resume controller → ATS scoring: scores · Runs deterministic ATS-style evaluation
- Resume controller → Gemini analysis: analyzes · Calls LLM service for generated insights
- Resume controller → Resume model: reads/writes · Persists and retrieves resume reports
- Resume controller → User model: associates · Links reports to the authenticated user
- Database config → MongoDB Atlas: connects to · MongoDB Atlas stores application data
- User model → MongoDB Atlas: persists to · User documents live in MongoDB
- Resume model → MongoDB Atlas: persists to · Report documents live in MongoDB
- Gemini analysis → Gemini API: calls · Uses the Gemini API for generation
- App shell → Vercel: deployed on · Frontend SPA is hosted separately
- Express app → Render: deployed on · API service is hosted separately