# negi97mohit/candi-reply architecture

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

- Interactive diagram: https://gitdiagram.com/negi97mohit/candi-reply
- Repository: https://github.com/negi97mohit/candi-reply

## Overview

##### Main System Components

a) Frontend Layer (React Application):
- Sub-components:
- File Upload Handler (for .txt, .pdf, .docx)
- Resume Parser (using Mammoth.js and PDF.js)
- Job Description Input
- Results Display
- Justification Interface

b) Backend Layer (Node.js/Express):
- Sub-components:
- API Routes
- CORS Middleware
- Data Processing Service

c) External Services:
- Integration points for AI-powered text processing

##### Component Relationships

a) User Interaction Flow:
- Data flow between frontend parsers and backend services

b) Processing Flow:
- File upload → Parser → Backend Processing → AI Service
- Job Description → Matching Service → Results
- User Input → Justification Generator → Email Content

##### Specific Implementation Details

- Environment Configuration (.env)
- File Processing Pipeline
- AI Integration Points
- Response Handling

##### Technical Specifications

Elements:
- Node.js version requirement (v14+)
- API endpoints
- Supported file formats
- Authentication flow (if any)

**[User Interface Layer]**
- ↓
**[Frontend Processing Layer]**
- ↓
**[Backend API Layer]**
- ↓
**[External Services Layer]**

##### Specific Notes for This Project

- File processing pipeline as it handles multiple formats
- AI integration points with Groq
- Email generation workflow
- Match percentage calculation process

Remember to:
- Use consistent symbols throughout
- A title and version number
- Notes for any non-obvious interactions
- Both synchronous and asynchronous operations

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        UI[User Interface]
        FUH[File Upload Handler]
        RP[Resume Parser]
        JDI[Job Description Input]
        RD[Results Display]
        JI[Justification Interface]
        
        UI --> FUH
        UI --> JDI
        FUH --> RP
        RP --> RD
        JDI --> RD
        RD --> JI
    end

    subgraph Backend
        API[API Routes]
        CORS[CORS Middleware]
        DPS[Data Processing Service]
        
        API --> CORS
        CORS --> DPS
    end

    subgraph "External Services"
        GAS[Groq AI Service]
    end

    subgraph "Infrastructure"
        ENV[Environment Config]
        FPP[File Processing Pipeline]
        RH[Response Handler]
    end

    %% Component Relationships
    FUH --> API
    JDI --> API
    DPS --> GAS
    GAS --> RH
    RH --> RD
    ENV --> GAS

    %% Click Events
    click UI "https://github.com/Negi97Mohit/candi-reply/blob/master/src/App.js"
    click ENV "https://github.com/Negi97Mohit/candi-reply/blob/master/src/.env"
    click UI "https://github.com/Negi97Mohit/candi-reply/blob/master/src/index.js"
    click UI "https://github.com/Negi97Mohit/candi-reply/blob/master/src/App.css"
    click UI "https://github.com/Negi97Mohit/candi-reply/tree/master/public/"
    click UI "https://github.com/Negi97Mohit/candi-reply/blob/master/public/index.html"
    click API "https://github.com/Negi97Mohit/candi-reply/blob/master/src/server.js"

    %% Styling
    classDef frontend fill:#a8d1ff,stroke:#333,stroke-width:2px
    classDef backend fill:#90EE90,stroke:#333,stroke-width:2px
    classDef external fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef infrastructure fill:#D3D3D3,stroke:#333,stroke-width:2px

    class UI,FUH,RP,JDI,RD,JI frontend
    class API,CORS,DPS backend
    class GAS external
    class ENV,FPP,RH infrastructure

    %% Legend
    subgraph Legend
        F[Frontend]:::frontend
        B[Backend]:::backend
        E[External Services]:::external
        I[Infrastructure]:::infrastructure
    end
```
