How visheshrao17/resume_builder- works
1. Two-tier architecture
- The repo is split into a React/Vite client and an Express/MongoDB server.
- The client owns the resume-building UI, local draft state, client-side scoring, and PDF preview/export.
- The server owns persistence, authentication, and AI-assisted resume rewriting.
2. Frontend shell and navigation
- client/src/App.jsx, main.jsx, and pages/ define the app entry and page-level boundaries.
- The main user flows are represented by Home, Login, Dashboard, ResumeBuilder, Preview, and Layout.
- This suggests a routed SPA with a marketing entry point plus an authenticated workspace.
3. State management split
- The client uses Zustand stores for transient UI/auth concerns: useAuthStore and useUIStore.
- TanStack Query is used for server-synced resume data through useResumes and queryClient.
- Draft resume data can be stored locally via useLocalDraft, enabling offline/anonymous editing before syncing.
4. Resume editor as a composed form system
- The builder is broken into section-specific components: personal info, summary, education, experience, projects, and skills.
- TemplateSelector and ColorPicker control presentation rather than content.
- This indicates a structured resume object assembled from independent form slices.
5. Template-driven preview layer
- ResumePreview renders the selected design using template components in components/templates/.
- The available templates include Classic, Modern, Minimal, and MinimalImage.
- The preview layer is separate from the form layer, so content editing and visual styling are decoupled.
6. PDF generation/export boundary
- The PDF subsystem lives under components/pdf/ and likely uses @react-pdf/renderer as described in the README.
- PDFDocument, PDFStyles, and DownloadButton form the export pipeline.
- This is a distinct rendering path from the on-screen preview, which matters for ATS-safe vector output.
7. ATS simulation and scoring UI
- The components/ats/ area contains ATSPreview and ATSScoreCard, and components/scoring/MatchScorePanel handles resume-vs-job-description scoring.
- The README says the match scoring is powered client-side by a BM25 retrieval algorithm in lib/bm25.js.
- This keeps the scoring/diagnostics experience local to the browser rather than dependent on the API.
8. Client-side algorithmic module
- client/src/lib/bm25.js is a focused utility with its own test file, bm25.test.js.
- That makes the scoring logic an isolated computational subsystem with test coverage in Vitest.
- The architecture therefore includes both UI-driven and algorithm-driven client logic.
9. Marketing/home experience
- The components/home/ folder contains the landing-page composition: hero, banner, features, testimonials, CTA, title, and footer.
- This is a separate public-facing surface from the authenticated builder flow.
- It likely acts as the acquisition layer feeding into login or resume creation.
10. Backend API surface
- The server exposes three route groups: user.routes.js, resume.routes.js, and ai.routes.js.
- Controllers under controllers/ map those routes to user management, resume persistence, and AI operations.
- middleware/auth.middleware.js suggests protected endpoints for authenticated resume access.
11. Persistence and external services
- MongoDB is the primary database, with models/user.model.js and models/resume.model.js defining stored entities.
- configs/db.js manages the database connection.
- configs/ai.js integrates OpenAI for the bullet-rewriting feature described in the README.
- configs/imageKit.js and configs/multer.js imply media upload/hosting support, likely for profile images or resume assets.
12. Data flow through the system
- A user edits resume sections in the client, with drafts optionally saved locally first.
- When authenticated, resume state is synchronized to the backend through query-based fetch/mutation flows.
- The same resume data can then be rendered into a visual template, exported as PDF, or analyzed for ATS/match scoring.
- AI-assisted content rewriting flows from the builder UI to the server’s OpenAI-backed endpoint and returns improved bullet text.
13. Operational/tooling boundary
- The repo includes Vitest for algorithm tests and Playwright for browser-level E2E checks.
- .github/workflows/ci.yml indicates CI gating on build/test health.
- This is a repository with both UI correctness and algorithm correctness enforced in automation.
14. Overall architecture summary
- The system is best diagrammed as: public marketing site + authenticated resume builder + client-side scoring/export engine + API server + MongoDB/OpenAI integrations.
- The key architectural boundary is that content editing, template rendering, ATS scoring, and PDF generation are primarily client-side, while persistence and AI assistance are server-side.
Main entry points: ResumeBuilder.jsx Builder · pages Pages · Preview.jsx Preview page · controllers Controllers
Components 25
Client
React/Vite SPA for resume creation, preview, scoring, and export.
- App shell · React entry and routed application shell.
client/src/App.jsx - Pages · Public and authenticated page-level boundaries.
client/src/pages - Home view · Public landing experience and acquisition flow.
client/src/pages/Home.jsx - Builder · Authenticated resume editing workspace.
client/src/pages/ResumeBuilder.jsx - Preview page · Dedicated resume preview and export surface.
client/src/pages/Preview.jsx - Dashboard · Authenticated overview and resume management view.
client/src/pages/Dashboard.jsx - Layout · Shared page chrome and navigation wrapper.
client/src/pages/Layout.jsx - UI stores · Client state for auth and UI concerns.
client/src/stores - Resume queries · TanStack Query hooks for resume fetch and mutation.
client/src/hooks/useResumes.js - Local draft · Browser-side draft persistence before sync.
client/src/hooks/useLocalDraft.js - Editor forms · Sectioned resume inputs for content assembly.
client/src/components - Templates · Template selection and preview rendering layer.
client/src/components/templates - PDF export · On-demand PDF document rendering and download.
client/src/components/pdf - ATS tools · ATS preview, score card, and match scoring panel.
client/src/components/ats - BM25 scorer · Client-side retrieval scoring for job-match analysis.
client/src/lib/bm25.js - Home modules · Hero, features, testimonials, and CTA composition.
client/src/components/home
Server
Express API for auth, persistence, and AI-assisted rewriting.
- Server entry · Express application bootstrap and middleware wiring.
server/server.js - Routes · User, resume, and AI route groups.
server/routes - Controllers · Route handlers for auth, persistence, and AI actions.
server/controllers - Models · MongoDB user and resume data models.
server/models - Services · Database, OpenAI, upload, and media configuration.
server/configs - Auth middleware · Protected route enforcement for authenticated access.
server/middleware/auth.middleware.js
Tooling
Tests and CI around client, server, and end-to-end flows.
- CI workflow · Repository CI gating for build and test health.
.github/workflows/ci.yml - E2E spec · Playwright coverage for the resume builder flow.
e2e/resume-builder.spec.js - BM25 test · Vitest coverage for the scoring algorithm.
client/src/lib/bm25.test.js
Connections 31
- App shell → Pages: routes · App shell defines page-level navigation.
- Pages → Home view: public · Landing page surface.
- Pages → Builder: workspace · Authenticated editor flow.
- Pages → Preview page: preview · Dedicated preview/export page.
- Pages → Dashboard: dashboard · Resume management surface.
- Pages → Layout: wraps · Shared shell around pages.
- Builder → Editor forms: edits · Structured section forms assemble resume content.
- Builder → UI stores: ui state · Auth and UI state management.
- Builder → Resume queries: syncs · Server-backed resume data flow.
- Builder → Local draft: drafts · Local first editing before sync.
- Builder → Templates: styles · Template selection and visual composition.
- Templates → Preview page: renders · Preview uses template components.
- Preview page → PDF export: exports · PDF rendering boundary for download.
- Preview page → ATS tools: analyzes · ATS diagnostics and match scoring surface.
- ATS tools → BM25 scorer: scores · Client-side BM25 ranking logic.
- Home view → Home modules: composes · Landing page UI modules.
- Resume queries → Server entry: api · Data sync calls into backend endpoints.
- UI stores → Server entry: auth · Client auth state supports protected API use.
- Editor forms → Templates: feeds · Edited content flows into rendering.
- PDF export → Templates: source · PDF export uses resume content and layout decisions.
- Server entry → Routes: mounts · Express entry wires route groups.
- Routes → Controllers: delegates · Routes hand off request handling.
- Controllers → Models: persists · Controllers read and write MongoDB entities.
- Controllers → Services: integrates · Controllers use AI and infrastructure services.
- Routes → Auth middleware: protects · Auth middleware secures private endpoints.
- Services → Models: db · Database connection underpins persistence.
- Services → Controllers: ai · OpenAI-backed rewriting supports resume assistance.
- CI workflow → App shell: checks · CI validates client build and tests.
- CI workflow → Server entry: checks · CI validates server build and tests.
- E2E spec → Builder: covers · End-to-end coverage for editor flow.
- BM25 test → BM25 scorer: covers · Algorithm test coverage for scoring logic.