# gillotvi/lbc architecture

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

- Interactive diagram: https://gitdiagram.com/gillotvi/lbc
- Repository: https://github.com/gillotvi/lbc

## Overview

This is a Google Sheets-bound leboncoin alert script. A user installs it in a spreadsheet, configures alert settings, and runs a search that fetches leboncoin results, tracks seen listings in sheet cells, and can email a formatted alert. The single source file combines menu setup, search orchestration, parsing, spreadsheet state, and notification. The excerpts omit some function bodies, so the diagram shows only relationships visible in the excerpt or README.

Main entry points: [`script.js`](https://github.com/gillotvi/lbc/blob/master/script.js) (Alert script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and menus"]
  node_menus["Setup menus<br/>[script.js]"]
  node_settings["Alert settings<br/>[script.js]"]
end

subgraph group_search["Search and parsing"]
  node_script["Alert script<br/>[script.js]"]
  node_parser["Listing parser<br/>[script.js]"]
end

subgraph group_results["State and alerts"]
  node_spreadsheet[("Google Sheet")]
  node_email["Email service"]
end

node_user(("Spreadsheet user"))
node_listing_site["leboncoin"]

node_user -->|"opens sheet"| node_menus
node_menus -->|"offers setup"| node_settings
node_user -->|"runs search"| node_script
node_script -->|"fetches results"| node_listing_site
node_script -->|"extracts listings"| node_parser
node_script -->|"reads and updates"| node_spreadsheet
node_script -->|"sends alerts"| node_email

click node_script "https://github.com/gillotvi/lbc/blob/master/script.js"
click node_menus "https://github.com/gillotvi/lbc/blob/master/script.js"
click node_settings "https://github.com/gillotvi/lbc/blob/master/script.js"
click node_parser "https://github.com/gillotvi/lbc/blob/master/script.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_menus,node_settings,node_user toneBlue
class node_script,node_parser toneAmber
class node_spreadsheet,node_email toneMint
class node_listing_site toneIndigo
```

## Components

### Setup and menus

- [Setup menus](https://github.com/gillotvi/lbc/blob/master/script.js): `script.js`
- [Alert settings](https://github.com/gillotvi/lbc/blob/master/script.js): `script.js`

### Search and parsing

- [Alert script](https://github.com/gillotvi/lbc/blob/master/script.js): `script.js`
- [Listing parser](https://github.com/gillotvi/lbc/blob/master/script.js): `script.js`

### State and alerts

- **Google Sheet**
- **Email service**

### Other components

- **Spreadsheet user**
- **leboncoin**

## Connections

- Spreadsheet user → Setup menus: opens sheet (evidence: `README.md`)
- Setup menus → Alert settings: offers setup (evidence: `script.js`)
- Spreadsheet user → Alert script: runs search (evidence: `README.md`)
- Alert script → leboncoin: fetches results (evidence: `script.js`)
- Alert script → Listing parser: extracts listings (evidence: `script.js`)
- Alert script → Google Sheet: reads and updates (evidence: `script.js`)
- Alert script → Email service: sends alerts (evidence: `script.js`)
