# harrymofoka/little-stars-creche-system architecture

> Architecture diagram of the GitHub repository harrymofoka/little-stars-creche-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harrymofoka/little-stars-creche-system
- Repository: https://github.com/harrymofoka/little-stars-creche-system

## Overview

Bright Beginnings Hub combines a public preschool website with a role-based LMS. The principal flow is account access, guided onboarding, then role-scoped dashboard work across learner records, attendance, fees, staff, reports, and notifications. The LMS uses browser localStorage-backed demo state rather than a backend. The README documents several capabilities whose route implementations were not sampled; those links are cited to the README, while implementation-level edges are limited to shown excerpts and indexed references.

Main entry points: [`src/lib/lms-access.ts`](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/lms-access.ts) (Role Data Scoping), [`src/app/dashboard/page.tsx`](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/page.tsx) (Overview Dashboard), [`src/app/page.tsx`](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/page.tsx) (Home and Marketing), [`src/app/onboarding/page.tsx`](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/onboarding/page.tsx) (Role Onboarding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Website"]
  node_home["Home and Marketing<br/>[page.tsx]"]
  node_programmes["Programmes Fees<br/>[page.tsx]"]
  node_tour["Tour Enquiry<br/>[page.tsx]"]
  node_about["Preschool Approach<br/>[page.tsx]"]
  node_brand["Brand Mark<br/>[BrandMark.tsx]"]
  node_siteblocks["Public Site Blocks<br/>[SiteBlocks.tsx]"]
  node_footer["Site Footer<br/>[SiteFooter.tsx]"]
end

subgraph group_identity["Identity Onboarding"]
  node_authpages["Sign In Sign Up<br/>[page.tsx]"]
  node_authshell["Auth Screen Shell<br/>[AuthSplit.tsx]"]
  node_auth["Accounts and Sessions<br/>[auth.tsx]"]
  node_wizard["Role Onboarding<br/>[page.tsx]"]
  node_questions["Role Question Sets"]
  node_summary["Onboarding Summary"]
  node_pdf["PDF Export<br/>[onboarding-pdf.ts]"]
end

subgraph group_operations["LMS Operations"]
  node_dashboard["Overview Dashboard<br/>[page.tsx]"]
  node_children["Learner Records<br/>[page.tsx]"]
  node_childform["Learner Form<br/>[ChildForm.tsx]"]
  node_attendance["Daily Attendance<br/>[page.tsx]"]
  node_fees["Fee Analytics<br/>[page.tsx]"]
  node_staff["Staff Directory<br/>[page.tsx]"]
  node_reports["Milestones Reports<br/>[page.tsx]"]
  node_admin["Admin Console<br/>[page.tsx]"]
  node_notificationspage["Notifications Inbox<br/>[page.tsx]"]
  node_notificationpanel["Notification Panel"]
end

subgraph group_platform["Shared State Components"]
  node_access["Role Data Scoping<br/>[lms-access.ts]"]
  node_store[("LMS Data Store<br/>[lms-store.tsx]")]
  node_seed["Demo LMS Records<br/>[lms.ts]"]
  node_activity[("Activity Notifications<br/>[activity.tsx]")]
  node_audit["Audit Log View<br/>[AuditLog.tsx]"]
  node_blocks["Dashboard UI Blocks<br/>[LmsBlocks.tsx]"]
  node_sheet["Sheet Primitive<br/>[sheet.tsx]"]
end

node_visitor(("Family or Staff"))

node_visitor -->|"visits"| node_home
node_visitor -->|"signs in"| node_authpages
node_home -->|"renders"| node_siteblocks
node_home -->|"renders"| node_footer
node_home -->|"links to"| node_programmes
node_home -->|"links to"| node_tour
node_authpages -->|"renders"| node_authshell
node_authpages -->|"uses"| node_auth
node_authshell -->|"renders"| node_brand
node_auth -->|"routes onboarding"| node_wizard
node_wizard -->|"loads questions"| node_questions
node_wizard -->|"saves progress"| node_auth
node_wizard -->|"syncs records"| node_store
node_summary -->|"generates export"| node_pdf
node_dashboard -->|"reads scoped data"| node_access
node_dashboard -->|"renders"| node_summary
node_dashboard -->|"renders"| node_notificationpanel
node_dashboard -->|"renders"| node_audit
node_children -->|"renders"| node_childform
node_children -->|"reads scoped data"| node_access
node_attendance -->|"reads scoped data"| node_access
node_fees -->|"reads scoped data"| node_access
node_fees -->|"updates invoices"| node_store
node_staff -->|"reads scoped data"| node_access
node_notificationspage -->|"uses feed"| node_activity
node_notificationpanel -->|"reads notifications"| node_activity
node_audit -->|"reads audit entries"| node_activity
node_access -->|"reads records"| node_store
node_access -->|"checks role"| node_auth
node_store -->|"initializes from"| node_seed
node_children -->|"uses UI blocks"| node_blocks
node_attendance -->|"uses UI blocks"| node_blocks
node_fees -->|"uses UI blocks"| node_blocks
node_staff -->|"uses UI blocks"| node_blocks
node_wizard -->|"completes onboarding"| node_auth
node_admin -.->|"manages schedules"| node_store
node_reports -.->|"reads scoped data"| node_access
node_dashboard -->|"uses UI blocks"| node_blocks

click node_home "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/page.tsx"
click node_programmes "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/programmes/page.tsx"
click node_tour "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/contact/page.tsx"
click node_about "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/about/page.tsx"
click node_authpages "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/login/page.tsx"
click node_authshell "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/AuthSplit.tsx"
click node_auth "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/auth.tsx"
click node_wizard "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/onboarding/page.tsx"
click node_questions "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/onboarding-questions.ts"
click node_summary "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/OnboardingSummary.tsx"
click node_pdf "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/onboarding-pdf.ts"
click node_dashboard "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/page.tsx"
click node_children "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/children/page.tsx"
click node_childform "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/ChildForm.tsx"
click node_attendance "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/attendance/page.tsx"
click node_fees "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/fees/page.tsx"
click node_staff "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/staff/page.tsx"
click node_reports "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/reports/page.tsx"
click node_admin "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/admin/page.tsx"
click node_notificationspage "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/notifications/page.tsx"
click node_notificationpanel "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/NotificationsPanel.tsx"
click node_access "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/lms-access.ts"
click node_store "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/lms-store.tsx"
click node_seed "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/data/lms.ts"
click node_activity "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/activity.tsx"
click node_audit "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/AuditLog.tsx"
click node_blocks "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/LmsBlocks.tsx"
click node_brand "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/BrandMark.tsx"
click node_siteblocks "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/SiteBlocks.tsx"
click node_footer "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/SiteFooter.tsx"
click node_sheet "https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/ui/sheet.tsx"

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_home,node_programmes,node_tour,node_about,node_brand,node_siteblocks,node_footer toneBlue
class node_authpages,node_authshell,node_auth,node_wizard,node_questions,node_summary,node_pdf toneAmber
class node_dashboard,node_children,node_childform,node_attendance,node_fees,node_staff,node_reports,node_admin,node_notificationspage,node_notificationpanel toneMint
class node_access,node_store,node_seed,node_activity,node_audit,node_blocks,node_sheet toneRose
class node_visitor toneIndigo
```

## Components

### Public Website

- [Home and Marketing](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Programmes Fees](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/programmes/page.tsx): `src/app/programmes/page.tsx`
- [Tour Enquiry](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`
- [Preschool Approach](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/about/page.tsx): `src/app/about/page.tsx`
- [Brand Mark](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/BrandMark.tsx): `src/components/site/BrandMark.tsx`
- [Public Site Blocks](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/SiteBlocks.tsx): `src/components/site/SiteBlocks.tsx`
- [Site Footer](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/SiteFooter.tsx): `src/components/site/SiteFooter.tsx`

### Identity Onboarding

- [Sign In Sign Up](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Auth Screen Shell](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/site/AuthSplit.tsx): `src/components/site/AuthSplit.tsx`
- [Accounts and Sessions](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/auth.tsx): `src/lib/auth.tsx`
- [Role Onboarding](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/onboarding/page.tsx): `src/app/onboarding/page.tsx`
- [Role Question Sets](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/onboarding-questions.ts): `src/lib/onboarding-questions.ts`
- [Onboarding Summary](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/OnboardingSummary.tsx): `src/components/lms/OnboardingSummary.tsx`
- [PDF Export](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/onboarding-pdf.ts): `src/lib/onboarding-pdf.ts`

### LMS Operations

- [Overview Dashboard](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Learner Records](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/children/page.tsx): `src/app/dashboard/children/page.tsx`
- [Learner Form](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/ChildForm.tsx): `src/components/lms/ChildForm.tsx`
- [Daily Attendance](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/attendance/page.tsx): `src/app/dashboard/attendance/page.tsx`
- [Fee Analytics](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/fees/page.tsx): `src/app/dashboard/fees/page.tsx`
- [Staff Directory](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/staff/page.tsx): `src/app/dashboard/staff/page.tsx`
- [Milestones Reports](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/reports/page.tsx): `src/app/dashboard/reports/page.tsx`
- [Admin Console](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/admin/page.tsx): `src/app/dashboard/admin/page.tsx`
- [Notifications Inbox](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/app/dashboard/notifications/page.tsx): `src/app/dashboard/notifications/page.tsx`
- [Notification Panel](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/NotificationsPanel.tsx): `src/components/lms/NotificationsPanel.tsx`

### Shared State Components

- [Role Data Scoping](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/lms-access.ts): `src/lib/lms-access.ts`
- [LMS Data Store](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/lms-store.tsx): `src/lib/lms-store.tsx`
- [Demo LMS Records](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/data/lms.ts): `src/data/lms.ts`
- [Activity Notifications](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/lib/activity.tsx): `src/lib/activity.tsx`
- [Audit Log View](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/AuditLog.tsx): `src/components/lms/AuditLog.tsx`
- [Dashboard UI Blocks](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/lms/LmsBlocks.tsx): `src/components/lms/LmsBlocks.tsx`
- [Sheet Primitive](https://github.com/harrymofoka/little-stars-creche-system/blob/main/src/components/ui/sheet.tsx): `src/components/ui/sheet.tsx`

### Other components

- **Family or Staff**

## Connections

- Family or Staff → Home and Marketing: visits
- Family or Staff → Sign In Sign Up: signs in
- Home and Marketing → Public Site Blocks: renders (evidence: `src/app/page.tsx`)
- Home and Marketing → Site Footer: renders (evidence: `src/app/page.tsx`)
- Home and Marketing → Programmes Fees: links to (evidence: `src/app/page.tsx`)
- Home and Marketing → Tour Enquiry: links to (evidence: `src/app/page.tsx`)
- Sign In Sign Up → Auth Screen Shell: renders (evidence: `src/app/login/page.tsx`)
- Sign In Sign Up → Accounts and Sessions: uses (evidence: `src/app/login/page.tsx`)
- Auth Screen Shell → Brand Mark: renders (evidence: `src/components/site/AuthSplit.tsx`)
- Accounts and Sessions → Role Onboarding: routes onboarding (evidence: `src/app/onboarding/page.tsx`)
- Role Onboarding → Role Question Sets: loads questions (evidence: `src/app/onboarding/page.tsx`)
- Role Onboarding → Accounts and Sessions: saves progress (evidence: `src/app/onboarding/page.tsx`)
- Role Onboarding → LMS Data Store: syncs records (evidence: `src/app/onboarding/page.tsx`)
- Onboarding Summary → PDF Export: generates export (evidence: `src/components/lms/OnboardingSummary.tsx`)
- Overview Dashboard → Role Data Scoping: reads scoped data (evidence: `src/app/dashboard/page.tsx`)
- Overview Dashboard → Onboarding Summary: renders (evidence: `src/app/dashboard/page.tsx`)
- Overview Dashboard → Notification Panel: renders (evidence: `src/app/dashboard/page.tsx`)
- Overview Dashboard → Audit Log View: renders (evidence: `src/app/dashboard/page.tsx`)
- Learner Records → Learner Form: renders (evidence: `src/app/dashboard/children/page.tsx`)
- Learner Records → Role Data Scoping: reads scoped data (evidence: `src/app/dashboard/children/page.tsx`)
- Daily Attendance → Role Data Scoping: reads scoped data (evidence: `src/app/dashboard/attendance/page.tsx`)
- Fee Analytics → Role Data Scoping: reads scoped data (evidence: `src/app/dashboard/fees/page.tsx`)
- Fee Analytics → LMS Data Store: updates invoices (evidence: `src/app/dashboard/fees/page.tsx`)
- Staff Directory → Role Data Scoping: reads scoped data (evidence: `src/app/dashboard/staff/page.tsx`)
- Notifications Inbox → Activity Notifications: uses feed (evidence: `src/app/dashboard/notifications/page.tsx`)
- Notification Panel → Activity Notifications: reads notifications (evidence: `src/components/lms/NotificationsPanel.tsx`)
- Audit Log View → Activity Notifications: reads audit entries (evidence: `src/components/lms/AuditLog.tsx`)
- Role Data Scoping → LMS Data Store: reads records (evidence: `src/lib/lms-access.ts`)
- Role Data Scoping → Accounts and Sessions: checks role (evidence: `src/lib/lms-access.ts`)
- LMS Data Store → Demo LMS Records: initializes from (evidence: `src/lib/lms-store.tsx`)
- Learner Records → Dashboard UI Blocks: uses UI blocks (evidence: `src/app/dashboard/children/page.tsx`)
- Daily Attendance → Dashboard UI Blocks: uses UI blocks (evidence: `src/app/dashboard/attendance/page.tsx`)
- Fee Analytics → Dashboard UI Blocks: uses UI blocks (evidence: `src/app/dashboard/fees/page.tsx`)
- Staff Directory → Dashboard UI Blocks: uses UI blocks (evidence: `src/app/dashboard/staff/page.tsx`)
- Role Onboarding → Accounts and Sessions: completes onboarding (evidence: `src/lib/auth.tsx`)
- Admin Console → LMS Data Store: manages schedules
- Milestones Reports → Role Data Scoping: reads scoped data
- Overview Dashboard → Dashboard UI Blocks: uses UI blocks (evidence: `src/app/dashboard/page.tsx`)
