# walou974/lecturesdujour architecture

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

- Interactive diagram: https://gitdiagram.com/walou974/lecturesdujour
- Repository: https://github.com/walou974/lecturesdujour

## Overview

Évangile du Jour serves liturgical readings and the Gospel verse for a selected date. The main user flow is React date selection → concurrent PHP reading and verse requests → SQLite-backed results → reading cards and verse display. A separate Python importer retrieves liturgical data from AELF and stores readings and verses. The graph preserves the documented import, storage, API and UI capabilities; unsampled PHP-to-database details rely on the README’s architecture description.

Main entry points: [`front/src/App.jsx`](https://github.com/walou974/lecturesdujour/blob/master/front/src/App.jsx) (Date-based app), [`back/scripts/main.py`](https://github.com/walou974/lecturesdujour/blob/master/back/scripts/main.py) (Liturgical importer), [`back/database/schema.sql`](https://github.com/walou974/lecturesdujour/blob/master/back/database/schema.sql) (Text database), [`back/scripts/DBHelper.py`](https://github.com/walou974/lecturesdujour/blob/master/back/scripts/DBHelper.py) (SQLite helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data ingestion"]
  node_importer["Liturgical importer<br/>[main.py]"]
  node_dbhelper["SQLite helper<br/>[DBHelper.py]"]
  node_logger["Import logging<br/>[LogHelper.py]"]
end

subgraph group_storage["Text storage"]
  node_sqlite[("Text database<br/>[schema.sql]")]
end

subgraph group_api["PHP API"]
  node_lecturesapi["Readings endpoint<br/>[lectures.php]"]
  node_verseapi["Verse endpoint<br/>[verse.php]"]
  node_refreshapi["Refresh endpoint<br/>[refresh.php]"]
end

subgraph group_frontend["Reading interface"]
  node_app["Date-based app<br/>[App.jsx]"]
  node_dates["Date navigation<br/>[DateSelector.jsx]"]
  node_header["Page heading<br/>[Header.jsx]"]
  node_theme["Theme toggle<br/>[ThemeToggle.jsx]"]
  node_readingcard["Reading card<br/>[Card.jsx]"]
  node_versecard["Verse display<br/>[VerseCard.jsx]"]
end

node_reader(("Reader"))
node_aelf(("AELF service"))

node_reader -->|"opens"| node_app
node_app -->|"renders"| node_dates
node_app -->|"renders"| node_header
node_app -->|"renders"| node_theme
node_app -->|"renders"| node_readingcard
node_app -->|"renders"| node_versecard
node_app -->|"requests readings"| node_lecturesapi
node_app -->|"requests verse"| node_verseapi
node_aelf -->|"provides liturgy"| node_importer
node_importer -->|"imports texts"| node_dbhelper
node_importer -->|"logs progress"| node_logger
node_dbhelper -->|"reads and writes"| node_sqlite
node_lecturesapi -->|"reads readings"| node_sqlite
node_verseapi -->|"reads verse"| node_sqlite
node_refreshapi -.->|"triggers refresh"| node_importer

click node_importer "https://github.com/walou974/lecturesdujour/blob/master/back/scripts/main.py"
click node_dbhelper "https://github.com/walou974/lecturesdujour/blob/master/back/scripts/DBHelper.py"
click node_logger "https://github.com/walou974/lecturesdujour/blob/master/back/scripts/LogHelper.py"
click node_sqlite "https://github.com/walou974/lecturesdujour/blob/master/back/database/schema.sql"
click node_lecturesapi "https://github.com/walou974/lecturesdujour/blob/master/back/api/lectures.php"
click node_verseapi "https://github.com/walou974/lecturesdujour/blob/master/back/api/verse.php"
click node_refreshapi "https://github.com/walou974/lecturesdujour/blob/master/back/api/refresh.php"
click node_app "https://github.com/walou974/lecturesdujour/blob/master/front/src/App.jsx"
click node_dates "https://github.com/walou974/lecturesdujour/blob/master/front/src/components/DateSelector.jsx"
click node_header "https://github.com/walou974/lecturesdujour/blob/master/front/src/components/Header.jsx"
click node_theme "https://github.com/walou974/lecturesdujour/blob/master/front/src/components/ThemeToggle.jsx"
click node_readingcard "https://github.com/walou974/lecturesdujour/blob/master/front/src/components/Card.jsx"
click node_versecard "https://github.com/walou974/lecturesdujour/blob/master/front/src/components/VerseCard.jsx"

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_importer,node_dbhelper,node_logger toneBlue
class node_sqlite toneAmber
class node_lecturesapi,node_verseapi,node_refreshapi toneMint
class node_app,node_dates,node_header,node_theme,node_readingcard,node_versecard toneRose
class node_reader,node_aelf toneIndigo
```

## Components

### Data ingestion

- [Liturgical importer](https://github.com/walou974/lecturesdujour/blob/master/back/scripts/main.py): `back/scripts/main.py`
- [SQLite helper](https://github.com/walou974/lecturesdujour/blob/master/back/scripts/DBHelper.py): `back/scripts/DBHelper.py`
- [Import logging](https://github.com/walou974/lecturesdujour/blob/master/back/scripts/LogHelper.py): `back/scripts/LogHelper.py`

### Text storage

- [Text database](https://github.com/walou974/lecturesdujour/blob/master/back/database/schema.sql): `back/database/schema.sql`

### PHP API

- [Readings endpoint](https://github.com/walou974/lecturesdujour/blob/master/back/api/lectures.php): `back/api/lectures.php`
- [Verse endpoint](https://github.com/walou974/lecturesdujour/blob/master/back/api/verse.php): `back/api/verse.php`
- [Refresh endpoint](https://github.com/walou974/lecturesdujour/blob/master/back/api/refresh.php): `back/api/refresh.php`

### Reading interface

- [Date-based app](https://github.com/walou974/lecturesdujour/blob/master/front/src/App.jsx): `front/src/App.jsx`
- [Date navigation](https://github.com/walou974/lecturesdujour/blob/master/front/src/components/DateSelector.jsx): `front/src/components/DateSelector.jsx`
- [Page heading](https://github.com/walou974/lecturesdujour/blob/master/front/src/components/Header.jsx): `front/src/components/Header.jsx`
- [Theme toggle](https://github.com/walou974/lecturesdujour/blob/master/front/src/components/ThemeToggle.jsx): `front/src/components/ThemeToggle.jsx`
- [Reading card](https://github.com/walou974/lecturesdujour/blob/master/front/src/components/Card.jsx): `front/src/components/Card.jsx`
- [Verse display](https://github.com/walou974/lecturesdujour/blob/master/front/src/components/VerseCard.jsx): `front/src/components/VerseCard.jsx`

### Other components

- **Reader**
- **AELF service**

## Connections

- Reader → Date-based app: opens (evidence: `README.md`)
- Date-based app → Date navigation: renders (evidence: `front/src/App.jsx`)
- Date-based app → Page heading: renders (evidence: `front/src/App.jsx`)
- Date-based app → Theme toggle: renders (evidence: `front/src/App.jsx`)
- Date-based app → Reading card: renders (evidence: `front/src/App.jsx`)
- Date-based app → Verse display: renders (evidence: `front/src/App.jsx`)
- Date-based app → Readings endpoint: requests readings (evidence: `front/src/App.jsx`)
- Date-based app → Verse endpoint: requests verse (evidence: `front/src/App.jsx`)
- AELF service → Liturgical importer: provides liturgy (evidence: `back/scripts/main.py`)
- Liturgical importer → SQLite helper: imports texts (evidence: `back/scripts/main.py`)
- Liturgical importer → Import logging: logs progress (evidence: `back/scripts/main.py`)
- SQLite helper → Text database: reads and writes (evidence: `back/scripts/DBHelper.py`)
- Readings endpoint → Text database: reads readings (evidence: `README.md`)
- Verse endpoint → Text database: reads verse (evidence: `README.md`)
- Refresh endpoint → Liturgical importer: triggers refresh
