# aspatel262/jobscrape architecture

> Architecture diagram of the GitHub repository aspatel262/jobscrape, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aspatel262/jobscrape
- Repository: https://github.com/aspatel262/jobscrape

## Overview

JobScrape checks configured company career pages for job postings, compares them with saved postings, and emails newly found openings. The README describes internship alerts; the sampled Lambda workflow implements a scheduled-style scrape-and-notify path, while Scraper.py also contains a separate continuous polling driver. The index shows lambda_function.py imports helper_functions.py, but no inspected excerpt connects the two scraper implementations; their relationship is therefore not asserted.

Main entry points: [`lambda_function.py`](https://github.com/aspatel262/jobscrape/blob/main/lambda_function.py) (Lambda handler), [`Scraper.py`](https://github.com/aspatel262/jobscrape/blob/main/Scraper.py) (Company scraper), [`helper_functions.py`](https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py) (Posting comparison)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scraping["Job scraping"]
  node_company["Company scraper<br/>[Scraper.py]"]
  node_posting["Job posting model<br/>[Scraper.py]"]
  node_poller["Polling driver<br/>[Scraper.py]"]
  node_change_check["Change detection<br/>[Scraper.py]"]
end

subgraph group_lambda["Lambda alert workflow"]
  node_companies["Company configuration<br/>[lambda_function.py]"]
  node_handler["Lambda handler<br/>[lambda_function.py]"]
  node_new_postings["Posting comparison"]
end

subgraph group_services["Cloud services"]
  node_s3_helpers["S3 file helpers"]
  node_email_helper["Email sender"]
end

node_user(("Job seeker"))
node_career_sites[("Company career sites")]
node_s3[("Amazon S3")]
node_ses["Amazon SES"]

node_user -.->|"triggers"| node_handler
node_handler -->|"reads config"| node_companies
node_handler -->|"creates scraper"| node_company
node_company -->|"fetches postings"| node_career_sites
node_handler -->|"compares postings"| node_new_postings
node_new_postings -->|"returns differences"| node_handler
node_handler -->|"loads saved data"| node_s3_helpers
node_s3_helpers -->|"reads and writes"| node_s3
node_handler -->|"sends alert"| node_email_helper
node_email_helper -->|"sends email"| node_ses
node_company -->|"builds postings"| node_posting
node_poller -->|"checks companies"| node_change_check
node_change_check -->|"fetches updates"| node_company

click node_companies "https://github.com/aspatel262/jobscrape/blob/main/lambda_function.py"
click node_handler "https://github.com/aspatel262/jobscrape/blob/main/lambda_function.py"
click node_company "https://github.com/aspatel262/jobscrape/blob/main/Scraper.py"
click node_posting "https://github.com/aspatel262/jobscrape/blob/main/Scraper.py"
click node_poller "https://github.com/aspatel262/jobscrape/blob/main/Scraper.py"
click node_change_check "https://github.com/aspatel262/jobscrape/blob/main/Scraper.py"
click node_new_postings "https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py"
click node_s3_helpers "https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py"
click node_email_helper "https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_company,node_posting,node_poller,node_change_check toneBlue
class node_companies,node_handler,node_new_postings,node_career_sites,node_s3 toneAmber
class node_s3_helpers,node_email_helper toneMint
class node_user,node_ses toneIndigo
```

## Components

### Job scraping

- [Company scraper](https://github.com/aspatel262/jobscrape/blob/main/Scraper.py): `Scraper.py`
- [Job posting model](https://github.com/aspatel262/jobscrape/blob/main/Scraper.py): `Scraper.py`
- [Polling driver](https://github.com/aspatel262/jobscrape/blob/main/Scraper.py): `Scraper.py`
- [Change detection](https://github.com/aspatel262/jobscrape/blob/main/Scraper.py): `Scraper.py`

### Lambda alert workflow

- [Company configuration](https://github.com/aspatel262/jobscrape/blob/main/lambda_function.py): `lambda_function.py`
- [Lambda handler](https://github.com/aspatel262/jobscrape/blob/main/lambda_function.py): `lambda_function.py`
- [Posting comparison](https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py): `helper_functions.py`

### Cloud services

- [S3 file helpers](https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py): `helper_functions.py`
- [Email sender](https://github.com/aspatel262/jobscrape/blob/main/helper_functions.py): `helper_functions.py`

### Other components

- **Job seeker**
- **Company career sites**
- **Amazon S3**
- **Amazon SES**

## Connections

- Job seeker → Lambda handler: triggers
- Lambda handler → Company configuration: reads config (evidence: `lambda_function.py`)
- Lambda handler → Company scraper: creates scraper (evidence: `lambda_function.py`)
- Company scraper → Company career sites: fetches postings (evidence: `Scraper.py`)
- Lambda handler → Posting comparison: compares postings (evidence: `lambda_function.py`)
- Posting comparison → Lambda handler: returns differences (evidence: `lambda_function.py`)
- Lambda handler → S3 file helpers: loads saved data (evidence: `lambda_function.py`)
- S3 file helpers → Amazon S3: reads and writes (evidence: `helper_functions.py`)
- Lambda handler → Email sender: sends alert (evidence: `lambda_function.py`)
- Email sender → Amazon SES: sends email (evidence: `helper_functions.py`)
- Company scraper → Job posting model: builds postings (evidence: `Scraper.py`)
- Polling driver → Change detection: checks companies (evidence: `Scraper.py`)
- Change detection → Company scraper: fetches updates (evidence: `Scraper.py`)
