How anurag3407/career-pilot works
1. Top-level shape
- This is a two-part monorepo: a React 19 + Vite frontend in frontend/ and a Node.js backend API/service layer in backend/.
- The product is not just a resume builder; it is a broader career platform with portfolios, job tools, GitHub analysis, interview prep, community/chat, and admin features.
2. Frontend as the user-facing orchestration layer
- frontend/src/pages/ defines the major product areas: ResumeBuilder, TemplateGallery, JobSearch, JobTracker, JobAlerts, GitHubDashboard, RepoAnalyzer, ProjectVisualizer, Community, InterviewPrep, Enhance, Deployments, Settings, Admin, and auth pages.
- frontend/src/components/ is heavily domain-split: portfolio/, analyzer/, community/, github/, visualizer/, and ui/.
- The frontend mostly assembles workflows and visualizations; it delegates persistence, AI, job fetching, deployment, and collaboration to backend services through frontend/src/services/api.js and socket clients.
3. Portfolio builder / template system
- Portfolio generation is a core subsystem, backed by a very large template catalog under frontend/src/components/portfolio/templates/ and reusable portfolio controls like ThemeSelector, DeployModal, SocialLinksEditor, and ColorCustomizer.
- The backend complements this with backend/src/services/portfolioTemplateEngine.js, portfolioHtmlGenerator.js, pdfGenerator.js, portfolioGitHubSync.js, and deployment adapters for Cloudflare, GitHub Pages, and Netlify.
- Data flow: user profile/resume/content → template selection/customization in frontend → backend HTML/PDF generation → deployment target or export.
4. Resume and document pipeline
- Resume-related routes and services are a distinct boundary: backend/src/routes/resume.js, enhance.js, input.route.js, and supporting schemas/models like Resume, ResumeVersion, ResumeAtsHistory, and Resume-related validation.
- AI-assisted resume features are supported by atsScorer.js, resumeparser.js, structuredDataGenerator.js, and htmlSanitizer.js, with frontend pages such as ResumeBuilder, TextToResume, ResumeView, and Upload.
- This subsystem turns uploaded or entered content into scored, structured, and exportable resume artifacts.
5. AI and content-generation subsystem
- AI is a first-class backend layer under backend/src/services/ai/ plus providers in backend/src/config/aiProviders.js, genAI.js, langchain.js, and config/providers/openrouter.js.
- Feature services include careerTrajectory.js, portfolioContentEnhancer.js, linkedinHelper.js, jobSummarizer.js, emailGeneratorService.js, and linkedinOptimizerService.js.
- Typical flow: frontend request → backend AI orchestration → provider-specific calls (OpenRouter, Anthropic/GenAI/LangChain) → scored or generated content returned to the UI.
6. Job intelligence and tracking
- Job-related functionality is split between fetch/import, alerts, search, and tracking.
- Backend services include jobFetcher.js, rapidApiService.js, jobAlertQueue.js, jobAlertSocket.js, searchService.js, companyResearchService.js, jobSummarizer.js, and scraper implementations in services/scrapers/.
- Persistent models such as Job, JobListing, TrackedJob, JobAlert, and NotificationLog indicate this subsystem stores both raw jobs and user-specific tracking state.
7. GitHub and repository analysis
- The repo has a dedicated GitHub intelligence path: backend/src/routes/repoAnalyzer.js, githubImporter.js, githubEnricherService.js, repoIngestionService.js, and analysisService.js.
- Frontend support appears in GitHubDashboard, RepoAnalyzer, and ProjectVisualizer pages plus components like contribution heatmaps, repo cards, and risk/suggestion visualizers.
- This subsystem ingests repository metadata/commits/languages and turns them into dashboards, architecture views, and recommendations.
8. Community, chat, and real-time collaboration
- Real-time features are centered on Socket.IO and Firebase: backend config/socket.js, services/socketServiceFirebase.js, jobAlertSocket.js, presenceService.js, and frontend SocketContext, SocketProvider, useSocket, and community components.
- Routes like community.js, fellowships.js, interview.js, and emailTracking.js suggest collaborative and social workflows, not just CRUD.
- The architecture supports live messaging, presence, notifications, and streaming-style updates rather than only request/response interactions.
9. Authentication, authorization, and security boundaries
- Auth and account protection are enforced by middleware such as auth.js, auth.middleware.js, loginProtection.js, rateLimiter.js, twoFactorService.js, socketAuth.js, and validation middleware.
- Frontend auth state lives in AuthContext/AuthProvider, with Firebase config also present on the client side.
- Security-related models (User, LoginAttempt, TwoFactor, TokenUsage) show the platform tracks access, abuse prevention, and MFA state centrally.
10. Persistence model
- The backend’s src/models/ directory shows a document-style domain model with entities for users, resumes, portfolios, projects, jobs, interviews, notifications, proposals, fellowships, token usage, and analytics history.
- This is the main durable state boundary for the system: most product areas persist their own histories, versions, and logs rather than relying on ephemeral in-memory state.
- The presence of versioned models like PortfolioVersion and ResumeVersion indicates the app treats content evolution as first-class.
11. Media, files, and uploads
- File and media handling is isolated in upload middleware/services and supporting utilities like faviconGenerator.js, screenshotService.js, and cloudinary.js.
- Frontend upload and drag/drop interactions are supported by components like DropZone, FileUpload, and DragHandle.
- This boundary likely covers avatar/resume uploads, portfolio assets, screenshots, and generated artifacts.
12. Operational services and background work
- There is explicit support for background and scheduled jobs via queueManager.js, postScheduler.js, weeklyDigestService.js, and notificationServices.js.
- Observability is present through metrics.js, Prometheus config (prometheus.yml), and deploy-health workflow automation in .github/workflows/deploy-health.yml.
- The system is built to run non-interactively for alerting, digests, scraping, and health checks in addition to serving APIs.
13. External infrastructure and deployment
- The repo integrates multiple deployment targets: Cloudflare Pages/Workers (.wrangler/, cloudflareDeployer.js), GitHub Pages (githubPagesDeployer.js), Netlify (netlifyDeployer.js), and frontend hosting config via frontend/vercel.json.
- Firebase is also a major external dependency: firebase.json, Firestore rules/indexes, and storage rules indicate auth/data/storage integration.
- Redis, Cloudinary, AI providers, email services, and GitHub APIs are all external service boundaries that materially affect runtime behavior.
14. How the main request flow likely looks
- Browser actions start in the React app, which calls backend routes through the API client layer.
- Backend middleware authenticates, validates, rate-limits, and optionally streams results.
- Services then read/write persistent models, call out to Firebase/AI/GitHub/job providers/Redis/Cloudinary, and return structured results to the frontend.
- For live features, the backend also pushes socket events back to the client.
15. What to draw as the core architecture
- At minimum, the diagram should show: Frontend SPA, Backend API, Database/models, Firebase, Redis, Socket real-time layer, AI providers, job/GitHub/email/file external services, and deployment targets.
- Around that, group the backend into the major domains: auth/security, resume/portfolio generation, AI assistance, job intelligence, GitHub analysis, community/realtime, and admin/analytics.
Main entry points: pages Product Pages · routes API Routes · firebase.js External Adapters · index.js Server Entry
Components 30
Frontend SPA
React 19 + Vite user-facing application and orchestration layer
- App Shell · Top-level client routing, layouts, and auth/bootstrap flow
frontend/src/App.jsx - Product Pages · Main feature entry points for resume, jobs, GitHub, community, admin, and settings
frontend/src/pages - Domain UI · Feature components split by portfolio, analyzer, community, GitHub, visualizer, and shared UI
frontend/src/components - API Client · Frontend service layer used to call backend APIs and subscribe to live updates
frontend/src/services/api.js - Socket Context · Client-side socket and presence wiring for live collaboration and notifications
frontend/src/context/SocketContext.js - Auth Context · Browser auth state and session management
frontend/src/context/AuthContext.js - Portfolio Builder · Template gallery, theme controls, deployment modal, and portfolio workflows
frontend/src/components/portfolio - Resume Tools · Resume builder, text-to-resume, upload, scoring, versions, and review views
frontend/src/pages/ResumeBuilder.jsx - Job Tools · Search, tracker, alerts, and job intelligence user flows
frontend/src/pages/JobSearch.jsx - GitHub Views · Repository dashboards, analysis workspace, and project visualization pages
frontend/src/pages/GitHubDashboard.jsx - Community Hub · Chat, posts, members, direct messages, and fellowship workflows
frontend/src/pages/Community.jsx
Backend API
Node.js service layer, domain routes, and orchestration services
- Server Entry · Backend bootstrap, middleware registration, and route mounting
backend/src/index.js - API Routes · Primary HTTP boundaries for auth, resume, portfolio, jobs, community, analysis, and admin
backend/src/routes - Middleware · Auth, rate limiting, validation, upload, streaming, and error handling
backend/src/middleware - AI Orchestration · Provider integration and feature-specific content generation services
backend/src/services/ai - Resume Pipeline · Parsing, ATS scoring, structure generation, sanitization, and versioning
backend/src/services/atsScorer.js - Portfolio Engine · Template engine, HTML/PDF generation, GitHub sync, and deployment adapters
backend/src/services/portfolioTemplateEngine.js - Job Intelligence · Fetching, scraping, searching, alerting, summarizing, and research services
backend/src/services/jobFetcher.js - Repo Analysis · Ingestion, enrichment, analysis, and repository intelligence pipeline
backend/src/services/repoIngestionService.js - Realtime Layer · Socket.IO, Firebase sync, presence, and alert push services
backend/src/config/socket.js - External Adapters · Firebase, Redis, Cloudinary, email, payment, and deployment provider clients
backend/src/config/firebase.js - Portfolio Templates · Backend-rendered portfolio template catalog and email templates
backend/src/templates/portfolio
Persistence
Durable domain models and schema-backed state
- Domain Models · User, resume, portfolio, job, community, interview, analytics, and security entities
backend/src/models/User.model.js
External Services
Third-party providers and infrastructure the app depends on
- Firebase · Firestore, storage, and Firebase-backed realtime/auth integration
firebase.json - Redis · Caching, queueing, and ephemeral coordination store
backend/src/config/redis.js - AI Providers · OpenRouter, Anthropic, GenAI, and LangChain-backed model providers
backend/src/config/aiProviders.js - Job Sources · RapidAPI and scraper-based job feeds and listings sources
backend/src/services/rapidApiService.js - GitHub API · GitHub metadata, commits, languages, and repository enrichment source
backend/src/services/githubImporter.js - Deploy Targets · Cloudflare Pages/Workers, GitHub Pages, Netlify, and Vercel deployment surfaces
backend/src/services/deploy/cloudflareDeployer.js
Operations
Background jobs, metrics, and deployment automation
- Metrics · Prometheus metrics and health-check automation
prometheus.yml
Connections 34
- App Shell → Product Pages: routes to · App shell exposes the major product areas
- App Shell → Domain UI: renders · Pages are assembled from shared and domain components
- Product Pages → API Client: calls · User actions request backend data and mutations
- Product Pages → Socket Context: subscribes · Community, alerts, and presence use realtime updates
- App Shell → Auth Context: auth state · Client session and guarded routing depend on auth context
- Product Pages → Portfolio Builder: builds · Portfolio pages drive template selection and customization
- Product Pages → Resume Tools: drives · Resume-related screens feed the document pipeline
- Product Pages → Job Tools: drives · Job search, tracking, and alerts screens connect to job services
- Product Pages → GitHub Views: drives · GitHub dashboards and analyzers present repository intelligence
- Product Pages → Community Hub: drives · Community and fellowship screens manage social workflows
- API Client → Server Entry: requests · Client API layer talks to the backend service entry
- Server Entry → Middleware: uses · Requests pass through security, validation, upload, and error middleware
- Server Entry → API Routes: mounts · Backend entry mounts the feature route groups
- API Routes → Resume Pipeline: resume · Resume routes invoke parsing, scoring, and versioning services
- API Routes → Portfolio Engine: portfolio · Portfolio routes generate, sync, and deploy artifacts
- API Routes → AI Orchestration: ai · AI routes and feature services orchestrate content generation
- API Routes → Job Intelligence: jobs · Job routes fetch, search, track, and alert on listings
- API Routes → Repo Analysis: repo analysis · Repo analyzer and project visualizer routes ingest GitHub data
- API Routes → Realtime Layer: realtime · Community, alerts, and presence routes integrate socket services
- API Routes → Domain Models: persists · Feature routes read and write durable domain state
- AI Orchestration → AI Providers: delegates to · Feature generation is executed through provider adapters
- Resume Pipeline → Domain Models: stores · Resume artifacts and histories are versioned in models
- Resume Pipeline → External Adapters: exports · Resume artifacts can be exported and stored via external services
- Portfolio Engine → Portfolio Templates: renders · Template engine consumes the portfolio template catalog
- Portfolio Engine → Deploy Targets: deploys · Generated portfolios are published to hosting targets
- Job Intelligence → Job Sources: ingests · Job services combine APIs and scrapers for listings
- Job Intelligence → Redis: queues · Alerts and background processing use Redis-backed coordination
- Repo Analysis → GitHub API: ingests · Repository analysis depends on GitHub metadata and content
- Realtime Layer → Firebase: syncs · Realtime presence and chat use Firebase-backed channels
- External Adapters → Firebase: connects · Firebase is a central external dependency for auth/data/storage
- External Adapters → Redis: connects · Caching and queues use Redis
- External Adapters → Deploy Targets: connects · Deployment adapters bridge to hosting platforms
- Domain Models → External Adapters: backed by · Persistent entities sit behind external storage and service adapters
- Metrics → Server Entry: observes · Metrics and health checks watch the backend runtime