# ksyv/carillon architecture

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

- Interactive diagram: https://gitdiagram.com/ksyv/carillon
- Repository: https://github.com/ksyv/carillon

## Overview

Carillon is a childcare and school-services management application. Staff sign in to a dashboard, manage children and family records, record attendance, and handle billing and reporting; families also have a parent portal for requests and invoices. The server exposes these capabilities through API routes backed by MongoDB models. The README provides no product detail, so the feature map relies on route wiring and the sampled source; some client pages and route implementations were not inspected, so their internal relationships are omitted.

Main entry points: [`client/src/App.jsx`](https://github.com/ksyv/carillon/blob/main/client/src/App.jsx) (App routing), [`server/index.js`](https://github.com/ksyv/carillon/blob/main/server/index.js) (API server), [`server/routes/billing.js`](https://github.com/ksyv/carillon/blob/main/server/routes/billing.js) (Billing API), [`server/models/Child.js`](https://github.com/ksyv/carillon/blob/main/server/models/Child.js) (Child records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Staff application"]
  node_app["App routing<br/>[App.jsx]"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_attendance_ui["Attendance sessions<br/>[SessionView.jsx]"]
  node_children_ui["Child records"]
  node_families_ui["Family records<br/>[FamilyManager.jsx]"]
  node_calendar["Calendar"]
  node_billing_ui["Billing management<br/>[BillingManager.jsx]"]
  node_stats_ui["Reports and statistics<br/>[AdvancedStats.jsx]"]
  node_caf_ui["CAF statistics<br/>[CafStats.jsx]"]
  node_news_ui["News management<br/>[NewsManager.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_family["Family portal"]
  node_portal_ui["Family portal<br/>[FamilyPortal.jsx]"]
  node_request_ui["Child requests"]
end

subgraph group_api["API services"]
  node_server["API server<br/>[index.js]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_attendance_route["Attendance API<br/>[attendance.js]"]
  node_children_route["Children API<br/>[children.js]"]
  node_billing_route["Billing API<br/>[billing.js]"]
  node_stats_route["Statistics API<br/>[stats.js]"]
  node_requests_route["Modification requests"]
  node_parent_route["Parent API<br/>[parentPortal.js]"]
  node_news_route["News API<br/>[news.js]"]
end

subgraph group_records["Data records"]
  node_attendance_model[("Attendance records<br/>[Attendance.js]")]
  node_child_model[("Child records<br/>[Child.js]")]
  node_family_model[("Family records<br/>[Family.js]")]
  node_invoice_model[("Invoices<br/>[Invoice.js]")]
  node_billing_model[("Billing rules<br/>[Billing.js]")]
  node_modification_model[("Modification requests")]
end

node_staff(("Staff user"))
node_family_user(("Family user"))
node_mongo[("MongoDB")]

node_staff -->|"opens"| node_app
node_family_user -->|"opens portal"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_attendance_ui
node_app -->|"routes to"| node_children_ui
node_app -->|"routes to"| node_families_ui
node_app -->|"routes to"| node_billing_ui
node_app -->|"routes to"| node_stats_ui
node_app -->|"routes to"| node_caf_ui
node_app -->|"routes to"| node_news_ui
node_app -->|"routes to"| node_portal_ui
node_children_ui -->|"calls"| node_api_client
node_families_ui -->|"calls"| node_api_client
node_billing_ui -->|"calls"| node_api_client
node_billing_ui -->|"uses"| node_calendar
node_request_ui -->|"calls"| node_api_client
node_portal_ui -.->|"uses"| node_request_ui
node_api_client -.->|"sends API requests"| node_server
node_server -->|"mounts"| node_attendance_route
node_server -->|"mounts"| node_children_route
node_server -->|"mounts"| node_billing_route
node_server -->|"mounts"| node_stats_route
node_server -->|"mounts"| node_requests_route
node_server -->|"mounts"| node_parent_route
node_server -->|"mounts"| node_news_route
node_attendance_route -->|"reads and writes"| node_attendance_model
node_children_route -->|"reads and writes"| node_child_model
node_billing_route -->|"reads and writes"| node_billing_model
node_billing_route -->|"reads and writes"| node_invoice_model
node_billing_route -->|"reads"| node_attendance_model
node_billing_route -->|"reads"| node_child_model
node_billing_route -->|"reads"| node_family_model
node_stats_route -->|"reads"| node_attendance_model
node_stats_route -->|"reads"| node_child_model
node_stats_route -->|"reads"| node_family_model
node_requests_route -->|"reads and writes"| node_modification_model
node_requests_route -->|"reads"| node_child_model
node_requests_route -->|"reads"| node_family_model
node_parent_route -->|"reads"| node_invoice_model
node_parent_route -->|"reads"| node_child_model
node_auth -.->|"verifies tokens"| node_server
node_attendance_model -.->|"persists in"| node_mongo
node_child_model -.->|"persists in"| node_mongo
node_family_model -.->|"persists in"| node_mongo
node_invoice_model -.->|"persists in"| node_mongo

click node_app "https://github.com/ksyv/carillon/blob/main/client/src/App.jsx"
click node_login "https://github.com/ksyv/carillon/blob/main/client/src/pages/Login.jsx"
click node_dashboard "https://github.com/ksyv/carillon/blob/main/client/src/pages/Dashboard.jsx"
click node_attendance_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/SessionView.jsx"
click node_children_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/ChildrenManager.jsx"
click node_families_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/FamilyManager.jsx"
click node_calendar "https://github.com/ksyv/carillon/blob/main/client/src/components/InteractiveCalendar.jsx"
click node_billing_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/BillingManager.jsx"
click node_stats_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/AdvancedStats.jsx"
click node_caf_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/CafStats.jsx"
click node_news_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/NewsManager.jsx"
click node_portal_ui "https://github.com/ksyv/carillon/blob/main/client/src/pages/FamilyPortal.jsx"
click node_request_ui "https://github.com/ksyv/carillon/blob/main/client/src/components/FamilyPortal/ChildRequestModal.jsx"
click node_api_client "https://github.com/ksyv/carillon/blob/main/client/src/api.js"
click node_server "https://github.com/ksyv/carillon/blob/main/server/index.js"
click node_auth "https://github.com/ksyv/carillon/blob/main/server/middleware/auth.js"
click node_attendance_route "https://github.com/ksyv/carillon/blob/main/server/routes/attendance.js"
click node_children_route "https://github.com/ksyv/carillon/blob/main/server/routes/children.js"
click node_billing_route "https://github.com/ksyv/carillon/blob/main/server/routes/billing.js"
click node_stats_route "https://github.com/ksyv/carillon/blob/main/server/routes/stats.js"
click node_requests_route "https://github.com/ksyv/carillon/blob/main/server/routes/modificationRequests.js"
click node_parent_route "https://github.com/ksyv/carillon/blob/main/server/routes/parentPortal.js"
click node_news_route "https://github.com/ksyv/carillon/blob/main/server/routes/news.js"
click node_attendance_model "https://github.com/ksyv/carillon/blob/main/server/models/Attendance.js"
click node_child_model "https://github.com/ksyv/carillon/blob/main/server/models/Child.js"
click node_family_model "https://github.com/ksyv/carillon/blob/main/server/models/Family.js"
click node_invoice_model "https://github.com/ksyv/carillon/blob/main/server/models/Invoice.js"
click node_billing_model "https://github.com/ksyv/carillon/blob/main/server/models/Billing.js"
click node_modification_model "https://github.com/ksyv/carillon/blob/main/server/models/ModificationRequest.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_app,node_login,node_dashboard,node_attendance_ui,node_children_ui,node_families_ui,node_calendar,node_billing_ui,node_stats_ui,node_caf_ui,node_news_ui,node_api_client,node_staff,node_family_user toneBlue
class node_portal_ui,node_request_ui,node_mongo toneAmber
class node_server,node_auth,node_attendance_route,node_children_route,node_billing_route,node_stats_route,node_requests_route,node_parent_route,node_news_route toneMint
class node_attendance_model,node_child_model,node_family_model,node_invoice_model,node_billing_model,node_modification_model toneRose
```

## Components

### Staff application

- [App routing](https://github.com/ksyv/carillon/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Sign in](https://github.com/ksyv/carillon/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [Dashboard](https://github.com/ksyv/carillon/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Attendance sessions](https://github.com/ksyv/carillon/blob/main/client/src/pages/SessionView.jsx): `client/src/pages/SessionView.jsx`
- [Child records](https://github.com/ksyv/carillon/blob/main/client/src/pages/ChildrenManager.jsx): `client/src/pages/ChildrenManager.jsx`
- [Family records](https://github.com/ksyv/carillon/blob/main/client/src/pages/FamilyManager.jsx): `client/src/pages/FamilyManager.jsx`
- [Calendar](https://github.com/ksyv/carillon/blob/main/client/src/components/InteractiveCalendar.jsx): `client/src/components/InteractiveCalendar.jsx`
- [Billing management](https://github.com/ksyv/carillon/blob/main/client/src/pages/BillingManager.jsx): `client/src/pages/BillingManager.jsx`
- [Reports and statistics](https://github.com/ksyv/carillon/blob/main/client/src/pages/AdvancedStats.jsx): `client/src/pages/AdvancedStats.jsx`
- [CAF statistics](https://github.com/ksyv/carillon/blob/main/client/src/pages/CafStats.jsx): `client/src/pages/CafStats.jsx`
- [News management](https://github.com/ksyv/carillon/blob/main/client/src/pages/NewsManager.jsx): `client/src/pages/NewsManager.jsx`
- [API client](https://github.com/ksyv/carillon/blob/main/client/src/api.js): `client/src/api.js`

### Family portal

- [Family portal](https://github.com/ksyv/carillon/blob/main/client/src/pages/FamilyPortal.jsx): `client/src/pages/FamilyPortal.jsx`
- [Child requests](https://github.com/ksyv/carillon/blob/main/client/src/components/FamilyPortal/ChildRequestModal.jsx): `client/src/components/FamilyPortal/ChildRequestModal.jsx`

### API services

- [API server](https://github.com/ksyv/carillon/blob/main/server/index.js): `server/index.js`
- [Authentication](https://github.com/ksyv/carillon/blob/main/server/middleware/auth.js): `server/middleware/auth.js`
- [Attendance API](https://github.com/ksyv/carillon/blob/main/server/routes/attendance.js): `server/routes/attendance.js`
- [Children API](https://github.com/ksyv/carillon/blob/main/server/routes/children.js): `server/routes/children.js`
- [Billing API](https://github.com/ksyv/carillon/blob/main/server/routes/billing.js): `server/routes/billing.js`
- [Statistics API](https://github.com/ksyv/carillon/blob/main/server/routes/stats.js): `server/routes/stats.js`
- [Modification requests](https://github.com/ksyv/carillon/blob/main/server/routes/modificationRequests.js): `server/routes/modificationRequests.js`
- [Parent API](https://github.com/ksyv/carillon/blob/main/server/routes/parentPortal.js): `server/routes/parentPortal.js`
- [News API](https://github.com/ksyv/carillon/blob/main/server/routes/news.js): `server/routes/news.js`

### Data records

- [Attendance records](https://github.com/ksyv/carillon/blob/main/server/models/Attendance.js): `server/models/Attendance.js`
- [Child records](https://github.com/ksyv/carillon/blob/main/server/models/Child.js): `server/models/Child.js`
- [Family records](https://github.com/ksyv/carillon/blob/main/server/models/Family.js): `server/models/Family.js`
- [Invoices](https://github.com/ksyv/carillon/blob/main/server/models/Invoice.js): `server/models/Invoice.js`
- [Billing rules](https://github.com/ksyv/carillon/blob/main/server/models/Billing.js): `server/models/Billing.js`
- [Modification requests](https://github.com/ksyv/carillon/blob/main/server/models/ModificationRequest.js): `server/models/ModificationRequest.js`

### Other components

- **Staff user**
- **Family user**
- **MongoDB**

## Connections

- Staff user → App routing: opens (evidence: `client/src/App.jsx`)
- Family user → App routing: opens portal (evidence: `client/src/App.jsx`)
- App routing → Sign in: routes to (evidence: `client/src/App.jsx`)
- App routing → Dashboard: routes to (evidence: `client/src/App.jsx`)
- App routing → Attendance sessions: routes to (evidence: `client/src/App.jsx`)
- App routing → Child records: routes to (evidence: `client/src/App.jsx`)
- App routing → Family records: routes to (evidence: `client/src/App.jsx`)
- App routing → Billing management: routes to (evidence: `client/src/App.jsx`)
- App routing → Reports and statistics: routes to (evidence: `client/src/App.jsx`)
- App routing → CAF statistics: routes to (evidence: `client/src/App.jsx`)
- App routing → News management: routes to (evidence: `client/src/App.jsx`)
- App routing → Family portal: routes to (evidence: `client/src/App.jsx`)
- Child records → API client: calls (evidence: `client/src/pages/ChildrenManager.jsx`)
- Family records → API client: calls (evidence: `client/src/pages/FamilyManager.jsx`)
- Billing management → API client: calls (evidence: `client/src/pages/BillingManager.jsx`)
- Billing management → Calendar: uses (evidence: `client/src/pages/BillingManager.jsx`)
- Child requests → API client: calls (evidence: `client/src/components/FamilyPortal/ChildRequestModal.jsx`)
- Family portal → Child requests: uses
- API client → API server: sends API requests
- API server → Attendance API: mounts (evidence: `server/index.js`)
- API server → Children API: mounts (evidence: `server/index.js`)
- API server → Billing API: mounts (evidence: `server/index.js`)
- API server → Statistics API: mounts (evidence: `server/index.js`)
- API server → Modification requests: mounts (evidence: `server/index.js`)
- API server → Parent API: mounts (evidence: `server/index.js`)
- API server → News API: mounts (evidence: `server/index.js`)
- Attendance API → Attendance records: reads and writes (evidence: `server/routes/attendance.js`)
- Children API → Child records: reads and writes (evidence: `server/routes/children.js`)
- Billing API → Billing rules: reads and writes (evidence: `server/routes/billing.js`)
- Billing API → Invoices: reads and writes (evidence: `server/routes/billing.js`)
- Billing API → Attendance records: reads (evidence: `server/routes/billing.js`)
- Billing API → Child records: reads (evidence: `server/routes/billing.js`)
- Billing API → Family records: reads (evidence: `server/routes/billing.js`)
- Statistics API → Attendance records: reads (evidence: `server/routes/stats.js`)
- Statistics API → Child records: reads (evidence: `server/routes/stats.js`)
- Statistics API → Family records: reads (evidence: `server/routes/stats.js`)
- Modification requests → Modification requests: reads and writes (evidence: `server/routes/modificationRequests.js`)
- Modification requests → Child records: reads (evidence: `server/routes/modificationRequests.js`)
- Modification requests → Family records: reads (evidence: `server/routes/modificationRequests.js`)
- Parent API → Invoices: reads (evidence: `server/routes/parentPortal.js`)
- Parent API → Child records: reads (evidence: `server/routes/parentPortal.js`)
- Authentication → API server: verifies tokens
- Attendance records → MongoDB: persists in
- Child records → MongoDB: persists in
- Family records → MongoDB: persists in
- Invoices → MongoDB: persists in
