# benjaminketteytagoe-alu/nauricare architecture

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

- Interactive diagram: https://gitdiagram.com/benjaminketteytagoe-alu/nauricare
- Repository: https://github.com/benjaminketteytagoe-alu/nauricare

## Overview

NauriCare is a women’s-health platform whose patient workflow spans account access, health and cycle tracking, appointment booking, provider consultation, records and prescriptions. Provider and admin workspaces support clinical operations and oversight; community, messaging, personalized articles, and symptom insights are additional product capabilities. The graph combines README-documented capabilities with sampled route-handler behavior. Many portal pages and subsystems were not sampled, so their internal calls are not inferred; dashed links mark optional integrations documented by the README.

Main entry points: [`apps/web/src/app/(patient)/dashboard`](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(patient)/dashboard) (Patient portal), [`apps/web/src/lib/prisma.ts`](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/prisma.ts) (PostgreSQL database), [`apps/web/src/app/(provider)/provider`](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(provider)/provider) (Provider portal), [`apps/web/src/app/api/appointments/route.ts`](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/appointments/route.ts) (Appointments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and identity"]
  node_auth["Authentication<br/>[route.ts]"]
  node_registration["Registration<br/>[route.ts]"]
end

subgraph group_patient["Patient health"]
  node_patient_portal["Patient portal"]
  node_cycle_tracking["Cycle tracking"]
  node_symptom_logging["Symptom insights<br/>[route.ts]"]
end

subgraph group_clinical["Clinical care"]
  node_provider_portal["Provider portal"]
  node_appointments["Appointments<br/>[route.ts]"]
  node_health_records["Health records<br/>[route.ts]"]
  node_prescriptions["Prescriptions"]
  node_messages["Direct messages"]
end

subgraph group_community["Community and guidance"]
  node_community_feed["Community feed"]
  node_personalization["Personalized guidance<br/>[route.ts]"]
  node_articles["Health articles"]
end

subgraph group_operations["Administration"]
  node_admin_portal["Admin console"]
  node_audit["Audit logging<br/>[audit.ts]"]
end

subgraph group_platform["Platform services"]
  node_database[("PostgreSQL database<br/>[prisma.ts]")]
  node_email["Transactional email<br/>[email.ts]"]
  node_object_storage[("S3 object storage<br/>[s3.ts]")]
  node_video["Jitsi video"]
  node_ai_service["Gemini AI"]
end

node_patient_actor(("Patient"))
node_provider_actor(("Provider"))
node_admin_actor(("Administrator"))

node_patient_actor -->|"signs in"| node_auth
node_provider_actor -->|"registers"| node_registration
node_patient_actor -->|"registers"| node_registration
node_patient_actor -->|"uses"| node_patient_portal
node_provider_actor -->|"uses"| node_provider_portal
node_admin_actor -->|"uses"| node_admin_portal
node_patient_portal -->|"tracks cycles"| node_cycle_tracking
node_patient_portal -->|"logs symptoms"| node_symptom_logging
node_patient_portal -->|"books care"| node_appointments
node_appointments -->|"reads and writes"| node_database
node_appointments -->|"sends notices"| node_email
node_appointments -.->|"creates meeting link"| node_video
node_provider_portal -->|"manages records"| node_health_records
node_health_records -->|"reads and writes"| node_database
node_provider_portal -->|"issues prescriptions"| node_prescriptions
node_patient_portal -->|"tracks prescriptions"| node_prescriptions
node_provider_portal -->|"messages patients"| node_messages
node_patient_portal -->|"messages providers"| node_messages
node_messages -->|"reads and writes"| node_database
node_patient_portal -->|"shares and discusses"| node_community_feed
node_patient_portal -->|"gets tailored guidance"| node_personalization
node_personalization -->|"reads and updates"| node_database
node_personalization -->|"surfaces articles"| node_articles
node_patient_portal -->|"reads"| node_articles
node_admin_portal -->|"reviews activity"| node_audit
node_admin_portal -->|"manages platform data"| node_database
node_registration -->|"creates account"| node_database
node_registration -->|"sends verification"| node_email
node_patient_portal -.->|"uploads directly"| node_object_storage
node_symptom_logging -->|"requests insight"| node_ai_service
node_symptom_logging -->|"stores symptom log"| node_database

click node_auth "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/auth/%5B...nextauth%5D/route.ts"
click node_registration "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/auth/register/route.ts"
click node_patient_portal "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(patient)/dashboard"
click node_cycle_tracking "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(patient)/dashboard/cycle"
click node_symptom_logging "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/symptoms/route.ts"
click node_provider_portal "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(provider)/provider"
click node_appointments "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/appointments/route.ts"
click node_health_records "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/records/route.ts"
click node_prescriptions "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/prescriptions"
click node_messages "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/messages"
click node_community_feed "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/community"
click node_personalization "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/personalization/route.ts"
click node_articles "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/articles"
click node_admin_portal "https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(admin)/admin"
click node_audit "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/audit.ts"
click node_database "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/prisma.ts"
click node_email "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/email.ts"
click node_object_storage "https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/s3.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_auth,node_registration toneBlue
class node_patient_portal,node_cycle_tracking,node_symptom_logging toneAmber
class node_provider_portal,node_appointments,node_health_records,node_prescriptions,node_messages toneMint
class node_community_feed,node_personalization,node_articles toneRose
class node_admin_portal,node_audit,node_patient_actor,node_provider_actor,node_admin_actor toneIndigo
class node_database,node_email,node_object_storage,node_video,node_ai_service toneTeal
```

## Components

### Access and identity

- [Authentication](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/auth/%5B...nextauth%5D/route.ts): `apps/web/src/app/api/auth/[...nextauth]/route.ts`
- [Registration](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/auth/register/route.ts): `apps/web/src/app/api/auth/register/route.ts`

### Patient health

- [Patient portal](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(patient)/dashboard): `apps/web/src/app/(patient)/dashboard`
- [Cycle tracking](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(patient)/dashboard/cycle): `apps/web/src/app/(patient)/dashboard/cycle`
- [Symptom insights](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/symptoms/route.ts): `apps/web/src/app/api/symptoms/route.ts`

### Clinical care

- [Provider portal](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(provider)/provider): `apps/web/src/app/(provider)/provider`
- [Appointments](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/appointments/route.ts): `apps/web/src/app/api/appointments/route.ts`
- [Health records](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/records/route.ts): `apps/web/src/app/api/records/route.ts`
- [Prescriptions](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/prescriptions): `apps/web/src/app/api/prescriptions`
- [Direct messages](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/messages): `apps/web/src/app/api/messages`

### Community and guidance

- [Community feed](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/community): `apps/web/src/app/api/community`
- [Personalized guidance](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/app/api/personalization/route.ts): `apps/web/src/app/api/personalization/route.ts`
- [Health articles](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/api/articles): `apps/web/src/app/api/articles`

### Administration

- [Admin console](https://github.com/benjaminketteytagoe-alu/nauricare/tree/develop/apps/web/src/app/(admin)/admin): `apps/web/src/app/(admin)/admin`
- [Audit logging](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/audit.ts): `apps/web/src/lib/audit.ts`

### Platform services

- [PostgreSQL database](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/prisma.ts): `apps/web/src/lib/prisma.ts`
- [Transactional email](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/email.ts): `apps/web/src/lib/email.ts`
- [S3 object storage](https://github.com/benjaminketteytagoe-alu/nauricare/blob/develop/apps/web/src/lib/s3.ts): `apps/web/src/lib/s3.ts`
- **Jitsi video**
- **Gemini AI**

### Other components

- **Patient**
- **Provider**
- **Administrator**

## Connections

- Patient → Authentication: signs in (evidence: `README.md`)
- Provider → Registration: registers (evidence: `README.md`)
- Patient → Registration: registers (evidence: `README.md`)
- Patient → Patient portal: uses (evidence: `README.md`)
- Provider → Provider portal: uses (evidence: `README.md`)
- Administrator → Admin console: uses (evidence: `README.md`)
- Patient portal → Cycle tracking: tracks cycles (evidence: `README.md`)
- Patient portal → Symptom insights: logs symptoms (evidence: `README.md`)
- Patient portal → Appointments: books care (evidence: `README.md`)
- Appointments → PostgreSQL database: reads and writes (evidence: `apps/web/src/app/api/appointments/route.ts`)
- Appointments → Transactional email: sends notices (evidence: `apps/web/src/app/api/appointments/route.ts`)
- Appointments → Jitsi video: creates meeting link (evidence: `README.md`)
- Provider portal → Health records: manages records (evidence: `README.md`)
- Health records → PostgreSQL database: reads and writes (evidence: `apps/web/src/app/api/records/route.ts`)
- Provider portal → Prescriptions: issues prescriptions (evidence: `README.md`)
- Patient portal → Prescriptions: tracks prescriptions (evidence: `README.md`)
- Provider portal → Direct messages: messages patients (evidence: `README.md`)
- Patient portal → Direct messages: messages providers (evidence: `README.md`)
- Direct messages → PostgreSQL database: reads and writes (evidence: `apps/web/src/app/api/messages/route.ts`)
- Patient portal → Community feed: shares and discusses (evidence: `README.md`)
- Patient portal → Personalized guidance: gets tailored guidance (evidence: `apps/web/src/app/api/personalization/route.ts`)
- Personalized guidance → PostgreSQL database: reads and updates (evidence: `apps/web/src/app/api/personalization/route.ts`)
- Personalized guidance → Health articles: surfaces articles (evidence: `apps/web/src/app/api/personalization/route.ts`)
- Patient portal → Health articles: reads (evidence: `README.md`)
- Admin console → Audit logging: reviews activity (evidence: `README.md`)
- Admin console → PostgreSQL database: manages platform data (evidence: `README.md`)
- Registration → PostgreSQL database: creates account (evidence: `apps/web/src/app/api/auth/register/route.ts`)
- Registration → Transactional email: sends verification (evidence: `apps/web/src/app/api/auth/register/route.ts`)
- Patient portal → S3 object storage: uploads directly (evidence: `README.md`)
- Symptom insights → Gemini AI: requests insight (evidence: `apps/web/src/app/api/symptoms/route.ts`)
- Symptom insights → PostgreSQL database: stores symptom log (evidence: `apps/web/src/app/api/symptoms/route.ts`)
