# abhi3kumar11/job-board architecture

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

- Interactive diagram: https://gitdiagram.com/abhi3kumar11/job-board
- Repository: https://github.com/abhi3kumar11/job-board

## Overview

##### Main Components
- Frontend: The UI is built with React, Tailwind CSS, and Framer Motion. Represent the entire “frontend” directory as the client-side application that enables users to view, filter, and search job listings.
- Backend: The “backend” directory contains the Flask application (app.py) responsible for API endpoints, serving the crawled job data, and rendering UI templates. It also implements the crawling process using BeautifulSoup and undetected-chromedriver.
- Database: The SQLite database (jobs.db) is used to persist job postings and related information.
- External Services: Include an element representing external job listing sites (e.g., Naukri.com). This shows that the backend’s crawler pulls data from these external systems.
- Background/Job Scheduler: While not explicit as a separate service, note that the system has an auto-refresh feature scheduled every 24 hours. You might add a component or annotate the backend module to indicate that it periodically triggers the crawling process.

##### Relationships and Interactions
- If needed, add interactions to indicate template-based rendering (e.g., index.html in the “backend/templates” directory) in addition to API endpoints.

##### Architectural Patterns and Technologies
- Mention the separation of concerns between frontend and backend, which is central for full-stack applications.
- API layer where the Flask application interfaces with both the database and the external scraping logic.
- Integration points: usage of Flask for backend routing, React for frontend interactivity, and SQLite for simple persistent storage.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend
    FE["Frontend UI (React, Tailwind, Framer Motion)"]:::frontend

    %% Backend Tier
    subgraph "Backend Tier"
        API["API Server (Flask)"]:::backend
        SCH["Crawler & Scheduler"]:::scheduler
    end

    %% Other Components
    DB["Database (SQLite)"]:::database
    TEMPLATE["UI Template (index.html)"]:::template
    EXT["External Job Sites (Naukri.com)"]:::external

    %% Connections
    FE -->|"HTTPRequests"| API
    API -->|"DB_ReadWrites"| DB
    API -->|"RenderTemplate"| TEMPLATE
    SCH -->|"WebScraping"| EXT
    SCH -->|"SaveData"| DB

    %% Additional arrow to indicate internal scheduling trigger if needed
    API -->|"TriggerCrawl"| SCH

    %% Click Events
    click FE "https://github.com/abhi3kumar11/job-board/tree/master/frontend/"
    click API "https://github.com/abhi3kumar11/job-board/blob/master/backend/app.py"
    click SCH "https://github.com/abhi3kumar11/job-board/blob/master/backend/app.py"
    click DB "https://github.com/abhi3kumar11/job-board/blob/master/backend/jobs.db"
    click TEMPLATE "https://github.com/abhi3kumar11/job-board/blob/master/backend/templates/index.html"

    %% Styles
    classDef frontend fill:#a2d9ce,stroke:#333,stroke-width:2px
    classDef backend fill:#f9e79f,stroke:#333,stroke-width:2px
    classDef scheduler fill:#fad7a0,stroke:#333,stroke-width:2px
    classDef database fill:#d2b4de,stroke:#333,stroke-width:2px
    classDef external fill:#f5b7b1,stroke:#333,stroke-width:2px
    classDef template fill:#d5f5e3,stroke:#333,stroke-width:2px
```
