# divyansh-pathak129/workify architecture

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

- Interactive diagram: https://gitdiagram.com/divyansh-pathak129/workify
- Repository: https://github.com/divyansh-pathak129/workify

## Overview

##### Project Type and Purpose
- From the file tree and README, this is a full-stack web application (“Workify”) that uses React.js on the frontend and Node.js/Express on the backend.
- Purpose: an AI-powered employment assistant that parses resumes and job descriptions, ranks candidates using Google Gemini, and presents results via a dashboard.

##### File Structure
- Top-level directories:
- client/ – React single-page app (Vite setup)
- server/ – Node.js/Express API layer
- Within client/:
- public/, index.html – static host
- src/ – React components, pages, modals, assets, utilities
- package.json, eslint.config.js, vite.config.js – build and lint configs
- Within server/:
- index.js / app.js – Express application entrypoints
- routes/ – jobRoutes.js (REST endpoints)
- clientChecker.js, mongo1.js – middleware/config for MongoDB and health checks
- package.json – backend dependencies and scripts

##### Extract Additional Insights from the README
- Tech Stack: React (frontend), Node.js (backend), Google Gemini (AI), MongoDB (database)
- Workflow: user submits resumes + job description → backend invokes Gemini API → processes and ranks candidates → stores/retrieves data from MongoDB → serves results to React frontend
- Env vars: GEMINI_API_KEY, MONGO_URI

## Diagram (Mermaid)

```mermaid
graph TB
    %% Tiers
    subgraph "Client Tier"
        direction TB
        Browser["User Browser"]:::external
        ReactApp["React App (SPA)"]:::frontend
        Entry["main.jsx"]:::frontend
        HTML["index.html"]:::frontend
        Pages["Pages"]:::frontend
        Modals["Modals"]:::frontend
        FileOps["fileOperations.js"]:::frontend
    end

    subgraph "API Tier"
        direction TB
        ServerEntry["server/index.js"]:::backend
        AppSetup["app.js"]:::backend
        ClientChecker["clientChecker.js"]:::backend
        JobRoutes["jobRoutes.js"]:::backend
        MongoConfig["mongo1.js"]:::backend
    end

    subgraph "AI Tier"
        direction TB
        GoogleGemini["Google Gemini API"]:::external
    end

    subgraph "Data Tier"
        direction TB
        MongoDB["MongoDB Instance"]:::database
    end

    %% Data Flow
    Browser -->|Accesses SPA| ReactApp
    ReactApp -->|Loads Entry Point| Entry
    ReactApp -->|Serves Static HTML| HTML
    ReactApp -->|Renders Pages| Pages
    ReactApp -->|Opens Modals| Modals
    ReactApp -->|Uses File Utils| FileOps
    ReactApp -->|HTTP Requests| ServerEntry
    ServerEntry -->|Initializes App| AppSetup
    AppSetup -->|Uses Middleware| ClientChecker
    AppSetup -->|Routes to| JobRoutes
    JobRoutes -->|Calls AI Service| GoogleGemini
    JobRoutes -->|Stores/Retrieves| MongoConfig
    GoogleGemini -->|Returns Rankings| JobRoutes
    MongoConfig -->|DB Connection| MongoDB
    JobRoutes -->|Responds to SPA| ReactApp

    %% Click Events
    click ReactApp "https://github.com/divyansh-pathak129/workify/tree/main/client/src/"
    click Entry "https://github.com/divyansh-pathak129/workify/blob/main/client/src/main.jsx"
    click HTML "https://github.com/divyansh-pathak129/workify/blob/main/client/index.html"
    click Pages "https://github.com/divyansh-pathak129/workify/tree/main/client/src/pages/"
    click Modals "https://github.com/divyansh-pathak129/workify/tree/main/client/src/Modals/"
    click FileOps "https://github.com/divyansh-pathak129/workify/blob/main/client/src/utils/fileOperations.js"

    click ServerEntry "https://github.com/divyansh-pathak129/workify/blob/main/server/index.js"
    click AppSetup "https://github.com/divyansh-pathak129/workify/blob/main/server/app.js"
    click JobRoutes "https://github.com/divyansh-pathak129/workify/blob/main/server/routes/jobRoutes.js"
    click ClientChecker "https://github.com/divyansh-pathak129/workify/blob/main/server/clientChecker.js"
    click MongoConfig "https://github.com/divyansh-pathak129/workify/blob/main/server/mongo1.js"

    %% Styles
    classDef frontend fill:#bbf,stroke:#339,stroke-width:1px
    classDef backend fill:#bfb,stroke:#393,stroke-width:1px
    classDef external fill:#fca,stroke:#f60,stroke-width:1px
    classDef database fill:#dcb,stroke:#963,stroke-width:1px
```
