# nikhilsethuram/rekroot-hackillinois2024 architecture

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

- Interactive diagram: https://gitdiagram.com/nikhilsethuram/rekroot-hackillinois2024
- Repository: https://github.com/nikhilsethuram/rekroot-hackillinois2024

## Overview

##### Project type and purpose
- Rekroot is a full-stack, mobile-first job application platform with a React Native frontend and a Python-based backend.
- Purpose: let users swipe on job postings, automatically scrape and recommend relevant jobs, generate personalized outreach e-mails via an LLM, track sent applications, and interact with external services (Hunter API, job sites).

##### File structure
- Top-level directories:
– frontend/: Expo/React Native app containing App.js, components (SwipeScreen, JobInterestsScreen, Tracker, etc.), assets, config files.
– backend/: Python scripts for scraping (googlejobs.py, linkedinscrape.py in tests), a Scikit-learn recommendation engine, LLM chain integration, and unit tests.
– backend/test/: contains job-posting scrapers, historical “old” implementations, chromedriver binaries, notebooks, and sample CSVs.
- No monolithic code: clear client (mobile) vs. server (Python) separation.
- Config/build files: frontend/package.json, babel.config.js, metro.config.js; backend uses plain Python scripts (requirements implied).

##### README for additional insights
- Frontend: React Native + Expo for cross-platform UI.
- Recommendation engine: content-based filtering using cosine similarity (Scikit-learn).
- Outreach: LangChain + advanced LLM for personalized messages.
- External integrations: Hunter API (email discovery), job aggregators, direct web scraping with Selenium/Chromedriver.
- Tracking subsystem to record sent emails and application status.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Mobile Client Layer
    subgraph "Mobile Client" 
        direction TB
        MC["Mobile Client (React Native App)"]:::client
        MC_APP["App.js"]:::client
        MC_UI["UI Components\n(Swipe, Tracker, etc.)"]:::client
    end

    %% Backend API Layer
    subgraph "API Gateway / Backend" 
        direction TB
        API["REST API Service\n(Flask/FastAPI)"]:::backend
    end

    %% ML & AI Services
    subgraph "ML & AI Services"
        direction TB
        RE["Recommendation Engine\n(Scikit-learn)"]:::backend
        LLM["LLM Outreach Service\n(LangChain + LLM)"]:::backend
    end

    %% Scraping Services
    subgraph "Scraping Services"
        direction TB
        GJ["Google Jobs Scraper"]:::backend
        LI["LinkedIn Scraper"]:::backend
        JO["Jooble Scraper"]:::backend
        CD["Chromedriver"]:::backend
        OL["Legacy Scrapers"]:::backend
        OL2["Additional Legacy Scrapers"]:::backend
    end

    %% Email Module and DB
    subgraph "Email & Storage"
        direction TB
        EM["Email Delivery Module\n(SMTP/SendGrid)"]:::backend
        DB["Database\n(PostgreSQL/MongoDB)"]:::db
    end

    %% External Systems
    subgraph "External Services"
        direction TB
        HUNTER["Hunter API"]:::external
        AGG["Job Aggregator APIs"]:::external
        SITES["LinkedIn/Indeed Websites"]:::external
    end

    %% Relationships
    MC -->|HTTP JSON| API
    MC_APP --> MC_UI

    API -->|invoke| RE
    API -->|fetch postings| GJ
    API -->|fetch postings| LI
    API -->|fetch postings| JO
    GJ -->|uses| CD
    LI -->|uses| CD
    JO -->|uses| CD
    GJ -->|fallback| OL
    LI -->|fallback| OL2

    API -->|request email content| LLM
    API -->|discover email| HUNTER
    API -->|send email task| EM
    EM -->|store status| DB

    API -->|read/write| DB
    MC -->|view tracker| DB

    AGG -->|job data| API
    SITES -->|scraped data| API

    %% Click Events
    click MC "https://github.com/nikhilsethuram/rekroot-hackillinois2024/tree/main/frontend/"
    click MC_APP "https://github.com/nikhilsethuram/rekroot-hackillinois2024/blob/main/frontend/App.js"
    click MC_UI "https://github.com/nikhilsethuram/rekroot-hackillinois2024/tree/main/frontend/components/"
    click GJ "https://github.com/nikhilsethuram/rekroot-hackillinois2024/blob/main/backend/googlejobs.py"
    click LI "https://github.com/nikhilsethuram/rekroot-hackillinois2024/blob/main/backend/test/job-postings/linkedinscrape.py"
    click JO "https://github.com/nikhilsethuram/rekroot-hackillinois2024/blob/main/backend/test/job-postings/jooble.py"
    click CD "https://github.com/nikhilsethuram/rekroot-hackillinois2024/tree/main/backend/test/job-postings/chromedriver"
    click OL "https://github.com/nikhilsethuram/rekroot-hackillinois2024/tree/main/backend/test/old/"
    click OL2 "https://github.com/nikhilsethuram/rekroot-hackillinois2024/tree/main/backend/test/old2/"

    %% Styles
    classDef client fill:#D0E8FF,stroke:#4D9DE0,color:#000
    classDef backend fill:#D4F4DD,stroke:#28A745,color:#000
    classDef db fill:#FFE5B4,stroke:#FF8C00,color:#000
    classDef external fill:#E0E0E0,stroke:#A9A9A9,color:#000
```
