# atiliaa2343/c-otter architecture

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

- Interactive diagram: https://gitdiagram.com/atiliaa2343/c-otter
- Repository: https://github.com/atiliaa2343/c-otter

## Overview

CE-Otter is a Petersburg-area healthcare information and community mobile app. Residents browse campus information and health resources, use AI search, and access health forms/data; administrators have a separate authenticated content-management area. The graph shows the documented app shell and AI-search implementation, plus major README capabilities. Several screen and service implementations were not sampled, so their internal calls and some storage wiring are intentionally left unspecified.

Main entry points: [`app/index.tsx`](https://github.com/atiliaa2343/c-otter/blob/master/app/index.tsx) (App navigation), [`backend/index.js`](https://github.com/atiliaa2343/c-otter/blob/master/backend/index.js) (AI search API), [`app/admin/dashboard.tsx`](https://github.com/atiliaa2343/c-otter/blob/master/app/admin/dashboard.tsx) (Admin routes), [`services/health.ts`](https://github.com/atiliaa2343/c-otter/blob/master/services/health.ts) (Health service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Mobile experience"]
  node_app_shell["App navigation<br/>[index.tsx]"]
  node_home["Campus home<br/>[HomePage.tsx]"]
  node_research["Research<br/>[Research.tsx]"]
  node_community["Community<br/>[Community.tsx]"]
  node_faculty["Faculty directory<br/>[Faculty.tsx]"]
  node_contact["Contact and hours<br/>[Contact.tsx]"]
  node_coloring["Coloring book<br/>[ColoringPage.tsx]"]
end

subgraph group_health["Health services"]
  node_health_resources["Health resources<br/>[Health.tsx]"]
  node_questionnaire["Health questionnaire"]
  node_health_data_screen["Health data screens<br/>[health-data.tsx]"]
  node_health_export["Health export<br/>[health-export.tsx]"]
  node_health_service["Health service<br/>[health.ts]"]
  node_health_platforms["Health platforms"]
end

subgraph group_search["AI resource search"]
  node_ai_screen["AI search screen<br/>[aisearch.tsx]"]
  node_ai_client["AI search client<br/>[aiSearch.ts]"]
  node_ai_api["AI search API<br/>[index.js]"]
  node_openai["OpenAI APIs"]
end

subgraph group_admin["Admin access"]
  node_admin_routes["Admin routes<br/>[dashboard.tsx]"]
  node_admin_panel["Admin panel<br/>[AdminPanel.tsx]"]
  node_admin_auth["Admin authentication"]
  node_user_auth["User authentication<br/>[AuthContext.tsx]"]
end

subgraph group_data["Data and integrations"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase_store[("Supabase data")]
end

node_resident(("Resident"))
node_admin_user(("Administrator"))

node_resident -->|"opens"| node_app_shell
node_app_shell -->|"renders"| node_home
node_app_shell -->|"renders"| node_research
node_app_shell -->|"renders"| node_community
node_app_shell -->|"renders"| node_health_resources
node_app_shell -->|"renders"| node_faculty
node_app_shell -->|"renders"| node_contact
node_resident -->|"searches"| node_ai_screen
node_ai_screen -->|"calls"| node_ai_client
node_ai_client -->|"requests"| node_ai_api
node_ai_api -->|"embeds query"| node_openai
node_ai_api -->|"matches resources"| node_supabase_store
node_ai_api -->|"generates answer"| node_openai
node_resident -->|"uses"| node_coloring
node_resident -->|"completes"| node_questionnaire
node_resident -->|"views data"| node_health_data_screen
node_health_data_screen -->|"uses"| node_health_service
node_health_export -->|"exports via"| node_health_service
node_health_service -.->|"connects"| node_health_platforms
node_resident -->|"signs in"| node_user_auth
node_user_auth -->|"authenticates via"| node_supabase_client
node_admin_user -->|"manages content"| node_admin_routes
node_admin_routes -->|"renders"| node_admin_panel
node_admin_routes -->|"checks access"| node_admin_auth
node_admin_auth -->|"authenticates and checks role"| node_supabase_client
node_supabase_client -->|"queries"| node_supabase_store

click node_app_shell "https://github.com/atiliaa2343/c-otter/blob/master/app/index.tsx"
click node_home "https://github.com/atiliaa2343/c-otter/blob/master/components/HomePage.tsx"
click node_research "https://github.com/atiliaa2343/c-otter/blob/master/components/Research.tsx"
click node_community "https://github.com/atiliaa2343/c-otter/blob/master/components/Community.tsx"
click node_faculty "https://github.com/atiliaa2343/c-otter/blob/master/components/Faculty.tsx"
click node_contact "https://github.com/atiliaa2343/c-otter/blob/master/components/Contact.tsx"
click node_coloring "https://github.com/atiliaa2343/c-otter/blob/master/components/ColoringPage.tsx"
click node_health_resources "https://github.com/atiliaa2343/c-otter/blob/master/components/Health.tsx"
click node_questionnaire "https://github.com/atiliaa2343/c-otter/blob/master/components/HealthQuestionnaire.tsx"
click node_health_data_screen "https://github.com/atiliaa2343/c-otter/blob/master/app/health-data.tsx"
click node_health_export "https://github.com/atiliaa2343/c-otter/blob/master/app/health-export.tsx"
click node_health_service "https://github.com/atiliaa2343/c-otter/blob/master/services/health.ts"
click node_ai_screen "https://github.com/atiliaa2343/c-otter/blob/master/app/aisearch.tsx"
click node_ai_client "https://github.com/atiliaa2343/c-otter/blob/master/services/aiSearch.ts"
click node_ai_api "https://github.com/atiliaa2343/c-otter/blob/master/backend/index.js"
click node_admin_routes "https://github.com/atiliaa2343/c-otter/blob/master/app/admin/dashboard.tsx"
click node_admin_panel "https://github.com/atiliaa2343/c-otter/blob/master/components/AdminPanel.tsx"
click node_admin_auth "https://github.com/atiliaa2343/c-otter/blob/master/app/admin/context/AdminAuthContext.tsx"
click node_user_auth "https://github.com/atiliaa2343/c-otter/blob/master/app/sign-in/AuthContext.tsx"
click node_supabase_client "https://github.com/atiliaa2343/c-otter/blob/master/db/supabase.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_app_shell,node_home,node_research,node_community,node_faculty,node_contact,node_coloring toneBlue
class node_health_resources,node_questionnaire,node_health_data_screen,node_health_export,node_health_service,node_health_platforms toneAmber
class node_ai_screen,node_ai_client,node_ai_api,node_openai toneMint
class node_admin_routes,node_admin_panel,node_admin_auth,node_user_auth toneRose
class node_supabase_client,node_supabase_store,node_resident,node_admin_user toneIndigo
```

## Components

### Mobile experience

- [App navigation](https://github.com/atiliaa2343/c-otter/blob/master/app/index.tsx): `app/index.tsx`
- [Campus home](https://github.com/atiliaa2343/c-otter/blob/master/components/HomePage.tsx): `components/HomePage.tsx`
- [Research](https://github.com/atiliaa2343/c-otter/blob/master/components/Research.tsx): `components/Research.tsx`
- [Community](https://github.com/atiliaa2343/c-otter/blob/master/components/Community.tsx): `components/Community.tsx`
- [Faculty directory](https://github.com/atiliaa2343/c-otter/blob/master/components/Faculty.tsx): `components/Faculty.tsx`
- [Contact and hours](https://github.com/atiliaa2343/c-otter/blob/master/components/Contact.tsx): `components/Contact.tsx`
- [Coloring book](https://github.com/atiliaa2343/c-otter/blob/master/components/ColoringPage.tsx): `components/ColoringPage.tsx`

### Health services

- [Health resources](https://github.com/atiliaa2343/c-otter/blob/master/components/Health.tsx): `components/Health.tsx`
- [Health questionnaire](https://github.com/atiliaa2343/c-otter/blob/master/components/HealthQuestionnaire.tsx): `components/HealthQuestionnaire.tsx`
- [Health data screens](https://github.com/atiliaa2343/c-otter/blob/master/app/health-data.tsx): `app/health-data.tsx`
- [Health export](https://github.com/atiliaa2343/c-otter/blob/master/app/health-export.tsx): `app/health-export.tsx`
- [Health service](https://github.com/atiliaa2343/c-otter/blob/master/services/health.ts): `services/health.ts`
- **Health platforms**

### AI resource search

- [AI search screen](https://github.com/atiliaa2343/c-otter/blob/master/app/aisearch.tsx): `app/aisearch.tsx`
- [AI search client](https://github.com/atiliaa2343/c-otter/blob/master/services/aiSearch.ts): `services/aiSearch.ts`
- [AI search API](https://github.com/atiliaa2343/c-otter/blob/master/backend/index.js): `backend/index.js`
- **OpenAI APIs**

### Admin access

- [Admin routes](https://github.com/atiliaa2343/c-otter/blob/master/app/admin/dashboard.tsx): `app/admin/dashboard.tsx`
- [Admin panel](https://github.com/atiliaa2343/c-otter/blob/master/components/AdminPanel.tsx): `components/AdminPanel.tsx`
- [Admin authentication](https://github.com/atiliaa2343/c-otter/blob/master/app/admin/context/AdminAuthContext.tsx): `app/admin/context/AdminAuthContext.tsx`
- [User authentication](https://github.com/atiliaa2343/c-otter/blob/master/app/sign-in/AuthContext.tsx): `app/sign-in/AuthContext.tsx`

### Data and integrations

- [Supabase client](https://github.com/atiliaa2343/c-otter/blob/master/db/supabase.ts): `db/supabase.ts`
- **Supabase data**

### Other components

- **Resident**
- **Administrator**

## Connections

- Resident → App navigation: opens
- App navigation → Campus home: renders
- App navigation → Research: renders
- App navigation → Community: renders
- App navigation → Health resources: renders
- App navigation → Faculty directory: renders
- App navigation → Contact and hours: renders
- Resident → AI search screen: searches
- AI search screen → AI search client: calls
- AI search client → AI search API: requests
- AI search API → OpenAI APIs: embeds query
- AI search API → Supabase data: matches resources
- AI search API → OpenAI APIs: generates answer
- Resident → Coloring book: uses
- Resident → Health questionnaire: completes
- Resident → Health data screens: views data
- Health data screens → Health service: uses
- Health export → Health service: exports via
- Health service → Health platforms: connects
- Resident → User authentication: signs in
- User authentication → Supabase client: authenticates via
- Administrator → Admin routes: manages content
- Admin routes → Admin panel: renders
- Admin routes → Admin authentication: checks access
- Admin authentication → Supabase client: authenticates and checks role
- Supabase client → Supabase data: queries
