How abhinavsaxena2308/ai-resume-builder works
1. Overall shape
- This repo is a two-tier application: a React + Vite frontend in the repository root and a separate Node/Express backend in backend/.
- The frontend is the user-facing resume builder and content site; the backend is the API boundary for AI generation, resume data, and admin/protected operations.
2. Frontend shell
- src/main.jsx, src/App.jsx, and src/pages/ define the app runtime and route-level screens.
- The page set includes the core product flows (Builder, Dashboard, Auth, Admin) plus informational pages (AboutUs, CareerTips, InterviewTips, ResumeTips, ViewExamples, legal pages, and NotFound).
3. Resume-building UI
- The resume editor experience is composed from EnhancedResumeForm, ResumePreview, TemplateSelector, and the three template components under src/components/ResumeTemplates/.
- This is the main interactive workflow: collect resume content, choose a visual template, and preview the output live in the browser.
4. AI assistance path
- AI help is surfaced through useGeminiSuggestions, AiSuggestionsPopup, and the backend geminiSuggestions route.
- The browser sends user input to the backend, the backend calls Google’s Generative Language API, and the suggestion text comes back as JSON for display in the UI.
5. Frontend service boundary
- src/services/api.js is the frontend’s HTTP abstraction for backend calls.
- This is the main boundary between the React app and Express API, keeping UI components from knowing backend details.
6. Backend API structure
- backend/server.js is the Express entry point and mounts the route modules in backend/routes/.
- The backend is split into three feature areas:
- routes/resumes.js for resume CRUD or resume-related data operations
- routes/geminiSuggestions.js for AI generation
- routes/admin.js for protected/admin workflows
7. Security and identity
- backend/middleware/auth.js is the main authorization gate for protected routes.
- The frontend also has a Firebase integration client in src/integrations/firebase/client.js, indicating the app uses Firebase on the client side for identity/session-related concerns.
8. Persistence and environment abstraction
- backend/config/firebase.js and backend/config/mockFirestore.js show a storage abstraction: the backend can talk to Firebase/Firestore in one mode and use a local mock in another.
- That makes persistence and testing easier without changing higher-level route code.
9. Rendering and presentation assets
- The backend includes backend/templates/*.ejs with ATS, classic, and modern variants, suggesting server-side templating or document rendering support.
- The frontend mirrors this with template components, so the visual system is duplicated intentionally across browser preview and backend-rendered formats.
10. Operational scripts and quality checks
- backend/scripts/verify-connection.js, monitor.js, and archive.js are maintenance utilities rather than user features.
- backend/tests/api.test.js provides API-level verification, and the root vercel.json plus separate frontend/backend package files suggest deployment is configured as distinct runtime targets.
11. Cross-cutting UI concerns
- ThemeContext, ThemeToggle, BackgroundEffects, VideoBackground, and the various UI primitives under src/components/ui/ form the shared presentation layer.
- Theme persistence is client-side via local storage, so it does not affect backend state or API contracts.
Main entry points: server.js Express server · index.jsx Pages · EnhancedResumeForm.jsx Resume builder · admin.js Admin API
Components 17
Frontend
React + Vite app in the repo root
- App shell · Bootstraps the SPA and route-level navigation
src/main.jsx - Pages · Product and content pages for the app
src/pages/index.jsx - Resume builder · Core resume creation and live preview workflow
src/components/EnhancedResumeForm.jsx - Templates · Resume template selection and visual variants
src/components/ResumeTemplates/TemplateSelector.jsx - AI assist · Browser-side Gemini suggestion trigger and popup display
src/hooks/useGeminiSuggestions.js - API client · Frontend abstraction for backend requests
src/services/api.js - Theme UI · Global theming and reusable presentation components
src/contexts/ThemeContext.jsx - Firebase client · Client-side Firebase integration for session or identity concerns
src/integrations/firebase/client.js
Backend
Express API and supporting server-side assets
- Express server · Backend entry point that mounts feature routes
backend/server.js - Resumes API · Resume CRUD and resume-related data operations
backend/routes/resumes.js - Gemini API · Backend endpoint that calls the Generative Language API
backend/routes/geminiSuggestions.js - Admin API · Admin and privileged backend workflows
backend/routes/admin.js - Auth gate · Authorization middleware for protected routes
backend/middleware/auth.js - Storage config · Switches between Firebase/Firestore and local mock persistence
backend/config/firebase.js - EJS templates · Server-side ATS, classic, and modern template variants
backend/templates/modern.ejs - Ops scripts · Verification, monitoring, and archive utilities
backend/scripts/monitor.js - API tests · Backend API-level verification
backend/tests/api.test.js
Connections 18
- App shell → Pages: renders · The app shell hosts the route-level screens
- Pages → Resume builder: includes · Builder pages surface the core editing workflow
- Resume builder → Templates: chooses · Editor flow selects a visual template
- Resume builder → AI assist: requests help · The editor can open AI suggestions for the current content
- AI assist → API client: calls · Suggestion requests go through the shared API client
- Pages → Theme UI: shares UI · Pages use common theme and presentation components
- Pages → Firebase client: uses identity · Client-side Firebase supports auth/session concerns
- API client → Express server: requests · Frontend HTTP calls terminate at the Express API
- Express server → Resumes API: mounts · Server exposes resume-related endpoints
- Express server → Gemini API: mounts · Server exposes AI suggestion endpoints
- Express server → Admin API: mounts · Server exposes protected admin endpoints
- Admin API → Auth gate: protects · Admin workflows are guarded by authorization middleware
- Resumes API → Storage config: persists via · Resume data flows through the storage abstraction
- Admin API → Storage config: persists via · Admin workflows also rely on the same persistence layer
- Gemini API → Storage config: reads config · AI route shares the backend environment and storage setup
- EJS templates → Templates: mirrors · Server-rendered and browser-rendered templates stay aligned
- Ops scripts → Express server: maintain · Utility scripts support backend operations
- API tests → Express server: verifies · Tests exercise the API surface