# skygod07/amityconnect architecture

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

- Interactive diagram: https://gitdiagram.com/skygod07/amityconnect
- Repository: https://github.com/skygod07/amityconnect

## Overview

AmityConnect is a campus community app for safety, mobility, errands, and student connections. The primary workflow is a student entering the dashboard, then using a feature area to post or find a ride or errand, or raise an SOS; faculty can respond to emergencies. The graph also preserves profiles, messaging, study groups, notifications, and gamification. README statements support the product capabilities; source-index references and excerpts support only the noted implementation links. The tree also contains an Android client, but its feature wiring was not inspected.

Main entry points: [`src/app/(dashboard)/rides/page.tsx`](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/rides/page.tsx) (Ride board), [`src/app/page.tsx`](https://github.com/skygod07/amityconnect/blob/main/src/app/page.tsx) (Campus dashboard), [`src/app/(dashboard)/profile/[userId]/page.tsx`](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/profile/%5BuserId%5D/page.tsx) (Member profiles), [`src/app/(dashboard)/study/page.tsx`](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/study/page.tsx) (Study groups)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_dashboard["Campus dashboard<br/>[page.tsx]"]
  node_ride_board["Ride board<br/>[page.tsx]"]
  node_ride_match["Route matching<br/>[matching.ts]"]
  node_ride_notify["Ride notifications<br/>[route.ts]"]
  node_errands["Errands marketplace<br/>[page.tsx]"]
end

subgraph group_safety["Emergency response"]
  node_sos["SOS controls<br/>[page.tsx]"]
  node_emergency_overlay["Responder overlay"]
  node_location_map["Location map<br/>[MapView.tsx]"]
end

subgraph group_community["Campus community"]
  node_people["People search<br/>[SearchPeople.tsx]"]
  node_profile["Member profiles<br/>[page.tsx]"]
  node_chat["Direct messaging<br/>[FloatingChat.tsx]"]
  node_study_groups["Study groups<br/>[page.tsx]"]
  node_faculty_tools["Faculty directory<br/>[page.tsx]"]
  node_badges["Badges and stats<br/>[ProfileBadges.tsx]"]
  node_activity["Activity tracking<br/>[activityTracker.ts]"]
end

subgraph group_platform["Identity and services"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
  node_firebase["Firebase client<br/>[firebase.ts]"]
  node_firestore[("Cloud Firestore")]
  node_firebase_auth["Firebase Auth"]
  node_notifications["Notification service<br/>[notifications.ts]"]
end

subgraph group_mobile["Android client"]
  node_mobile_nav["Android navigation<br/>[NavHost.kt]"]
  node_mobile_home["Android home<br/>[HomeScreen.kt]"]
  node_mobile_features["Android feature screens"]
end

node_student(("Student"))
node_faculty(("Faculty responder"))

node_student -->|"opens"| node_dashboard
node_dashboard -->|"links to"| node_ride_board
node_dashboard -->|"links to"| node_sos
node_student -->|"posts or finds"| node_ride_board
node_ride_board -->|"matches routes"| node_ride_match
node_ride_board -->|"reads and writes"| node_firestore
node_ride_board -.->|"notifies"| node_ride_notify
node_student -->|"requests help"| node_errands
node_student -->|"raises alert"| node_sos
node_sos -->|"shows location"| node_location_map
node_faculty -->|"responds to alert"| node_emergency_overlay
node_emergency_overlay -->|"reads and writes"| node_firestore
node_student -->|"searches members"| node_people
node_people -->|"reads profiles"| node_firestore
node_student -->|"views profile"| node_profile
node_profile -->|"reads and writes"| node_firestore
node_profile -->|"starts message"| node_chat
node_student -->|"joins or creates"| node_study_groups
node_study_groups -->|"streams and updates"| node_firestore
node_student -.->|"browses faculty"| node_faculty_tools
node_student -->|"views impact"| node_badges
node_activity -->|"tracks activity"| node_firestore
node_badges -.->|"reflects activity"| node_activity
node_auth -->|"uses auth client"| node_firebase
node_firebase -->|"initializes"| node_firebase_auth
node_firebase -->|"initializes"| node_firestore
node_study_groups -.->|"sends updates"| node_notifications
node_mobile_nav -.->|"routes to"| node_mobile_home
node_mobile_nav -.->|"routes to"| node_mobile_features

click node_dashboard "https://github.com/skygod07/amityconnect/blob/main/src/app/page.tsx"
click node_ride_board "https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/rides/page.tsx"
click node_ride_match "https://github.com/skygod07/amityconnect/blob/main/src/lib/matching.ts"
click node_ride_notify "https://github.com/skygod07/amityconnect/blob/main/src/app/api/rides/notify/route.ts"
click node_errands "https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/errands/page.tsx"
click node_sos "https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/sos/page.tsx"
click node_emergency_overlay "https://github.com/skygod07/amityconnect/blob/main/src/components/sos/EmergencyAlertOverlay.tsx"
click node_location_map "https://github.com/skygod07/amityconnect/blob/main/src/components/map/MapView.tsx"
click node_people "https://github.com/skygod07/amityconnect/blob/main/src/components/search/SearchPeople.tsx"
click node_profile "https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/profile/%5BuserId%5D/page.tsx"
click node_chat "https://github.com/skygod07/amityconnect/blob/main/src/components/chat/FloatingChat.tsx"
click node_study_groups "https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/study/page.tsx"
click node_faculty_tools "https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/faculty/page.tsx"
click node_badges "https://github.com/skygod07/amityconnect/blob/main/src/components/profile/ProfileBadges.tsx"
click node_activity "https://github.com/skygod07/amityconnect/blob/main/src/lib/activityTracker.ts"
click node_auth "https://github.com/skygod07/amityconnect/blob/main/src/context/AuthContext.tsx"
click node_firebase "https://github.com/skygod07/amityconnect/blob/main/src/lib/firebase.ts"
click node_notifications "https://github.com/skygod07/amityconnect/blob/main/src/lib/notifications.ts"
click node_mobile_nav "https://github.com/skygod07/amityconnect/blob/main/android/app/src/main/java/com/amityconnect/navigation/NavHost.kt"
click node_mobile_home "https://github.com/skygod07/amityconnect/blob/main/android/app/src/main/java/com/amityconnect/ui/home/HomeScreen.kt"
click node_mobile_features "https://github.com/skygod07/amityconnect/tree/main/android/app/src/main/java/com/amityconnect/ui"

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_dashboard,node_ride_board,node_ride_match,node_ride_notify,node_errands toneBlue
class node_sos,node_emergency_overlay,node_location_map toneAmber
class node_people,node_profile,node_chat,node_study_groups,node_faculty_tools,node_badges,node_activity toneMint
class node_auth,node_firebase,node_firestore,node_firebase_auth,node_notifications toneRose
class node_mobile_nav,node_mobile_home,node_mobile_features,node_student,node_faculty toneIndigo
```

## Components

### Web experience

- [Campus dashboard](https://github.com/skygod07/amityconnect/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Ride board](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/rides/page.tsx): `src/app/(dashboard)/rides/page.tsx`
- [Route matching](https://github.com/skygod07/amityconnect/blob/main/src/lib/matching.ts): `src/lib/matching.ts`
- [Ride notifications](https://github.com/skygod07/amityconnect/blob/main/src/app/api/rides/notify/route.ts): `src/app/api/rides/notify/route.ts`
- [Errands marketplace](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/errands/page.tsx): `src/app/(dashboard)/errands/page.tsx`

### Emergency response

- [SOS controls](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/sos/page.tsx): `src/app/(dashboard)/sos/page.tsx`
- [Responder overlay](https://github.com/skygod07/amityconnect/blob/main/src/components/sos/EmergencyAlertOverlay.tsx): `src/components/sos/EmergencyAlertOverlay.tsx`
- [Location map](https://github.com/skygod07/amityconnect/blob/main/src/components/map/MapView.tsx): `src/components/map/MapView.tsx`

### Campus community

- [People search](https://github.com/skygod07/amityconnect/blob/main/src/components/search/SearchPeople.tsx): `src/components/search/SearchPeople.tsx`
- [Member profiles](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/profile/%5BuserId%5D/page.tsx): `src/app/(dashboard)/profile/[userId]/page.tsx`
- [Direct messaging](https://github.com/skygod07/amityconnect/blob/main/src/components/chat/FloatingChat.tsx): `src/components/chat/FloatingChat.tsx`
- [Study groups](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/study/page.tsx): `src/app/(dashboard)/study/page.tsx`
- [Faculty directory](https://github.com/skygod07/amityconnect/blob/main/src/app/(dashboard)/faculty/page.tsx): `src/app/(dashboard)/faculty/page.tsx`
- [Badges and stats](https://github.com/skygod07/amityconnect/blob/main/src/components/profile/ProfileBadges.tsx): `src/components/profile/ProfileBadges.tsx`
- [Activity tracking](https://github.com/skygod07/amityconnect/blob/main/src/lib/activityTracker.ts): `src/lib/activityTracker.ts`

### Identity and services

- [Authentication state](https://github.com/skygod07/amityconnect/blob/main/src/context/AuthContext.tsx): `src/context/AuthContext.tsx`
- [Firebase client](https://github.com/skygod07/amityconnect/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- **Cloud Firestore**
- **Firebase Auth**
- [Notification service](https://github.com/skygod07/amityconnect/blob/main/src/lib/notifications.ts): `src/lib/notifications.ts`

### Android client

- [Android navigation](https://github.com/skygod07/amityconnect/blob/main/android/app/src/main/java/com/amityconnect/navigation/NavHost.kt): `android/app/src/main/java/com/amityconnect/navigation/NavHost.kt`
- [Android home](https://github.com/skygod07/amityconnect/blob/main/android/app/src/main/java/com/amityconnect/ui/home/HomeScreen.kt): `android/app/src/main/java/com/amityconnect/ui/home/HomeScreen.kt`
- [Android feature screens](https://github.com/skygod07/amityconnect/tree/main/android/app/src/main/java/com/amityconnect/ui): `android/app/src/main/java/com/amityconnect/ui`

### Other components

- **Student**
- **Faculty responder**

## Connections

- Student → Campus dashboard: opens (evidence: `README.md`)
- Campus dashboard → Ride board: links to (evidence: `src/app/page.tsx`)
- Campus dashboard → SOS controls: links to (evidence: `src/app/page.tsx`)
- Student → Ride board: posts or finds (evidence: `README.md`)
- Ride board → Route matching: matches routes (evidence: `README.md`)
- Ride board → Cloud Firestore: reads and writes (evidence: `src/app/(dashboard)/rides/page.tsx`)
- Ride board → Ride notifications: notifies
- Student → Errands marketplace: requests help (evidence: `README.md`)
- Student → SOS controls: raises alert (evidence: `README.md`)
- SOS controls → Location map: shows location (evidence: `src/app/(dashboard)/sos/page.tsx`)
- Faculty responder → Responder overlay: responds to alert (evidence: `README.md`)
- Responder overlay → Cloud Firestore: reads and writes
- Student → People search: searches members
- People search → Cloud Firestore: reads profiles (evidence: `src/components/search/SearchPeople.tsx`)
- Student → Member profiles: views profile
- Member profiles → Cloud Firestore: reads and writes (evidence: `src/app/(dashboard)/profile/[userId]/page.tsx`)
- Member profiles → Direct messaging: starts message (evidence: `src/app/(dashboard)/profile/[userId]/page.tsx`)
- Student → Study groups: joins or creates (evidence: `README.md`)
- Study groups → Cloud Firestore: streams and updates (evidence: `src/app/(dashboard)/study/page.tsx`)
- Student → Faculty directory: browses faculty
- Student → Badges and stats: views impact (evidence: `README.md`)
- Activity tracking → Cloud Firestore: tracks activity
- Badges and stats → Activity tracking: reflects activity
- Authentication state → Firebase client: uses auth client (evidence: `src/context/AuthContext.tsx`)
- Firebase client → Firebase Auth: initializes (evidence: `src/lib/firebase.ts`)
- Firebase client → Cloud Firestore: initializes (evidence: `src/lib/firebase.ts`)
- Study groups → Notification service: sends updates (evidence: `src/app/(dashboard)/study/page.tsx`)
- Android navigation → Android home: routes to
- Android navigation → Android feature screens: routes to
