# daygelo/mcmap architecture

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

- Interactive diagram: https://gitdiagram.com/daygelo/mcmap
- Repository: https://github.com/daygelo/mcmap

## Overview

McMap is a Flutter campus social and discovery app backed by Supabase, with an offline demo mode. Students authenticate with a McGill email, complete onboarding, then explore campus, find organizations and events, and manage follows and RSVPs. The README documents these capabilities and persistence; most Dart implementation files were not sampled, so undocumented internal call paths are omitted. Organizer verification is shown directly in source, including its email-provider integration.

Main entry points: [`lib/main.dart`](https://github.com/daygelo/mcmap/blob/main/lib/main.dart) (App and AuthGate), [`lib/pages/onboarding_page.dart`](https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding_page.dart) (Profile onboarding), [`lib/pages/map_page.dart`](https://github.com/daygelo/mcmap/blob/main/lib/pages/map_page.dart) (Campus map), [`lib/pages/student/club_discovery.dart`](https://github.com/daygelo/mcmap/blob/main/lib/pages/student/club_discovery.dart) (Club discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry and identity"]
  node_main["App and AuthGate<br/>[main.dart]"]
  node_login["McGill sign-in<br/>[login_page.dart]"]
  node_onboarding["Profile onboarding"]
  node_academic["Academic details"]
  node_interests["Interests"]
  node_profile["Student profile"]
end

subgraph group_discover["Campus discovery"]
  node_map["Campus map<br/>[map_page.dart]"]
  node_buildingdata["Buildings and shapes"]
  node_mapdata["Map configuration<br/>[campus_map.dart]"]
  node_sightline["Sight-line logic<br/>[sight_line.dart]"]
end

subgraph group_social["Organizations and events"]
  node_clubpicker["Follow picker"]
  node_clubs["Club discovery"]
  node_catalog["Club catalog"]
  node_events["Event browsing"]
  node_eventdetails["Event details"]
  node_createevent["Event creation"]
  node_rsvp["RSVP decisions<br/>[local_rsvps.dart]"]
  node_notifications["Event updates inbox"]
end

subgraph group_platform["Backend services"]
  node_backend["Backend abstraction<br/>[mcmap_backend.dart]"]
  node_supabasebackend["Supabase backend"]
  node_database[("Supabase data")]
  node_verification["Organizer verification<br/>[handler.ts]"]
  node_functionentry["Verification endpoint<br/>[index.ts]"]
  node_email["Verification email sender<br/>[resend.ts]"]
end

node_student(("Student"))
node_resend["Resend email service"]

node_student -->|"signs in"| node_login
node_login -->|"authenticates into"| node_main
node_main -->|"routes new accounts"| node_onboarding
node_main -->|"routes completed accounts"| node_profile
node_onboarding -->|"collects"| node_academic
node_onboarding -->|"collects"| node_interests
node_onboarding -->|"offers follows"| node_clubpicker
node_student -.->|"explores campus"| node_map
node_map -->|"shows building details"| node_buildingdata
node_map -->|"uses map settings"| node_mapdata
node_map -->|"checks visibility"| node_sightline
node_student -.->|"discovers clubs"| node_clubs
node_clubs -->|"searches catalog"| node_catalog
node_student -.->|"browses events"| node_events
node_events -.->|"opens details"| node_eventdetails
node_student -.->|"creates events"| node_createevent
node_eventdetails -.->|"shares RSVP decisions"| node_rsvp
node_clubs -.->|"shares RSVP decisions"| node_rsvp
node_notifications -->|"lists event updates"| node_events
node_main -.->|"uses backend"| node_backend
node_backend -.->|"delegates"| node_supabasebackend
node_supabasebackend -->|"persists app data"| node_database
node_functionentry -->|"routes requests"| node_verification
node_functionentry -->|"configures sender"| node_email
node_verification -->|"calls verification RPCs"| node_database
node_verification -->|"sends code"| node_email
node_email -->|"delivers email"| node_resend

click node_main "https://github.com/daygelo/mcmap/blob/main/lib/main.dart"
click node_login "https://github.com/daygelo/mcmap/blob/main/lib/pages/login_page.dart"
click node_onboarding "https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding_page.dart"
click node_academic "https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding/academic_info_page.dart"
click node_interests "https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding/interests_page.dart"
click node_clubpicker "https://github.com/daygelo/mcmap/blob/main/lib/pages/club_picker_page.dart"
click node_profile "https://github.com/daygelo/mcmap/blob/main/lib/pages/student/student_profile.dart"
click node_map "https://github.com/daygelo/mcmap/blob/main/lib/pages/map_page.dart"
click node_buildingdata "https://github.com/daygelo/mcmap/blob/main/lib/data/campus_buildings.dart"
click node_mapdata "https://github.com/daygelo/mcmap/blob/main/lib/data/campus_map.dart"
click node_sightline "https://github.com/daygelo/mcmap/blob/main/lib/data/sight_line.dart"
click node_clubs "https://github.com/daygelo/mcmap/blob/main/lib/pages/student/club_discovery.dart"
click node_catalog "https://github.com/daygelo/mcmap/blob/main/lib/data/club_catalog_data.dart"
click node_events "https://github.com/daygelo/mcmap/blob/main/lib/pages/all_events_page.dart"
click node_eventdetails "https://github.com/daygelo/mcmap/blob/main/lib/pages/event_details_page.dart"
click node_createevent "https://github.com/daygelo/mcmap/blob/main/lib/pages/create_event_page.dart"
click node_rsvp "https://github.com/daygelo/mcmap/blob/main/lib/services/local_rsvps.dart"
click node_notifications "https://github.com/daygelo/mcmap/blob/main/lib/services/notification_center.dart"
click node_backend "https://github.com/daygelo/mcmap/blob/main/lib/backend/mcmap_backend.dart"
click node_supabasebackend "https://github.com/daygelo/mcmap/blob/main/lib/backend/supabase_backend.dart"
click node_database "https://github.com/daygelo/mcmap/tree/main/supabase/migrations"
click node_verification "https://github.com/daygelo/mcmap/blob/main/supabase/functions/organizer-verification/handler.ts"
click node_functionentry "https://github.com/daygelo/mcmap/blob/main/supabase/functions/organizer-verification/index.ts"
click node_email "https://github.com/daygelo/mcmap/blob/main/supabase/functions/organizer-verification/resend.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_main,node_login,node_onboarding,node_academic,node_interests,node_profile toneBlue
class node_map,node_buildingdata,node_mapdata,node_sightline toneAmber
class node_clubpicker,node_clubs,node_catalog,node_events,node_eventdetails,node_createevent,node_rsvp,node_notifications toneMint
class node_backend,node_supabasebackend,node_database,node_verification,node_functionentry,node_email toneRose
class node_student,node_resend toneIndigo
```

## Components

### App entry and identity

- [App and AuthGate](https://github.com/daygelo/mcmap/blob/main/lib/main.dart): `lib/main.dart`
- [McGill sign-in](https://github.com/daygelo/mcmap/blob/main/lib/pages/login_page.dart): `lib/pages/login_page.dart`
- [Profile onboarding](https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding_page.dart): `lib/pages/onboarding_page.dart`
- [Academic details](https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding/academic_info_page.dart): `lib/pages/onboarding/academic_info_page.dart`
- [Interests](https://github.com/daygelo/mcmap/blob/main/lib/pages/onboarding/interests_page.dart): `lib/pages/onboarding/interests_page.dart`
- [Student profile](https://github.com/daygelo/mcmap/blob/main/lib/pages/student/student_profile.dart): `lib/pages/student/student_profile.dart`

### Campus discovery

- [Campus map](https://github.com/daygelo/mcmap/blob/main/lib/pages/map_page.dart): `lib/pages/map_page.dart`
- [Buildings and shapes](https://github.com/daygelo/mcmap/blob/main/lib/data/campus_buildings.dart): `lib/data/campus_buildings.dart`
- [Map configuration](https://github.com/daygelo/mcmap/blob/main/lib/data/campus_map.dart): `lib/data/campus_map.dart`
- [Sight-line logic](https://github.com/daygelo/mcmap/blob/main/lib/data/sight_line.dart): `lib/data/sight_line.dart`

### Organizations and events

- [Follow picker](https://github.com/daygelo/mcmap/blob/main/lib/pages/club_picker_page.dart): `lib/pages/club_picker_page.dart`
- [Club discovery](https://github.com/daygelo/mcmap/blob/main/lib/pages/student/club_discovery.dart): `lib/pages/student/club_discovery.dart`
- [Club catalog](https://github.com/daygelo/mcmap/blob/main/lib/data/club_catalog_data.dart): `lib/data/club_catalog_data.dart`
- [Event browsing](https://github.com/daygelo/mcmap/blob/main/lib/pages/all_events_page.dart): `lib/pages/all_events_page.dart`
- [Event details](https://github.com/daygelo/mcmap/blob/main/lib/pages/event_details_page.dart): `lib/pages/event_details_page.dart`
- [Event creation](https://github.com/daygelo/mcmap/blob/main/lib/pages/create_event_page.dart): `lib/pages/create_event_page.dart`
- [RSVP decisions](https://github.com/daygelo/mcmap/blob/main/lib/services/local_rsvps.dart): `lib/services/local_rsvps.dart`
- [Event updates inbox](https://github.com/daygelo/mcmap/blob/main/lib/services/notification_center.dart): `lib/services/notification_center.dart`

### Backend services

- [Backend abstraction](https://github.com/daygelo/mcmap/blob/main/lib/backend/mcmap_backend.dart): `lib/backend/mcmap_backend.dart`
- [Supabase backend](https://github.com/daygelo/mcmap/blob/main/lib/backend/supabase_backend.dart): `lib/backend/supabase_backend.dart`
- [Supabase data](https://github.com/daygelo/mcmap/tree/main/supabase/migrations): `supabase/migrations`
- [Organizer verification](https://github.com/daygelo/mcmap/blob/main/supabase/functions/organizer-verification/handler.ts): `supabase/functions/organizer-verification/handler.ts`
- [Verification endpoint](https://github.com/daygelo/mcmap/blob/main/supabase/functions/organizer-verification/index.ts): `supabase/functions/organizer-verification/index.ts`
- [Verification email sender](https://github.com/daygelo/mcmap/blob/main/supabase/functions/organizer-verification/resend.ts): `supabase/functions/organizer-verification/resend.ts`

### Other components

- **Student**
- **Resend email service**

## Connections

- Student → McGill sign-in: signs in (evidence: `README.md`)
- McGill sign-in → App and AuthGate: authenticates into (evidence: `README.md`)
- App and AuthGate → Profile onboarding: routes new accounts (evidence: `README.md`)
- App and AuthGate → Student profile: routes completed accounts (evidence: `README.md`)
- Profile onboarding → Academic details: collects (evidence: `README.md`)
- Profile onboarding → Interests: collects (evidence: `README.md`)
- Profile onboarding → Follow picker: offers follows (evidence: `README.md`)
- Student → Campus map: explores campus (evidence: `README.md`)
- Campus map → Buildings and shapes: shows building details (evidence: `README.md`)
- Campus map → Map configuration: uses map settings (evidence: `README.md`)
- Campus map → Sight-line logic: checks visibility (evidence: `README.md`)
- Student → Club discovery: discovers clubs (evidence: `README.md`)
- Club discovery → Club catalog: searches catalog (evidence: `README.md`)
- Student → Event browsing: browses events (evidence: `README.md`)
- Event browsing → Event details: opens details
- Student → Event creation: creates events (evidence: `README.md`)
- Event details → RSVP decisions: shares RSVP decisions (evidence: `README.md`)
- Club discovery → RSVP decisions: shares RSVP decisions (evidence: `README.md`)
- Event updates inbox → Event browsing: lists event updates (evidence: `README.md`)
- App and AuthGate → Backend abstraction: uses backend
- Backend abstraction → Supabase backend: delegates
- Supabase backend → Supabase data: persists app data (evidence: `README.md`)
- Verification endpoint → Organizer verification: routes requests (evidence: `supabase/functions/organizer-verification/index.ts`)
- Verification endpoint → Verification email sender: configures sender (evidence: `supabase/functions/organizer-verification/index.ts`)
- Organizer verification → Supabase data: calls verification RPCs (evidence: `supabase/functions/organizer-verification/handler.ts`)
- Organizer verification → Verification email sender: sends code (evidence: `supabase/functions/organizer-verification/handler.ts`)
- Verification email sender → Resend email service: delivers email (evidence: `supabase/functions/organizer-verification/resend.ts`)
