# bgsdigitalhealth-ux/acu-digiverse architecture

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

- Interactive diagram: https://gitdiagram.com/bgsdigitalhealth-ux/acu-digiverse
- Repository: https://github.com/bgsdigitalhealth-ux/acu-digiverse

## Overview

ACU DigiVerse is a university platform for event workflows, institutional reporting, and academic tasks, split between a React application and a Node API. Users enter through authenticated routes and work with events, resources, accounts, and reporting; the backend also runs report reminders and email delivery. The README documents the broad product scope, while sampled server code confirms reminder and email paths. Most feature functions and UI routes were not excerpted, so their connections are shown as unverified rather than asserted.

Main entry points: [`Backend/src/server.ts`](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/server.ts) (Backend API), [`Backend/src/emails/send-email.ts`](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/emails/send-email.ts) (Email dispatcher), [`Frontend/src/routes/_authenticated/route.tsx`](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/routes/_authenticated/route.tsx) (Authenticated gate), [`Backend/src/services/report-reminders.server.ts`](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/services/report-reminders.server.ts) (Report reminders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_router["App router<br/>[router.tsx]"]
  node_authroute["Authenticated gate<br/>[route.tsx]"]
  node_dashboard["Platform views"]
  node_calendar["Event calendars<br/>[EventCalendar.tsx]"]
  node_resourcesui["Event resources UI"]
end

subgraph group_events["Event workflows"]
  node_eventworkflow["Event approvals"]
  node_eventpolicy["Approval policy"]
  node_eventresources["Event resources"]
  node_eventphotos["Event photos"]
end

subgraph group_reporting["Reporting and AI"]
  node_article["AI event articles"]
  node_reportarticle["AI report articles"]
  node_reports["Report reminders"]
end

subgraph group_identity["Identity and accounts"]
  node_account["User management<br/>[users.functions.ts]"]
  node_assignment["Account assignment"]
  node_bootstrap["Admin bootstrap"]
  node_auth["Supabase auth<br/>[client.ts]"]
end

subgraph group_backend["Backend services"]
  node_reminderjob["Reminder job route<br/>[report-reminder.ts]"]
  node_dbclient["Admin DB client<br/>[client.server.ts]"]
  node_database[("Postgres data<br/>[schema.ts]")]
  node_api["Backend API<br/>[server.ts]"]
  node_emaildispatch["Email dispatcher<br/>[send-email.ts]"]
  node_emailregistry["Email templates<br/>[registry.ts]"]
end

node_user(("University user"))
node_emailprovider["Resend provider"]

node_user -->|"opens app"| node_router
node_router -->|"routes through"| node_authroute
node_authroute -->|"checks session"| node_auth
node_authroute -.->|"permits views"| node_dashboard
node_dashboard -.->|"renders"| node_calendar
node_dashboard -.->|"requests workflow"| node_eventworkflow
node_dashboard -.->|"requests article"| node_article
node_resourcesui -.->|"loads resources"| node_eventresources
node_eventworkflow -.->|"applies policy"| node_eventpolicy
node_dashboard -.->|"manages photos"| node_eventphotos
node_dashboard -.->|"requests report article"| node_reportarticle
node_user -.->|"manages accounts"| node_account
node_account -.->|"assigns users"| node_assignment
node_user -.->|"initializes admin"| node_bootstrap
node_api -.->|"routes job"| node_reminderjob
node_api -->|"uses admin client"| node_dbclient
node_api -->|"runs reminder"| node_reports
node_reports -->|"reads scoped data"| node_dbclient
node_reports -->|"sends reminder"| node_emaildispatch
node_api -->|"dispatches email"| node_emaildispatch
node_emaildispatch -->|"selects template"| node_emailregistry
node_emaildispatch -->|"sends message"| node_emailprovider
node_dbclient -.->|"queries"| node_database

click node_router "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/router.tsx"
click node_authroute "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/routes/_authenticated/route.tsx"
click node_calendar "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/components/EventCalendar.tsx"
click node_resourcesui "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/routes/event-resources.%24eventId.tsx"
click node_eventworkflow "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/event-workflow.functions.ts"
click node_eventpolicy "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/policies/event-approval-policy.ts"
click node_eventresources "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/event-resources.functions.ts"
click node_eventphotos "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/event-photos.functions.ts"
click node_article "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/ai-article.functions.ts"
click node_reportarticle "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/ai-report-article.functions.ts"
click node_reports "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/services/report-reminders.server.ts"
click node_reminderjob "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/api/jobs/report-reminder.ts"
click node_account "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/users.functions.ts"
click node_assignment "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/services/account-assignment.server.ts"
click node_bootstrap "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/bootstrap-admin.functions.ts"
click node_auth "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/integrations/supabase/client.ts"
click node_dbclient "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/integrations/supabase/client.server.ts"
click node_database "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/drizzle/schema.ts"
click node_api "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/server.ts"
click node_emaildispatch "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/emails/send-email.ts"
click node_emailregistry "https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/emails/registry.ts"

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_router,node_authroute,node_dashboard,node_calendar,node_resourcesui,node_user toneBlue
class node_eventworkflow,node_eventpolicy,node_eventresources,node_eventphotos toneAmber
class node_article,node_reportarticle,node_reports toneMint
class node_account,node_assignment,node_bootstrap,node_auth toneRose
class node_reminderjob,node_dbclient,node_database,node_api,node_emaildispatch,node_emailregistry,node_emailprovider toneIndigo
```

## Components

### Frontend experience

- [App router](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/router.tsx): `Frontend/src/router.tsx`
- [Authenticated gate](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/routes/_authenticated/route.tsx): `Frontend/src/routes/_authenticated/route.tsx`
- **Platform views**
- [Event calendars](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/components/EventCalendar.tsx): `Frontend/src/components/EventCalendar.tsx`
- [Event resources UI](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/routes/event-resources.%24eventId.tsx): `Frontend/src/routes/event-resources.$eventId.tsx`

### Event workflows

- [Event approvals](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/event-workflow.functions.ts): `Backend/src/functions/event-workflow.functions.ts`
- [Approval policy](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/policies/event-approval-policy.ts): `Backend/src/policies/event-approval-policy.ts`
- [Event resources](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/event-resources.functions.ts): `Backend/src/functions/event-resources.functions.ts`
- [Event photos](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/event-photos.functions.ts): `Backend/src/functions/event-photos.functions.ts`

### Reporting and AI

- [AI event articles](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/ai-article.functions.ts): `Backend/src/functions/ai-article.functions.ts`
- [AI report articles](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/ai-report-article.functions.ts): `Backend/src/functions/ai-report-article.functions.ts`
- [Report reminders](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/services/report-reminders.server.ts): `Backend/src/services/report-reminders.server.ts`

### Identity and accounts

- [User management](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/users.functions.ts): `Backend/src/functions/users.functions.ts`
- [Account assignment](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/services/account-assignment.server.ts): `Backend/src/services/account-assignment.server.ts`
- [Admin bootstrap](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/functions/bootstrap-admin.functions.ts): `Backend/src/functions/bootstrap-admin.functions.ts`
- [Supabase auth](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Frontend/src/integrations/supabase/client.ts): `Frontend/src/integrations/supabase/client.ts`

### Backend services

- [Reminder job route](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/api/jobs/report-reminder.ts): `Backend/src/api/jobs/report-reminder.ts`
- [Admin DB client](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/integrations/supabase/client.server.ts): `Backend/src/integrations/supabase/client.server.ts`
- [Postgres data](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/drizzle/schema.ts): `Backend/drizzle/schema.ts`
- [Backend API](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/server.ts): `Backend/src/server.ts`
- [Email dispatcher](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/emails/send-email.ts): `Backend/src/emails/send-email.ts`
- [Email templates](https://github.com/bgsdigitalhealth-ux/acu-digiverse/blob/main/Backend/src/emails/registry.ts): `Backend/src/emails/registry.ts`

### Other components

- **University user**
- **Resend provider**

## Connections

- University user → App router: opens app (evidence: `README.md`)
- App router → Authenticated gate: routes through (evidence: `Frontend/src/router.tsx`)
- Authenticated gate → Supabase auth: checks session (evidence: `Frontend/src/routes/_authenticated/route.tsx`)
- Authenticated gate → Platform views: permits views
- Platform views → Event calendars: renders
- Platform views → Event approvals: requests workflow
- Platform views → AI event articles: requests article
- Event resources UI → Event resources: loads resources
- Event approvals → Approval policy: applies policy
- Platform views → Event photos: manages photos
- Platform views → AI report articles: requests report article
- University user → User management: manages accounts
- User management → Account assignment: assigns users
- University user → Admin bootstrap: initializes admin
- Backend API → Reminder job route: routes job
- Backend API → Admin DB client: uses admin client (evidence: `Backend/src/server.ts`)
- Backend API → Report reminders: runs reminder (evidence: `Backend/src/server.ts`)
- Report reminders → Admin DB client: reads scoped data (evidence: `Backend/src/services/report-reminders.server.ts`)
- Report reminders → Email dispatcher: sends reminder (evidence: `Backend/src/services/report-reminders.server.ts`)
- Backend API → Email dispatcher: dispatches email (evidence: `Backend/src/server.ts`)
- Email dispatcher → Email templates: selects template (evidence: `Backend/src/emails/send-email.ts`)
- Email dispatcher → Resend provider: sends message (evidence: `Backend/src/emails/send-email.ts`)
- Admin DB client → Postgres data: queries
