# zakariafl27/laravel-job-scraper architecture

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

- Interactive diagram: https://gitdiagram.com/zakariafl27/laravel-job-scraper
- Repository: https://github.com/zakariafl27/laravel-job-scraper

## Overview

Job Alert System accepts job-search alerts through its API, processes scraping asynchronously, stores discovered jobs, and sends WhatsApp notifications. The scraping service excerpt shows Adzuna search and persistence; the README documents dashboard, filtering, queue, and WhatsApp capabilities, while the tree shows additional source-specific scrapers. Those broader scraper relationships are shown as an optional branch because their runtime orchestration was not excerpted. The dashboard’s detailed data flow is likewise not established by the available source.

Main entry points: [`app/Services/JobScrapingService.php`](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/JobScrapingService.php) (Scraping service), [`app/Models/JobAlert.php`](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/JobAlert.php) (Alert records), [`app/Http/Controllers/api/JobAlertController.php`](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/api/JobAlertController.php) (Alert API), [`app/Jobs/ScrapeJobsForAlert.php`](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Jobs/ScrapeJobsForAlert.php) (Alert scrape job)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_dashboard["Dashboard"]
  node_api_routes["API routes<br/>[api.php]"]
  node_alert_api["Alert API"]
  node_job_api["Jobs API<br/>[JobController.php]"]
  node_base_controller["Controller base<br/>[Controller.php]"]
end

subgraph group_workflow["Alert processing"]
  node_queue["Job queue"]
  node_scrape_job["Alert scrape job"]
  node_alert_model[("Alert records<br/>[JobAlert.php]")]
  node_user_model[("User records<br/>[User.php]")]
  node_job_model[("Job records<br/>[job.php]")]
  node_database[("PostgreSQL")]
end

subgraph group_scraping["Job discovery"]
  node_scraping_service["Scraping service"]
  node_adzuna{{"Adzuna API"}}
  node_scraper_factory["Scraper factory<br/>[ScraperFactory.php]"]
  node_source_scrapers["Source scrapers"]
end

subgraph group_delivery["Notification delivery"]
  node_whatsapp_service["WhatsApp sender"]
  node_whatsapp_node["Baileys service<br/>[server.js]"]
  node_whatsapp_network{{"WhatsApp network"}}
end

node_user(("Alert creator"))

node_user -->|"submits alert"| node_api_routes
node_api_routes -->|"routes requests"| node_alert_api
node_alert_api -->|"creates and reads"| node_alert_model
node_alert_api -->|"dispatches"| node_scrape_job
node_scrape_job -.->|"runs asynchronously"| node_queue
node_scrape_job -->|"requests scraping"| node_scraping_service
node_scraping_service -->|"searches jobs"| node_adzuna
node_scraping_service -->|"upserts jobs"| node_job_model
node_scraping_service -->|"updates alert"| node_alert_model
node_scrape_job -->|"sends new jobs"| node_whatsapp_service
node_whatsapp_service -->|"posts message"| node_whatsapp_node
node_whatsapp_node -.->|"delivers message"| node_whatsapp_network
node_whatsapp_service -->|"marks notified"| node_alert_model
node_scraper_factory -->|"selects source"| node_source_scrapers
node_scraping_service -.->|"may use"| node_scraper_factory
node_alert_api -->|"extends"| node_base_controller
node_job_api -->|"extends"| node_base_controller
node_job_api -->|"queries jobs"| node_job_model
node_job_api -->|"counts alerts"| node_alert_model
node_alert_model -.->|"persists data"| node_database
node_job_model -.->|"persists data"| node_database
node_user_model -.->|"persists data"| node_database
node_user -->|"views dashboard"| node_dashboard

click node_dashboard "https://github.com/zakariafl27/laravel-job-scraper/blob/main/resources/views/dashboard.blade.php"
click node_api_routes "https://github.com/zakariafl27/laravel-job-scraper/blob/main/routes/api.php"
click node_alert_api "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/api/JobAlertController.php"
click node_job_api "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/api/JobController.php"
click node_base_controller "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/Controller.php"
click node_scrape_job "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Jobs/ScrapeJobsForAlert.php"
click node_alert_model "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/JobAlert.php"
click node_user_model "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/User.php"
click node_job_model "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/job.php"
click node_scraping_service "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/JobScrapingService.php"
click node_scraper_factory "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/Scrapers/ScraperFactory.php"
click node_source_scrapers "https://github.com/zakariafl27/laravel-job-scraper/tree/main/app/Services/Scrapers"
click node_whatsapp_service "https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/WhatsAppService.php"
click node_whatsapp_node "https://github.com/zakariafl27/laravel-job-scraper/blob/main/whatsapp-service/server.js"

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_dashboard,node_api_routes,node_alert_api,node_job_api,node_base_controller toneBlue
class node_queue,node_scrape_job,node_alert_model,node_user_model,node_job_model,node_database toneAmber
class node_scraping_service,node_adzuna,node_scraper_factory,node_source_scrapers toneMint
class node_whatsapp_service,node_whatsapp_node,node_whatsapp_network toneRose
class node_user toneIndigo
```

## Components

### User interfaces

- [Dashboard](https://github.com/zakariafl27/laravel-job-scraper/blob/main/resources/views/dashboard.blade.php): `resources/views/dashboard.blade.php`
- [API routes](https://github.com/zakariafl27/laravel-job-scraper/blob/main/routes/api.php): `routes/api.php`
- [Alert API](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/api/JobAlertController.php): `app/Http/Controllers/api/JobAlertController.php`
- [Jobs API](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/api/JobController.php): `app/Http/Controllers/api/JobController.php`
- [Controller base](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Http/Controllers/Controller.php): `app/Http/Controllers/Controller.php`

### Alert processing

- **Job queue**
- [Alert scrape job](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Jobs/ScrapeJobsForAlert.php): `app/Jobs/ScrapeJobsForAlert.php`
- [Alert records](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/JobAlert.php): `app/Models/JobAlert.php`
- [User records](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/User.php): `app/Models/User.php`
- [Job records](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Models/job.php): `app/Models/job.php`
- **PostgreSQL**

### Job discovery

- [Scraping service](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/JobScrapingService.php): `app/Services/JobScrapingService.php`
- **Adzuna API**
- [Scraper factory](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/Scrapers/ScraperFactory.php): `app/Services/Scrapers/ScraperFactory.php`
- [Source scrapers](https://github.com/zakariafl27/laravel-job-scraper/tree/main/app/Services/Scrapers): `app/Services/Scrapers`

### Notification delivery

- [WhatsApp sender](https://github.com/zakariafl27/laravel-job-scraper/blob/main/app/Services/WhatsAppService.php): `app/Services/WhatsAppService.php`
- [Baileys service](https://github.com/zakariafl27/laravel-job-scraper/blob/main/whatsapp-service/server.js): `whatsapp-service/server.js`
- **WhatsApp network**

### Other components

- **Alert creator**

## Connections

- Alert creator → API routes: submits alert (evidence: `README.md`)
- API routes → Alert API: routes requests (evidence: `routes/api.php`)
- Alert API → Alert records: creates and reads (evidence: `app/Http/Controllers/api/JobAlertController.php`)
- Alert API → Alert scrape job: dispatches (evidence: `app/Http/Controllers/api/JobAlertController.php`)
- Alert scrape job → Job queue: runs asynchronously (evidence: `README.md`)
- Alert scrape job → Scraping service: requests scraping (evidence: `app/Jobs/ScrapeJobsForAlert.php`)
- Scraping service → Adzuna API: searches jobs (evidence: `app/Services/JobScrapingService.php`)
- Scraping service → Job records: upserts jobs (evidence: `app/Services/JobScrapingService.php`)
- Scraping service → Alert records: updates alert (evidence: `app/Services/JobScrapingService.php`)
- Alert scrape job → WhatsApp sender: sends new jobs (evidence: `app/Jobs/ScrapeJobsForAlert.php`)
- WhatsApp sender → Baileys service: posts message (evidence: `app/Services/WhatsAppService.php`)
- Baileys service → WhatsApp network: delivers message (evidence: `README.md`)
- WhatsApp sender → Alert records: marks notified (evidence: `app/Services/WhatsAppService.php`)
- Scraper factory → Source scrapers: selects source (evidence: `app/Services/Scrapers/ScraperFactory.php`)
- Scraping service → Scraper factory: may use
- Alert API → Controller base: extends (evidence: `app/Http/Controllers/api/JobAlertController.php`)
- Jobs API → Controller base: extends (evidence: `app/Http/Controllers/api/JobController.php`)
- Jobs API → Job records: queries jobs (evidence: `app/Http/Controllers/api/JobController.php`)
- Jobs API → Alert records: counts alerts (evidence: `app/Http/Controllers/api/JobController.php`)
- Alert records → PostgreSQL: persists data (evidence: `README.md`)
- Job records → PostgreSQL: persists data (evidence: `README.md`)
- User records → PostgreSQL: persists data (evidence: `README.md`)
- Alert creator → Dashboard: views dashboard (evidence: `README.md`)
