# anurag3407/career-pilot architecture

> Architecture diagram of the GitHub repository anurag3407/career-pilot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anurag3407/career-pilot
- Repository: https://github.com/anurag3407/career-pilot

## Overview

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: [`frontend/src/pages`](https://github.com/anurag3407/career-pilot/tree/main/frontend/src/pages) (Product Pages), [`backend/src/routes`](https://github.com/anurag3407/career-pilot/tree/main/backend/src/routes) (API Routes), [`backend/src/config/firebase.js`](https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/firebase.js) (External Adapters), [`backend/src/index.js`](https://github.com/anurag3407/career-pilot/blob/main/backend/src/index.js) (Server Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend SPA"]
  node_frontend_app["App Shell<br/>React SPA<br/>[App.jsx]"]
  node_frontend_pages["Product Pages<br/>Route screens"]
  node_frontend_components["Domain UI<br/>UI components"]
  node_frontend_api["API Client<br/>HTTP/socket client<br/>[api.js]"]
  node_frontend_socket["Socket Context<br/>Realtime client<br/>[SocketContext.js]"]
  node_frontend_auth["Auth Context<br/>Client auth<br/>[AuthContext.js]"]
  node_frontend_portfolio["Portfolio Builder<br/>Portfolio UI"]
  node_frontend_resume["Resume Tools<br/>Resume UI<br/>[ResumeBuilder.jsx]"]
  node_frontend_jobs["Job Tools<br/>Jobs UI<br/>[JobSearch.jsx]"]
  node_frontend_github["GitHub Views<br/>GitHub UI"]
  node_frontend_community["Community Hub<br/>Community UI<br/>[Community.jsx]"]
end

subgraph group_backend["Backend API"]
  node_backend_index["Server Entry<br/>Express app<br/>[index.js]"]
  node_backend_routes["API Routes<br/>Route layer"]
  node_backend_middleware["Middleware<br/>Cross-cutting"]
  node_backend_ai["AI Orchestration<br/>AI services"]
  node_backend_resume["Resume Pipeline<br/>Document pipeline<br/>[atsScorer.js]"]
  node_backend_portfolio["Portfolio Engine<br/>Generation/deploy"]
  node_backend_jobs["Job Intelligence<br/>Jobs services<br/>[jobFetcher.js]"]
  node_backend_github["Repo Analysis<br/>GitHub services"]
  node_backend_realtime["Realtime Layer<br/>Sockets/presence<br/>[socket.js]"]
  node_backend_integrations["External Adapters<br/>Provider adapters<br/>[firebase.js]"]
  node_backend_templates["Portfolio Templates<br/>Template assets"]
end

subgraph group_data["Persistence"]
  node_backend_models[("Domain Models<br/>Persistence models<br/>[User.model.js]")]
end

subgraph group_external["External Services"]
  node_firebase[("Firebase<br/>Auth/data/storage<br/>[firebase.json]")]
  node_redis[("Redis<br/>Cache/queue<br/>[redis.js]")]
  node_ai_providers{{"AI Providers<br/>LLM APIs<br/>[aiProviders.js]"}}
  node_job_sources{{"Job Sources<br/>Job APIs/scrapers<br/>[rapidApiService.js]"}}
  node_github_api{{"GitHub API<br/>Repo data source<br/>[githubImporter.js]"}}
  node_cloud_deploy{{"Deploy Targets<br/>Hosting targets"}}
end

subgraph group_ops["Operations"]
  node_monitoring(("Metrics<br/>Observability<br/>[prometheus.yml]"))
end

node_frontend_app -->|"routes to"| node_frontend_pages
node_frontend_app -->|"renders"| node_frontend_components
node_frontend_pages -->|"calls"| node_frontend_api
node_frontend_pages -->|"subscribes"| node_frontend_socket
node_frontend_app -->|"auth state"| node_frontend_auth
node_frontend_pages -->|"builds"| node_frontend_portfolio
node_frontend_pages -->|"drives"| node_frontend_resume
node_frontend_pages -->|"drives"| node_frontend_jobs
node_frontend_pages -->|"drives"| node_frontend_github
node_frontend_pages -->|"drives"| node_frontend_community
node_frontend_api -->|"requests"| node_backend_index
node_backend_index -->|"uses"| node_backend_middleware
node_backend_index -->|"mounts"| node_backend_routes
node_backend_routes -->|"resume"| node_backend_resume
node_backend_routes -->|"portfolio"| node_backend_portfolio
node_backend_routes -->|"ai"| node_backend_ai
node_backend_routes -->|"jobs"| node_backend_jobs
node_backend_routes -->|"repo analysis"| node_backend_github
node_backend_routes -->|"realtime"| node_backend_realtime
node_backend_routes -->|"persists"| node_backend_models
node_backend_ai -->|"delegates to"| node_ai_providers
node_backend_resume -->|"stores"| node_backend_models
node_backend_resume -->|"exports"| node_backend_integrations
node_backend_portfolio -->|"renders"| node_backend_templates
node_backend_portfolio -->|"deploys"| node_cloud_deploy
node_backend_jobs -->|"ingests"| node_job_sources
node_backend_jobs -->|"queues"| node_redis
node_backend_github -->|"ingests"| node_github_api
node_backend_realtime -->|"syncs"| node_firebase
node_backend_integrations -->|"connects"| node_firebase
node_backend_integrations -->|"connects"| node_redis
node_backend_integrations -->|"connects"| node_cloud_deploy
node_backend_models -->|"backed by"| node_backend_integrations
node_monitoring -.->|"observes"| node_backend_index

click node_frontend_app "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/App.jsx"
click node_frontend_pages "https://github.com/anurag3407/career-pilot/tree/main/frontend/src/pages"
click node_frontend_components "https://github.com/anurag3407/career-pilot/tree/main/frontend/src/components"
click node_frontend_api "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/services/api.js"
click node_frontend_socket "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/context/SocketContext.js"
click node_frontend_auth "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/context/AuthContext.js"
click node_frontend_portfolio "https://github.com/anurag3407/career-pilot/tree/main/frontend/src/components/portfolio"
click node_frontend_resume "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/ResumeBuilder.jsx"
click node_frontend_jobs "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/JobSearch.jsx"
click node_frontend_github "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/GitHubDashboard.jsx"
click node_frontend_community "https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/Community.jsx"
click node_backend_index "https://github.com/anurag3407/career-pilot/blob/main/backend/src/index.js"
click node_backend_routes "https://github.com/anurag3407/career-pilot/tree/main/backend/src/routes"
click node_backend_middleware "https://github.com/anurag3407/career-pilot/tree/main/backend/src/middleware"
click node_backend_ai "https://github.com/anurag3407/career-pilot/tree/main/backend/src/services/ai"
click node_backend_resume "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/atsScorer.js"
click node_backend_portfolio "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/portfolioTemplateEngine.js"
click node_backend_jobs "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/jobFetcher.js"
click node_backend_github "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/repoIngestionService.js"
click node_backend_realtime "https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/socket.js"
click node_backend_integrations "https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/firebase.js"
click node_backend_models "https://github.com/anurag3407/career-pilot/blob/main/backend/src/models/User.model.js"
click node_backend_templates "https://github.com/anurag3407/career-pilot/tree/main/backend/src/templates/portfolio"
click node_firebase "https://github.com/anurag3407/career-pilot/blob/main/firebase.json"
click node_redis "https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/redis.js"
click node_ai_providers "https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/aiProviders.js"
click node_job_sources "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/rapidApiService.js"
click node_github_api "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/githubImporter.js"
click node_cloud_deploy "https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/deploy/cloudflareDeployer.js"
click node_monitoring "https://github.com/anurag3407/career-pilot/blob/main/prometheus.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_frontend_app,node_frontend_pages,node_frontend_components,node_frontend_api,node_frontend_socket,node_frontend_auth,node_frontend_portfolio,node_frontend_resume,node_frontend_jobs,node_frontend_github,node_frontend_community toneBlue
class node_backend_index,node_backend_routes,node_backend_middleware,node_backend_ai,node_backend_resume,node_backend_portfolio,node_backend_jobs,node_backend_github,node_backend_realtime,node_backend_integrations,node_backend_templates toneAmber
class node_backend_models toneMint
class node_firebase,node_redis,node_ai_providers,node_job_sources,node_github_api,node_cloud_deploy toneRose
class node_monitoring toneIndigo
```

## Components

### Frontend SPA

React 19 + Vite user-facing application and orchestration layer

- [App Shell](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/App.jsx): React SPA · Top-level client routing, layouts, and auth/bootstrap flow · `frontend/src/App.jsx`
- [Product Pages](https://github.com/anurag3407/career-pilot/tree/main/frontend/src/pages): Route screens · Main feature entry points for resume, jobs, GitHub, community, admin, and settings · `frontend/src/pages`
- [Domain UI](https://github.com/anurag3407/career-pilot/tree/main/frontend/src/components): UI components · Feature components split by portfolio, analyzer, community, GitHub, visualizer, and shared UI · `frontend/src/components`
- [API Client](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/services/api.js): HTTP/socket client · Frontend service layer used to call backend APIs and subscribe to live updates · `frontend/src/services/api.js`
- [Socket Context](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/context/SocketContext.js): Realtime client · Client-side socket and presence wiring for live collaboration and notifications · `frontend/src/context/SocketContext.js`
- [Auth Context](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/context/AuthContext.js): Client auth · Browser auth state and session management · `frontend/src/context/AuthContext.js`
- [Portfolio Builder](https://github.com/anurag3407/career-pilot/tree/main/frontend/src/components/portfolio): Portfolio UI · Template gallery, theme controls, deployment modal, and portfolio workflows · `frontend/src/components/portfolio`
- [Resume Tools](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/ResumeBuilder.jsx): Resume UI · Resume builder, text-to-resume, upload, scoring, versions, and review views · `frontend/src/pages/ResumeBuilder.jsx`
- [Job Tools](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/JobSearch.jsx): Jobs UI · Search, tracker, alerts, and job intelligence user flows · `frontend/src/pages/JobSearch.jsx`
- [GitHub Views](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/GitHubDashboard.jsx): GitHub UI · Repository dashboards, analysis workspace, and project visualization pages · `frontend/src/pages/GitHubDashboard.jsx`
- [Community Hub](https://github.com/anurag3407/career-pilot/blob/main/frontend/src/pages/Community.jsx): Community UI · 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](https://github.com/anurag3407/career-pilot/blob/main/backend/src/index.js): Express app · Backend bootstrap, middleware registration, and route mounting · `backend/src/index.js`
- [API Routes](https://github.com/anurag3407/career-pilot/tree/main/backend/src/routes): Route layer · Primary HTTP boundaries for auth, resume, portfolio, jobs, community, analysis, and admin · `backend/src/routes`
- [Middleware](https://github.com/anurag3407/career-pilot/tree/main/backend/src/middleware): Cross-cutting · Auth, rate limiting, validation, upload, streaming, and error handling · `backend/src/middleware`
- [AI Orchestration](https://github.com/anurag3407/career-pilot/tree/main/backend/src/services/ai): AI services · Provider integration and feature-specific content generation services · `backend/src/services/ai`
- [Resume Pipeline](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/atsScorer.js): Document pipeline · Parsing, ATS scoring, structure generation, sanitization, and versioning · `backend/src/services/atsScorer.js`
- [Portfolio Engine](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/portfolioTemplateEngine.js): Generation/deploy · Template engine, HTML/PDF generation, GitHub sync, and deployment adapters · `backend/src/services/portfolioTemplateEngine.js`
- [Job Intelligence](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/jobFetcher.js): Jobs services · Fetching, scraping, searching, alerting, summarizing, and research services · `backend/src/services/jobFetcher.js`
- [Repo Analysis](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/repoIngestionService.js): GitHub services · Ingestion, enrichment, analysis, and repository intelligence pipeline · `backend/src/services/repoIngestionService.js`
- [Realtime Layer](https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/socket.js): Sockets/presence · Socket.IO, Firebase sync, presence, and alert push services · `backend/src/config/socket.js`
- [External Adapters](https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/firebase.js): Provider adapters · Firebase, Redis, Cloudinary, email, payment, and deployment provider clients · `backend/src/config/firebase.js`
- [Portfolio Templates](https://github.com/anurag3407/career-pilot/tree/main/backend/src/templates/portfolio): Template assets · Backend-rendered portfolio template catalog and email templates · `backend/src/templates/portfolio`

### Persistence

Durable domain models and schema-backed state

- [Domain Models](https://github.com/anurag3407/career-pilot/blob/main/backend/src/models/User.model.js): Persistence 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](https://github.com/anurag3407/career-pilot/blob/main/firebase.json): Auth/data/storage · Firestore, storage, and Firebase-backed realtime/auth integration · `firebase.json`
- [Redis](https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/redis.js): Cache/queue · Caching, queueing, and ephemeral coordination store · `backend/src/config/redis.js`
- [AI Providers](https://github.com/anurag3407/career-pilot/blob/main/backend/src/config/aiProviders.js): LLM APIs · OpenRouter, Anthropic, GenAI, and LangChain-backed model providers · `backend/src/config/aiProviders.js`
- [Job Sources](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/rapidApiService.js): Job APIs/scrapers · RapidAPI and scraper-based job feeds and listings sources · `backend/src/services/rapidApiService.js`
- [GitHub API](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/githubImporter.js): Repo data source · GitHub metadata, commits, languages, and repository enrichment source · `backend/src/services/githubImporter.js`
- [Deploy Targets](https://github.com/anurag3407/career-pilot/blob/main/backend/src/services/deploy/cloudflareDeployer.js): Hosting 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](https://github.com/anurag3407/career-pilot/blob/main/prometheus.yml): Observability · Prometheus metrics and health-check automation · `prometheus.yml`

## Connections

- 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
