# amarnathss/jobsy architecture

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

- Interactive diagram: https://gitdiagram.com/amarnathss/jobsy
- Repository: https://github.com/amarnathss/jobsy

## Overview

##### Project type and purpose
- Jobsy is a full-stack web application:
- Frontend: React.js UI for job seekers and employers
- Backend: Node.js + Express API implementing the Manager-Service-Controller (MSC) pattern
- Database: MongoDB Atlas
- External services: Twilio (SMS), NodeMailer (email), Vercel (frontend hosting), Render (backend hosting)
- Purpose: A modern, multi-language job search platform targeting blue-collar workers.

##### File structure
- Top-level directories:
- backend/ – API code
- frontend/ – React application
- backend/ substructure follows MSC:
- controllers/ – HTTP handlers (job.js, user.js)
- services/ – business logic
- managers/ – data access layer
- models/ – Mongoose schemas
- routes/ – Express route definitions
- commons/ – shared utilities (mail.js, sms.js, util.js)
- frontend/ substructure:
- public/ – static assets and translations
- src/Components/ – organized by feature (HomePage, ApplyJob, PostOpportunity, etc.)
- src/CSS/ – scoped module styles
- src/i18n.js – internationalization setup
- Config/deployment: backend/config.js, .env, package.json files, build folders.

##### README for additional insights
- The architecture section explicitly states the MSC layers.
- Tech stack and services are enumerated.
- API endpoints and their responsibilities are documented.
- Project structure summary confirms the directory layout.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Frontend Tier
    subgraph "Frontend Tier" 
        direction TB
        Browser["User Browser"]:::external
        ReactUI["React Frontend (UI Layer)"]:::frontend
        I18n["Internationalization Setup"]:::frontend
        Translations["i18n Translation Files"]:::frontend
        EntryPointFE["Frontend Entry Point\nindex.js"]:::frontend
        ServiceWorker["Service Worker"]:::frontend

        subgraph "Components" 
            direction TB
            HomePage["HomePage Component Group"]:::frontend
            ApplyJob["ApplyJob Component"]:::frontend
            subgraph "PostOpportunity Group"
                direction TB
                PostNavbar["PostOpportunity Navbar"]:::frontend
                PostJob["PostJob"]:::frontend
                PostJobForm["PostJobForm"]:::frontend
            end
            subgraph "UserProfile Group"
                direction TB
                ProfileNavbar["UserProfile Navbar"]:::frontend
                UserProfile["UserProfile"]:::frontend
                UserProfileForm["UserProfileForm"]:::frontend
            end
            subgraph "ViewOpportunity Group"
                direction TB
                OpportunityCard["Opportunity Card"]:::frontend
                OpportunityDetails["Opportunity Details"]:::frontend
            end
            subgraph "ViewCandidates Group"
                direction TB
                CandidateCard["Candidate Card"]:::frontend
                CandidateDetails["Candidate Details"]:::frontend
            end
            LanguageSelector["LanguageSelector"]:::frontend
        end
    end

    %% Backend Tier
    subgraph "Backend Tier"
        direction TB
        EntryPointBE["Express Backend Entry Point\nindex.js"]:::backend
        Config["Configuration\nconfig.js"]:::backend

        subgraph "Routes"
            direction TB
            RouteJobs["Jobs Routes"]:::backend
            RouteUsers["Users Routes"]:::backend
        end

        subgraph "Controllers"
            direction TB
            CtrlJob["Job Controller"]:::backend
            CtrlUser["User Controller"]:::backend
        end

        subgraph "Services"
            direction TB
            ServJob["Job Service"]:::backend
            ServUser["User Service"]:::backend
        end

        subgraph "Managers"
            direction TB
            MgrJob["Job Manager"]:::backend
            MgrUser["User Manager"]:::backend
        end

        subgraph "Models"
            direction TB
            ModelJob["Job Model"]:::backend
            ModelUser["User Model"]:::backend
        end

        subgraph "Commons Utilities"
            direction TB
            CommonsMail["Email (NodeMailer)"]:::external
            CommonsSMS["SMS (Twilio)"]:::external
            CommonsUtil["Misc Helpers"]:::backend
        end

        MongoDB["MongoDB Atlas"]:::database
    end

    %% Deployment
    subgraph "Deployment"
        Vercel["Vercel\n(Frontend Hosting)"]:::external
        Render["Render\n(Backend Hosting)"]:::external
    end

    %% Connections - Frontend Flow
    Browser -->|"HTTP/HTTPS"| ReactUI
    ReactUI -->|"imports i18n"| I18n
    I18n -->|"loads JSON"| Translations
    ReactUI -->|"renders"| HomePage
    ReactUI -->|"renders"| ApplyJob
    ReactUI -->|"renders"| PostNavbar
    PostNavbar --> PostJob
    PostJob --> PostJobForm
    ReactUI -->|"renders"| ProfileNavbar
    ProfileNavbar --> UserProfile
    UserProfile --> UserProfileForm
    ReactUI -->|"renders"| OpportunityCard
    ReactUI -->|"renders"| OpportunityDetails
    ReactUI -->|"renders"| CandidateCard
    ReactUI -->|"renders"| CandidateDetails
    ReactUI -->|"renders"| LanguageSelector
    ReactUI --> EntryPointFE
    ReactUI --> ServiceWorker

    %% Frontend to Backend
    ReactUI -->|"REST API"| RouteJobs
    ReactUI -->|"REST API"| RouteUsers

    %% Backend Flow
    RouteJobs --> CtrlJob
    RouteUsers --> CtrlUser
    CtrlJob --> ServJob
    CtrlUser --> ServUser
    ServJob --> MgrJob
    ServUser --> MgrUser
    MgrJob --> ModelJob
    MgrUser --> ModelUser
    ServJob --> CommonsMail
    ServJob --> CommonsSMS
    CommonsMail -->|"SMTP"| externalSMTP["External SMTP"]:::external
    CommonsSMS -->|"SMS API"| externalSMS["SMS Gateway"]:::external
    MgrJob --> MongoDB
    MgrUser --> MongoDB

    %% Deployment connections
    ReactUI --> Vercel
    EntryPointBE --> Render
    Render --> MongoDB

    %% Click Events Frontend
    click ReactUI "https://github.com/amarnathss/jobsy/tree/main/frontend/src"
    click I18n "https://github.com/amarnathss/jobsy/blob/main/frontend/src/i18n.js"
    click Translations "https://github.com/amarnathss/jobsy/tree/main/frontend/public/assets/i18n/translations"
    click HomePage "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/HomePage/HomePage.js"
    click ApplyJob "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/ApplyJob/ApplyJob.js"
    click PostNavbar "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/PostOpportunity/Sections/Navbar.js"
    click PostJob "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/PostOpportunity/Sections/PostJob/PostJob.js"
    click PostJobForm "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/PostOpportunity/Sections/PostJob/PostJobForm.js"
    click ProfileNavbar "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/UserProfile/Sections/Navbar.js"
    click UserProfile "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/UserProfile/Sections/UserProfile/UserProfile.js"
    click UserProfileForm "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/UserProfile/Sections/UserProfile/UserProfileForm.js"
    click OpportunityCard "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/ViewOpportunity/Card.js"
    click OpportunityDetails "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/ViewOpportunity/Opportunity.js"
    click CandidateCard "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/ViewCandidates/Card.js"
    click CandidateDetails "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/ViewCandidates/Candidate.js"
    click LanguageSelector "https://github.com/amarnathss/jobsy/blob/main/frontend/src/Components/LanguageSelector/LanguageSelector.js"
    click ServiceWorker "https://github.com/amarnathss/jobsy/blob/main/frontend/src/serviceWorker.js"
    click EntryPointFE "https://github.com/amarnathss/jobsy/blob/main/frontend/src/index.js"

    %% Click Events Backend
    click EntryPointBE "https://github.com/amarnathss/jobsy/blob/main/backend/index.js"
    click Config "https://github.com/amarnathss/jobsy/blob/main/backend/config.js"
    click RouteJobs "https://github.com/amarnathss/jobsy/blob/main/backend/routes/job.js"
    click RouteUsers "https://github.com/amarnathss/jobsy/blob/main/backend/routes/user.js"
    click CtrlJob "https://github.com/amarnathss/jobsy/blob/main/backend/controllers/job.js"
    click CtrlUser "https://github.com/amarnathss/jobsy/blob/main/backend/controllers/user.js"
    click ServJob "https://github.com/amarnathss/jobsy/blob/main/backend/services/job.js"
    click ServUser "https://github.com/amarnathss/jobsy/blob/main/backend/services/user.js"
    click MgrJob "https://github.com/amarnathss/jobsy/blob/main/backend/managers/job.js"
    click MgrUser "https://github.com/amarnathss/jobsy/blob/main/backend/managers/user.js"
    click ModelJob "https://github.com/amarnathss/jobsy/blob/main/backend/models/job.js"
    click ModelUser "https://github.com/amarnathss/jobsy/blob/main/backend/models/user.js"
    click CommonsMail "https://github.com/amarnathss/jobsy/blob/main/backend/commons/mail.js"
    click CommonsSMS "https://github.com/amarnathss/jobsy/blob/main/backend/commons/sms.js"
    click CommonsUtil "https://github.com/amarnathss/jobsy/blob/main/backend/commons/util.js"

    %% Styles
    classDef frontend fill:#AED6F1,stroke:#21618C,color:#1B2631;
    classDef backend fill:#ABEBC6,stroke:#1D8348,color:#1B2631;
    classDef external fill:#F9E79F,stroke:#B7950B,color:#1B2631;
    classDef database fill:#D2B4DE,stroke:#6C3483,color:#1B2631;
```
