# sameer-bagul/wcareer architecture

> Architecture diagram of the GitHub repository sameer-bagul/wcareer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sameer-bagul/wcareer
- Repository: https://github.com/sameer-bagul/wcareer

## Overview

##### Project type and purpose
- This is a full-stack AI-powered career-guidance platform (“WCareers.ai”) combining:
- A React-based single-page application (client/)
- A Node.js/Express REST API server (server/)
- A Python LLM microservice (llm-server/) that hosts/serves the AI models
- MongoDB for persistence, plus external services (email via nodemailer, third-party APIs)

##### File structure
- Top-level folders:
- client/ → frontend UI (Vite + React)
- server/ → backend logic (Express controllers, routes, models, middleware, services)
- llm-server/ → Python AI model server (model.py, server.py, Dockerfile)
- Other folders (WCareers, mockInterview, old-HireMe-frontend) appear to be auxiliary or prototyping directories but are not part of the core MERN+LLM architecture described in README.
- Noteworthy patterns in server/: MVC-style layers (controllers, services, models), REST routes, middleware for error handling/authentication.
- Configuration files: .env (in client & server), Dockerfile, package.json, requirements.txt.

##### README for additional insights
- Confirms 3 parts (frontend, backend, llm-server) and high-level features (resume wizard, mock interviews, assessments, career roadmaps, job recommendations, community forum).
- Mentions deployment scripts under “deployment” (not shown in tree) but Dockerfiles are present for llm-server.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client (Browser)" 
        direction TB
        Browser(("User Browser")):::presentation
        ReactSPA["React SPA"]:::presentation
        Browser -->|uses| ReactSPA
        ReactSPA -->|renders| Pages
        ReactSPA -->|uses| Components
        ReactSPA -->|provides context| Context
        ReactSPA -->|configured by| ViteConfig
        ReactSPA -->|defined in| ClientPkg
    end

    %% Server Layer
    subgraph "Backend API (Express)" 
        direction TB
        ExpressEntry["Express Entry (server.js)"]:::business
        Routes["Routes (server/routes/)"]:::business
        Controllers["Controllers (server/controllers/)"]:::business
        Services["Services (server/services/)"]:::business
        Models["Models (server/models/)"]:::business
        Middleware["Middleware (server/middleware/)"]:::business
        Config["Config (server/config/)"]:::business
        Utils["Utils (server/utils/)"]:::business
        AIModels["AI Models (server/ai_models/)"]:::business
        ExpressEntry -->|loads| Routes
        Routes -->|invoke| Controllers
        Controllers -->|call| Services
        Services -->|access| Models
        Services -->|use| Utils
        Controllers -->|use| Middleware
        ExpressEntry -->|load config| Config
        Services -->|load AI definitions| AIModels
    end

    %% AI Microservice Layer
    subgraph "LLM Microservice" 
        direction TB
        LlmServerPy["llm-server/server.py"]:::ai
        LlmModelPy["llm-server/model.py"]:::ai
        LlmRequirements["llm-server/requirements.txt"]:::ai
        LlmDocker["llm-server/Dockerfile"]:::ai
        LlmServerPy -->|loads| LlmModelPy
    end

    %% Database & External
    MongoDB[(MongoDB)]:::database
    ExternalServices(("External Services\nSMTP, 3rd-party APIs")):::database

    %% Interactions
    ReactSPA -->|HTTP/REST| ExpressEntry
    ExpressEntry -->|CRUD| MongoDB
    ExpressEntry -->|HTTP/gRPC| LlmServerPy
    ExpressEntry -->|SMTP/API calls| ExternalServices

    %% Click Events
    click ReactSPA "https://github.com/sameer-bagul/wcareer/tree/main/client/src/"
    click App "https://github.com/sameer-bagul/wcareer/blob/main/client/src/App.jsx"
    click Pages "https://github.com/sameer-bagul/wcareer/tree/main/client/src/pages/"
    click Components "https://github.com/sameer-bagul/wcareer/tree/main/client/src/components/"
    click Context "https://github.com/sameer-bagul/wcareer/blob/main/client/src/context/AppContext.jsx"
    click ViteConfig "https://github.com/sameer-bagul/wcareer/blob/main/client/vite.config.js"
    click ClientPkg "https://github.com/sameer-bagul/wcareer/blob/main/client/package.json"
    click ExpressEntry "https://github.com/sameer-bagul/wcareer/blob/main/server/server.js"
    click Routes "https://github.com/sameer-bagul/wcareer/tree/main/server/routes/"
    click Controllers "https://github.com/sameer-bagul/wcareer/tree/main/server/controllers/"
    click Services "https://github.com/sameer-bagul/wcareer/tree/main/server/services/"
    click Models "https://github.com/sameer-bagul/wcareer/tree/main/server/models/"
    click Middleware "https://github.com/sameer-bagul/wcareer/tree/main/server/middleware/"
    click Config "https://github.com/sameer-bagul/wcareer/tree/main/server/config/"
    click Utils "https://github.com/sameer-bagul/wcareer/tree/main/server/utils/"
    click AIModels "https://github.com/sameer-bagul/wcareer/tree/main/server/ai_models/"
    click LlmServerPy "https://github.com/sameer-bagul/wcareer/blob/main/llm-server/server.py"
    click LlmModelPy "https://github.com/sameer-bagul/wcareer/blob/main/llm-server/model.py"
    click LlmRequirements "https://github.com/sameer-bagul/wcareer/blob/main/llm-server/requirements.txt"
    click LlmDocker "https://github.com/sameer-bagul/wcareer/tree/main/llm-server/Dockerfile"

    %% Styles
    classDef presentation fill:#E3F2FD,stroke:#90CAF9;
    classDef business fill:#E8F5E9,stroke:#66BB6A;
    classDef ai fill:#FFF3E0,stroke:#FFB74D;
    classDef database fill:#ECEFF1,stroke:#90A4AE;
```
