# erickouassi/the-collection-of-catholic-prayers-api architecture

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

- Interactive diagram: https://gitdiagram.com/erickouassi/the-collection-of-catholic-prayers-api
- Repository: https://github.com/erickouassi/the-collection-of-catholic-prayers-api

## Overview

This Node.js REST API serves curated Catholic prayers, the Stations of the Cross, and English and French saint calendars as JSON. A client request reaches the HTTP router, which delegates each supported route to the controller; the controller returns static datasets or filters a language-specific saints list for today. The router serializes the result in its response. README capabilities and additional today-saint routes visible in the router are included. Source excerpts are partial, so the graph reflects only evidenced calls and documented capabilities.

Main entry points: [`controller.js`](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/controller.js) (Content Controller), [`index.js`](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/index.js) (HTTP Router), [`db_prayers.js`](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_prayers.js) (Basic Prayers), [`db_stations_of_cross.js`](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_stations_of_cross.js) (Stations of Cross)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_http["HTTP Router<br/>[index.js]"]
end

subgraph group_logic["Content Access"]
  node_controller["Content Controller<br/>[controller.js]"]
end

subgraph group_content["Prayer Content"]
  node_prayers["Basic Prayers<br/>[db_prayers.js]"]
  node_stations["Stations of Cross"]
end

subgraph group_calendar["Saint Calendars"]
  node_saints_en["English Saints"]
  node_saints_fr["French Saints"]
end

node_client(("API Client"))

node_client -->|"requests"| node_http
node_http -->|"dispatches"| node_controller
node_controller -->|"returns"| node_prayers
node_controller -->|"returns"| node_stations
node_controller -->|"returns / filters"| node_saints_en
node_controller -->|"returns / filters"| node_saints_fr
node_http -->|"JSON response"| node_client

click node_http "https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/index.js"
click node_controller "https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/controller.js"
click node_prayers "https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_prayers.js"
click node_stations "https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_stations_of_cross.js"
click node_saints_en "https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_saint_of_the_day.js"
click node_saints_fr "https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_saint_du_jour.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_http,node_client toneBlue
class node_controller toneAmber
class node_prayers,node_stations toneMint
class node_saints_en,node_saints_fr toneRose
```

## Components

### HTTP API

- [HTTP Router](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/index.js): `index.js`

### Content Access

- [Content Controller](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/controller.js): `controller.js`

### Prayer Content

- [Basic Prayers](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_prayers.js): `db_prayers.js`
- [Stations of Cross](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_stations_of_cross.js): `db_stations_of_cross.js`

### Saint Calendars

- [English Saints](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_saint_of_the_day.js): `db_saint_of_the_day.js`
- [French Saints](https://github.com/erickouassi/the-collection-of-catholic-prayers-api/blob/main/db_saint_du_jour.js): `db_saint_du_jour.js`

### Other components

- **API Client**

## Connections

- API Client → HTTP Router: requests (evidence: `README.md`)
- HTTP Router → Content Controller: dispatches (evidence: `index.js`)
- Content Controller → Basic Prayers: returns (evidence: `controller.js`)
- Content Controller → Stations of Cross: returns (evidence: `controller.js`)
- Content Controller → English Saints: returns / filters (evidence: `controller.js`)
- Content Controller → French Saints: returns / filters (evidence: `controller.js`)
- HTTP Router → API Client: JSON response (evidence: `index.js`)
