# devpiyush27/uni-meet architecture

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

- Interactive diagram: https://gitdiagram.com/devpiyush27/uni-meet
- Repository: https://github.com/devpiyush27/uni-meet

## Overview

Uni-Meet is an India-first, verified 18+ college dating and connection app. The mobile experience covers consent and age checks, profile setup and liveness verification, discovery, Weekly Drop and Secret Crush interactions, matching and chat, notifications, and privacy and safety controls. Supabase Edge Functions provide the product APIs and shared policies; the admin portal supports moderation and web account deletion. The source excerpts show selected server-side calls, but not mobile API wiring or every endpoint implementation, so those connections are omitted or marked unverified.

Main entry points: [`supabase/functions/_shared/server.ts`](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/server.ts) (Server utilities), [`supabase/functions/safety-report/index.ts`](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/safety-report/index.ts) (Safety reporting), [`apps/mobile/src/app/onboarding`](https://github.com/devpiyush27/uni-meet/tree/phase-0/foundation/apps/mobile/src/app/onboarding) (Onboarding), [`supabase/functions/drop-generate/index.ts`](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/drop-generate/index.ts) (Drop generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_onboarding["Onboarding"]
  node_weekly_drop["Weekly Drop<br/>[index.tsx]"]
  node_discovery["Discovery and likes<br/>[index.tsx]"]
  node_crushes["Secret Crushes<br/>[index.tsx]"]
  node_matches["Matches<br/>[index.tsx]"]
  node_chat["Chat<br/>[&#91;matchId&#93;.tsx]"]
  node_notifications_ui["Notifications<br/>[index.tsx]"]
  node_safety_ui["Safety center<br/>[index.tsx]"]
  node_privacy_ui["Privacy controls<br/>[index.tsx]"]
end

subgraph group_product_api["Product APIs"]
  node_auth_api["OTP authentication<br/>[index.ts]"]
  node_profile_api["Profile and photos<br/>[index.ts]"]
  node_liveness_api["Liveness verification<br/>[index.ts]"]
  node_drop_api["Drop generation<br/>[index.ts]"]
  node_crush_api["Crush submission<br/>[index.ts]"]
  node_like_api["Likes<br/>[index.ts]"]
  node_match_api["Match listing<br/>[index.ts]"]
  node_chat_api["Chat APIs<br/>[index.ts]"]
  node_notification_api["Notification management<br/>[index.ts]"]
  node_safety_api["Safety reporting<br/>[index.ts]"]
  node_privacy_api["Privacy and deletion<br/>[index.ts]"]
  node_admin_api["Moderation console<br/>[index.ts]"]
  node_deletion_api["Web account deletion<br/>[index.ts]"]
end

subgraph group_shared["Shared services"]
  node_server["Server utilities<br/>[server.ts]"]
  node_interaction_guard["Interaction guard"]
  node_drop_scoring["Drop scoring<br/>[drop-scoring.ts]"]
  node_safety_policy["Safety policy<br/>[safety-policy.ts]"]
  node_moderation["Text moderation<br/>[text-moderation.ts]"]
  node_notifications["Notification dispatch<br/>[notifications.ts]"]
  node_admin_auth["Admin MFA auth<br/>[admin-auth.ts]"]
end

subgraph group_admin["Admin portal"]
  node_admin_portal["Portal server<br/>[server.ts]"]
  node_portal_pages["Portal pages<br/>[portal-html.ts]"]
  node_admin_client["Admin client<br/>[admin-client.ts]"]
end

node_student(("Student"))
node_database[("Supabase data")]

node_student -.->|"starts"| node_onboarding
node_onboarding -.->|"uses"| node_auth_api
node_onboarding -.->|"sets up"| node_profile_api
node_onboarding -.->|"verifies"| node_liveness_api
node_student -.->|"views"| node_weekly_drop
node_weekly_drop -.->|"requests"| node_drop_api
node_student -.->|"browses"| node_discovery
node_discovery -.->|"sends likes"| node_like_api
node_student -.->|"selects"| node_crushes
node_crushes -.->|"submits"| node_crush_api
node_student -.->|"checks"| node_matches
node_matches -.->|"lists"| node_match_api
node_student -.->|"messages"| node_chat
node_chat -.->|"sends"| node_chat_api
node_student -.->|"checks"| node_notifications_ui
node_notifications_ui -.->|"manages"| node_notification_api
node_student -.->|"manages safety"| node_safety_ui
node_safety_ui -.->|"reports"| node_safety_api
node_student -.->|"manages privacy"| node_privacy_ui
node_privacy_ui -.->|"requests"| node_privacy_api
node_drop_api -->|"uses"| node_server
node_drop_api -->|"scores candidates"| node_drop_scoring
node_drop_api -->|"dispatches"| node_notifications
node_crush_api -->|"authenticates"| node_server
node_crush_api -->|"checks interactions"| node_interaction_guard
node_crush_api -->|"dispatches"| node_notifications
node_safety_api -->|"authenticates"| node_server
node_safety_api -->|"evaluates outcome"| node_safety_policy
node_safety_api -->|"moderates evidence"| node_moderation
node_safety_api -->|"dispatches"| node_notifications
node_profile_api -->|"uses"| node_server
node_admin_portal -->|"validates config"| node_admin_client
node_admin_portal -->|"renders"| node_portal_pages
node_portal_pages -->|"calls"| node_admin_api
node_portal_pages -->|"calls"| node_deletion_api
node_admin_api -->|"requires MFA"| node_admin_auth
node_admin_auth -->|"authenticates"| node_server
node_admin_api -->|"dispatches"| node_notifications
node_server -->|"creates Supabase clients"| node_database
node_deletion_api -->|"deletes account data"| node_database

click node_onboarding "https://github.com/devpiyush27/uni-meet/tree/phase-0/foundation/apps/mobile/src/app/onboarding"
click node_weekly_drop "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/drop/index.tsx"
click node_discovery "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/index.tsx"
click node_crushes "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/crushes/index.tsx"
click node_matches "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/matches/index.tsx"
click node_chat "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/chat/%5BmatchId%5D.tsx"
click node_notifications_ui "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/notifications/index.tsx"
click node_safety_ui "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/safety/index.tsx"
click node_privacy_ui "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/privacy/index.tsx"
click node_auth_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/auth-verify-otp/index.ts"
click node_profile_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/profile-upsert/index.ts"
click node_liveness_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/verification-liveness/index.ts"
click node_drop_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/drop-generate/index.ts"
click node_crush_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/crush-submit/index.ts"
click node_like_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/like-send/index.ts"
click node_match_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/match-list/index.ts"
click node_chat_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/chat-send/index.ts"
click node_notification_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/notifications-manage/index.ts"
click node_safety_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/safety-report/index.ts"
click node_privacy_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/account-privacy/index.ts"
click node_server "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/server.ts"
click node_interaction_guard "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/interaction-guard.ts"
click node_drop_scoring "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/drop-scoring.ts"
click node_safety_policy "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/safety-policy.ts"
click node_moderation "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/text-moderation.ts"
click node_notifications "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/notifications.ts"
click node_admin_portal "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/admin/src/server.ts"
click node_portal_pages "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/admin/src/portal-html.ts"
click node_admin_client "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/admin/src/admin-client.ts"
click node_admin_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/admin-console/index.ts"
click node_admin_auth "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/admin-auth.ts"
click node_deletion_api "https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/account-delete-web/index.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_onboarding,node_weekly_drop,node_discovery,node_crushes,node_matches,node_chat,node_notifications_ui,node_safety_ui,node_privacy_ui toneBlue
class node_auth_api,node_profile_api,node_liveness_api,node_drop_api,node_crush_api,node_like_api,node_match_api,node_chat_api,node_notification_api,node_safety_api,node_privacy_api,node_admin_api,node_deletion_api,node_database toneAmber
class node_server,node_interaction_guard,node_drop_scoring,node_safety_policy,node_moderation,node_notifications,node_admin_auth toneMint
class node_admin_portal,node_portal_pages,node_admin_client toneRose
class node_student toneIndigo
```

## Components

### Mobile app

- [Onboarding](https://github.com/devpiyush27/uni-meet/tree/phase-0/foundation/apps/mobile/src/app/onboarding): `apps/mobile/src/app/onboarding`
- [Weekly Drop](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/drop/index.tsx): `apps/mobile/src/app/drop/index.tsx`
- [Discovery and likes](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/index.tsx): `apps/mobile/src/app/index.tsx`
- [Secret Crushes](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/crushes/index.tsx): `apps/mobile/src/app/crushes/index.tsx`
- [Matches](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/matches/index.tsx): `apps/mobile/src/app/matches/index.tsx`
- [Chat](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/chat/%5BmatchId%5D.tsx): `apps/mobile/src/app/chat/[matchId].tsx`
- [Notifications](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/notifications/index.tsx): `apps/mobile/src/app/notifications/index.tsx`
- [Safety center](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/safety/index.tsx): `apps/mobile/src/app/safety/index.tsx`
- [Privacy controls](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/mobile/src/app/privacy/index.tsx): `apps/mobile/src/app/privacy/index.tsx`

### Product APIs

- [OTP authentication](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/auth-verify-otp/index.ts): `supabase/functions/auth-verify-otp/index.ts`
- [Profile and photos](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/profile-upsert/index.ts): `supabase/functions/profile-upsert/index.ts`
- [Liveness verification](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/verification-liveness/index.ts): `supabase/functions/verification-liveness/index.ts`
- [Drop generation](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/drop-generate/index.ts): `supabase/functions/drop-generate/index.ts`
- [Crush submission](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/crush-submit/index.ts): `supabase/functions/crush-submit/index.ts`
- [Likes](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/like-send/index.ts): `supabase/functions/like-send/index.ts`
- [Match listing](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/match-list/index.ts): `supabase/functions/match-list/index.ts`
- [Chat APIs](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/chat-send/index.ts): `supabase/functions/chat-send/index.ts`
- [Notification management](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/notifications-manage/index.ts): `supabase/functions/notifications-manage/index.ts`
- [Safety reporting](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/safety-report/index.ts): `supabase/functions/safety-report/index.ts`
- [Privacy and deletion](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/account-privacy/index.ts): `supabase/functions/account-privacy/index.ts`
- [Moderation console](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/admin-console/index.ts): `supabase/functions/admin-console/index.ts`
- [Web account deletion](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/account-delete-web/index.ts): `supabase/functions/account-delete-web/index.ts`

### Shared services

- [Server utilities](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/server.ts): `supabase/functions/_shared/server.ts`
- [Interaction guard](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/interaction-guard.ts): `supabase/functions/_shared/interaction-guard.ts`
- [Drop scoring](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/drop-scoring.ts): `supabase/functions/_shared/drop-scoring.ts`
- [Safety policy](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/safety-policy.ts): `supabase/functions/_shared/safety-policy.ts`
- [Text moderation](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/text-moderation.ts): `supabase/functions/_shared/text-moderation.ts`
- [Notification dispatch](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/notifications.ts): `supabase/functions/_shared/notifications.ts`
- [Admin MFA auth](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/supabase/functions/_shared/admin-auth.ts): `supabase/functions/_shared/admin-auth.ts`

### Admin portal

- [Portal server](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/admin/src/server.ts): `apps/admin/src/server.ts`
- [Portal pages](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/admin/src/portal-html.ts): `apps/admin/src/portal-html.ts`
- [Admin client](https://github.com/devpiyush27/uni-meet/blob/phase-0/foundation/apps/admin/src/admin-client.ts): `apps/admin/src/admin-client.ts`

### Other components

- **Student**
- **Supabase data**

## Connections

- Student → Onboarding: starts
- Onboarding → OTP authentication: uses
- Onboarding → Profile and photos: sets up
- Onboarding → Liveness verification: verifies
- Student → Weekly Drop: views
- Weekly Drop → Drop generation: requests
- Student → Discovery and likes: browses
- Discovery and likes → Likes: sends likes
- Student → Secret Crushes: selects
- Secret Crushes → Crush submission: submits
- Student → Matches: checks
- Matches → Match listing: lists
- Student → Chat: messages
- Chat → Chat APIs: sends
- Student → Notifications: checks
- Notifications → Notification management: manages
- Student → Safety center: manages safety
- Safety center → Safety reporting: reports
- Student → Privacy controls: manages privacy
- Privacy controls → Privacy and deletion: requests
- Drop generation → Server utilities: uses (evidence: `supabase/functions/drop-generate/index.ts`)
- Drop generation → Drop scoring: scores candidates (evidence: `supabase/functions/drop-generate/index.ts`)
- Drop generation → Notification dispatch: dispatches (evidence: `supabase/functions/drop-generate/index.ts`)
- Crush submission → Server utilities: authenticates (evidence: `supabase/functions/crush-submit/index.ts`)
- Crush submission → Interaction guard: checks interactions (evidence: `supabase/functions/crush-submit/index.ts`)
- Crush submission → Notification dispatch: dispatches (evidence: `supabase/functions/crush-submit/index.ts`)
- Safety reporting → Server utilities: authenticates (evidence: `supabase/functions/safety-report/index.ts`)
- Safety reporting → Safety policy: evaluates outcome (evidence: `supabase/functions/safety-report/index.ts`)
- Safety reporting → Text moderation: moderates evidence (evidence: `supabase/functions/safety-report/index.ts`)
- Safety reporting → Notification dispatch: dispatches (evidence: `supabase/functions/safety-report/index.ts`)
- Profile and photos → Server utilities: uses (evidence: `supabase/functions/profile-upsert/index.ts`)
- Portal server → Admin client: validates config (evidence: `apps/admin/src/server.ts`)
- Portal server → Portal pages: renders (evidence: `apps/admin/src/server.ts`)
- Portal pages → Moderation console: calls (evidence: `apps/admin/src/portal-html.ts`)
- Portal pages → Web account deletion: calls (evidence: `apps/admin/src/portal-html.ts`)
- Moderation console → Admin MFA auth: requires MFA (evidence: `supabase/functions/admin-console/index.ts`)
- Admin MFA auth → Server utilities: authenticates (evidence: `supabase/functions/_shared/admin-auth.ts`)
- Moderation console → Notification dispatch: dispatches (evidence: `supabase/functions/admin-console/index.ts`)
- Server utilities → Supabase data: creates Supabase clients (evidence: `supabase/functions/_shared/server.ts`)
- Web account deletion → Supabase data: deletes account data (evidence: `supabase/functions/account-delete-web/index.ts`)
