How abdulhamidalthaljy/resume-generator-with-ai-full-system works
Project Type & Purpose
• Full-stack web application for resume creation
• Frontend: Angular SPA (real-time preview, AI generation, template selection)
• Backend: Node.js/Express API (REST + Socket.io), Google OAuth, JWT auth, MongoDB persistence
• External integrations: Google Gemini AI, Google OAuth2, MongoDB Atlas
File Structure
Top-level directories:
• resume-builder-angular/ → Angular 17 app
• resume-builder-backend/ → Node.js/Express API
Key patterns:
• Frontend: component-based UI, services for API, Socket.io, AI, PDF, route guards
• Backend: MVC-style (controllers, models, routes), middleware (auth guard), services (PDF generator), utils (JWT), config (passport)
Config & deployment files:
• Railway/Terraform (railway.json), Vercel (vercel.json), nixpacks.toml
• Environment config (.env, environment.ts)
Extract Architecture Insights from README
• Frontend calls /api for CRUD, uses Socket.io events for real-time updates
• Backend exposes REST endpoints under /api and WebSocket namespace for events (resume:created, etc.)
• Google OAuth2 flow for login, JWT issued to client, stored in local storage & sent on API calls
• AI integration: backend calls Google Gemini Flash API; frontend calls AI endpoints via ai.service.ts
• PDF generation: fronted uses browser’s print-to-PDF; backend offers optional server-side PDF generator
Main Components & Interactions
A. Frontend (Angular SPA)
• UI Components (Dashboard, Resume-Builder, Activity-Feed, Template-Selector, etc.)
• Angular Services (HttpClient for REST, SocketService for WS, AiService for AI calls, TemplateService)
• Route Guard (AuthGuard)
• Environment module for API URLs
B. Backend (Node.js/Express)
• Express App (app.js / index.js)
• Routes (/api/auth, /api/resumes, /api/pdf)
• Controllers (resumeController.js)
• Services (pdfGeneratorService.js)
• Models (User.js, Resume.js)
• Middleware (ensureAuth.js)
• Auth Config (Passport.js + JWT util)
• Socket.io Server
C. Database
• MongoDB Atlas (Mongoose ODM)
D. External Services
• Google OAuth2 (Passport)
• Google Gemini API
• Vercel (Frontend deployment)
• Railway (Backend deployment)
Architectural Patterns & Principles
• Separation of concerns: UI vs. business logic vs. data access
• MVC on backend: controllers → services → models
• Component-based UI on frontend
• Reactive data flow (RxJS + Socket.io) for real-time updates
• Stateless JWT authentication for cross-origin requests