# rammelz-v2/vocalink-mobile architecture

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

- Interactive diagram: https://gitdiagram.com/rammelz-v2/vocalink-mobile
- Repository: https://github.com/rammelz-v2/vocalink-mobile

## Overview

VocaLink Mobile is an Expo app for student and teacher communication support. Users enter through authentication, then role-aware tabs present student AAC, live captioning and home views, or teacher home and live-room views; both roles can access profile features. The AAC board can request next-symbol predictions and send requests, while the app also tracks activity and session presence. The excerpts show authentication persistence and selected API calls; connections for other documented-by-code but unsampled screens are omitted or marked unverified.

Main entry points: [`app/(tabs)/index.tsx`](https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/(tabs)/index.tsx) (Role-based tabs), [`contexts/AuthContext.tsx`](https://github.com/rammelz-v2/vocalink-mobile/blob/main/contexts/AuthContext.tsx) (Authentication state), [`components/screens/home.tsx`](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/home.tsx) (Student home), [`components/screens/board.tsx`](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/board.tsx) (AAC board)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_root["Root layout<br/>[_layout.tsx]"]
  node_tabs["Role-based tabs<br/>[index.tsx]"]
end

subgraph group_auth["Identity and profile"]
  node_authroutes["Auth routes<br/>[login.tsx]"]
  node_authstate["Authentication state<br/>[AuthContext.tsx]"]
  node_profileedit["Profile editing<br/>[edit-profile.tsx]"]
  node_profile["Profile screen<br/>[profile.tsx]"]
end

subgraph group_student["Student support"]
  node_studenthome["Student home<br/>[home.tsx]"]
  node_aac["AAC board<br/>[board.tsx]"]
  node_livecc["Student live captions<br/>[livecc.tsx]"]
  node_mockdata["AAC sample data<br/>[mockdata.ts]"]
end

subgraph group_teacher["Teacher tools"]
  node_teacherhome["Teacher home<br/>[teacher-home.tsx]"]
  node_teacherlive["Teacher live room<br/>[teacher-livecc.tsx]"]
end

subgraph group_shared["Shared services"]
  node_securestore[("Token storage<br/>[storage.ts]")]
  node_bottomnav["Role-aware navigation<br/>[BottomNav.tsx]"]
  node_header["Screen header<br/>[ScreenHeader.tsx]"]
  node_sharedui["Shared UI controls<br/>[shared.tsx]"]
  node_alerts["Cross-platform alerts<br/>[CrossAlert.tsx]"]
  node_tokens["Design tokens<br/>[tokens.ts]"]
  node_api["API base URL<br/>[api.ts]"]
end

node_user(("App user"))
node_backend{{"VocaLink API"}}

node_user -->|"opens app"| node_root
node_root -->|"routes unauthenticated"| node_authroutes
node_root -->|"provides auth"| node_authstate
node_user -->|"signs in or up"| node_authroutes
node_authroutes -->|"calls auth actions"| node_authstate
node_authstate -->|"persists token"| node_securestore
node_authstate -->|"uses endpoint base"| node_api
node_authstate -->|"auth and profile requests"| node_backend
node_authstate -->|"supplies user role"| node_tabs
node_user -->|"uses app tabs"| node_tabs
node_tabs -->|"renders student home"| node_studenthome
node_tabs -->|"renders board"| node_aac
node_tabs -->|"renders captions"| node_livecc
node_tabs -->|"renders teacher home"| node_teacherhome
node_tabs -->|"renders teacher room"| node_teacherlive
node_tabs -->|"renders profile"| node_profile
node_tabs -.->|"renders navigation"| node_bottomnav
node_tabs -->|"checks presence and sessions"| node_backend
node_studenthome -->|"fetches recent activity"| node_backend
node_aac -->|"requests predictions and sends requests"| node_backend
node_aac -->|"uses AAC symbols"| node_mockdata
node_profileedit -->|"updates profile"| node_authstate
node_studenthome -->|"renders for teacher role"| node_teacherhome
node_aac -->|"renders header"| node_header
node_studenthome -->|"renders header"| node_header
node_studenthome -->|"uses shared controls"| node_sharedui
node_bottomnav -->|"reads user role"| node_authstate
node_header -->|"uses design tokens"| node_tokens
node_sharedui -->|"uses design tokens"| node_tokens
node_authroutes -->|"uses alert provider"| node_alerts
node_livecc -.->|"uses API"| node_backend
node_teacherhome -.->|"uses API"| node_backend
node_teacherlive -.->|"uses API"| node_backend
node_profile -.->|"uses auth state"| node_authstate

click node_root "https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/_layout.tsx"
click node_authroutes "https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/(auth)/login.tsx"
click node_authstate "https://github.com/rammelz-v2/vocalink-mobile/blob/main/contexts/AuthContext.tsx"
click node_securestore "https://github.com/rammelz-v2/vocalink-mobile/blob/main/utils/storage.ts"
click node_profileedit "https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/edit-profile.tsx"
click node_tabs "https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/(tabs)/index.tsx"
click node_studenthome "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/home.tsx"
click node_aac "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/board.tsx"
click node_livecc "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/livecc.tsx"
click node_teacherhome "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/teacher-home.tsx"
click node_teacherlive "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/teacher-livecc.tsx"
click node_profile "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/profile.tsx"
click node_bottomnav "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/ui/BottomNav.tsx"
click node_header "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/ui/ScreenHeader.tsx"
click node_sharedui "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/ui/shared.tsx"
click node_alerts "https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/CrossAlert.tsx"
click node_tokens "https://github.com/rammelz-v2/vocalink-mobile/blob/main/constants/tokens.ts"
click node_mockdata "https://github.com/rammelz-v2/vocalink-mobile/blob/main/constants/mockdata.ts"
click node_api "https://github.com/rammelz-v2/vocalink-mobile/blob/main/constants/api.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_root,node_tabs,node_user toneBlue
class node_authroutes,node_authstate,node_profileedit,node_profile toneAmber
class node_studenthome,node_aac,node_livecc,node_mockdata,node_backend toneMint
class node_teacherhome,node_teacherlive toneRose
class node_securestore,node_bottomnav,node_header,node_sharedui,node_alerts,node_tokens,node_api toneIndigo
```

## Components

### App entry

- [Root layout](https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Role-based tabs](https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`

### Identity and profile

- [Auth routes](https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/(auth)/login.tsx): `app/(auth)/login.tsx`
- [Authentication state](https://github.com/rammelz-v2/vocalink-mobile/blob/main/contexts/AuthContext.tsx): `contexts/AuthContext.tsx`
- [Profile editing](https://github.com/rammelz-v2/vocalink-mobile/blob/main/app/edit-profile.tsx): `app/edit-profile.tsx`
- [Profile screen](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/profile.tsx): `components/screens/profile.tsx`

### Student support

- [Student home](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/home.tsx): `components/screens/home.tsx`
- [AAC board](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/board.tsx): `components/screens/board.tsx`
- [Student live captions](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/livecc.tsx): `components/screens/livecc.tsx`
- [AAC sample data](https://github.com/rammelz-v2/vocalink-mobile/blob/main/constants/mockdata.ts): `constants/mockdata.ts`

### Teacher tools

- [Teacher home](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/teacher-home.tsx): `components/screens/teacher-home.tsx`
- [Teacher live room](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/screens/teacher-livecc.tsx): `components/screens/teacher-livecc.tsx`

### Shared services

- [Token storage](https://github.com/rammelz-v2/vocalink-mobile/blob/main/utils/storage.ts): `utils/storage.ts`
- [Role-aware navigation](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/ui/BottomNav.tsx): `components/ui/BottomNav.tsx`
- [Screen header](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/ui/ScreenHeader.tsx): `components/ui/ScreenHeader.tsx`
- [Shared UI controls](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/ui/shared.tsx): `components/ui/shared.tsx`
- [Cross-platform alerts](https://github.com/rammelz-v2/vocalink-mobile/blob/main/components/CrossAlert.tsx): `components/CrossAlert.tsx`
- [Design tokens](https://github.com/rammelz-v2/vocalink-mobile/blob/main/constants/tokens.ts): `constants/tokens.ts`
- [API base URL](https://github.com/rammelz-v2/vocalink-mobile/blob/main/constants/api.ts): `constants/api.ts`

### Other components

- **App user**
- **VocaLink API**

## Connections

- App user → Root layout: opens app
- Root layout → Auth routes: routes unauthenticated (evidence: `app/_layout.tsx`)
- Root layout → Authentication state: provides auth (evidence: `app/_layout.tsx`)
- App user → Auth routes: signs in or up
- Auth routes → Authentication state: calls auth actions (evidence: `app/(auth)/login.tsx`)
- Authentication state → Token storage: persists token (evidence: `contexts/AuthContext.tsx`)
- Authentication state → API base URL: uses endpoint base (evidence: `contexts/AuthContext.tsx`)
- Authentication state → VocaLink API: auth and profile requests (evidence: `contexts/AuthContext.tsx`)
- Authentication state → Role-based tabs: supplies user role (evidence: `app/(tabs)/index.tsx`)
- App user → Role-based tabs: uses app tabs
- Role-based tabs → Student home: renders student home (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → AAC board: renders board (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → Student live captions: renders captions (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → Teacher home: renders teacher home (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → Teacher live room: renders teacher room (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → Profile screen: renders profile (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → Role-aware navigation: renders navigation (evidence: `app/(tabs)/index.tsx`)
- Role-based tabs → VocaLink API: checks presence and sessions (evidence: `app/(tabs)/index.tsx`)
- Student home → VocaLink API: fetches recent activity (evidence: `components/screens/home.tsx`)
- AAC board → VocaLink API: requests predictions and sends requests (evidence: `components/screens/board.tsx`)
- AAC board → AAC sample data: uses AAC symbols (evidence: `components/screens/board.tsx`)
- Profile editing → Authentication state: updates profile (evidence: `app/edit-profile.tsx`)
- Student home → Teacher home: renders for teacher role (evidence: `components/screens/home.tsx`)
- AAC board → Screen header: renders header (evidence: `components/screens/board.tsx`)
- Student home → Screen header: renders header (evidence: `components/screens/home.tsx`)
- Student home → Shared UI controls: uses shared controls (evidence: `components/screens/home.tsx`)
- Role-aware navigation → Authentication state: reads user role (evidence: `components/ui/BottomNav.tsx`)
- Screen header → Design tokens: uses design tokens (evidence: `components/ui/ScreenHeader.tsx`)
- Shared UI controls → Design tokens: uses design tokens (evidence: `components/ui/shared.tsx`)
- Auth routes → Cross-platform alerts: uses alert provider (evidence: `app/(auth)/login.tsx`)
- Student live captions → VocaLink API: uses API
- Teacher home → VocaLink API: uses API
- Teacher live room → VocaLink API: uses API
- Profile screen → Authentication state: uses auth state (evidence: `components/screens/profile.tsx`)
