# ssyht/rydelapp-sourcecode architecture

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

- Interactive diagram: https://gitdiagram.com/ssyht/rydelapp-sourcecode
- Repository: https://github.com/ssyht/rydelapp-sourcecode

## Overview

Rydel is a verified-student carpool iOS app. Its main journey is account access, ride discovery or posting, seat requests and driver approval, then live ride coordination; messaging, notifications, and reporting support that journey. Checkout, events and movies, rewards, passes, and check-in are separate product areas visible in the source tree. The README documents the primary workflow and Supabase-backed behavior; several secondary modules were not sampled, so their internal connections are not inferred.

Main entry points: [`Rydel/SupabaseManager.swift`](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/SupabaseManager.swift) (Ride data access), [`Rydel/ContentView.swift`](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ContentView.swift) (App shell), [`Rydel/FindRideView.swift`](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/FindRideView.swift) (Ride discovery), [`Rydel/BookingRequestsView.swift`](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/BookingRequestsView.swift) (Seat requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and identity"]
  node_app_shell["App shell<br/>[ContentView.swift]"]
  node_auth["Authentication<br/>[AuthView.swift]"]
  node_security["Security controls"]
  node_dashboard["Dashboard"]
  node_events_movies["Events and movies<br/>[EventsView.swift]"]
end

subgraph group_rides["Ride lifecycle"]
  node_ride_post["Ride posting<br/>[PostRideView.swift]"]
  node_ride_discovery["Ride discovery<br/>[FindRideView.swift]"]
  node_ride_detail["Ride detail"]
  node_booking["Seat requests"]
  node_pass_checkin["Pass and check-in"]
end

subgraph group_coordination["Ride coordination"]
  node_active_ride["Live ride<br/>[LiveRideView.swift]"]
  node_ride_monitor["Ride monitoring<br/>[RideMonitor.swift]"]
  node_realtime["Realtime service"]
  node_messaging["Chat and messaging"]
  node_notifications["Push notifications"]
  node_reporting["User reporting"]
  node_mapkit["Apple Maps and location"]
end

subgraph group_commerce["Payments and benefits"]
  node_checkout["Ride checkout"]
  node_stripe_client["Stripe client"]
  node_rewards["Rewards"]
end

subgraph group_backend["Backend and services"]
  node_ride_data["Ride data access"]
  node_payment_functions["Payment functions<br/>[payment-http.ts]"]
  node_supabase[("Supabase backend")]
  node_stripe["Stripe"]
end

node_student(("Student user"))

node_student -->|"opens"| node_app_shell
node_app_shell -->|"routes to"| node_auth
node_app_shell -->|"routes to"| node_dashboard
node_student -->|"posts ride"| node_ride_post
node_student -->|"searches rides"| node_ride_discovery
node_ride_discovery -->|"opens"| node_ride_detail
node_ride_detail -->|"requests seat"| node_booking
node_ride_post -->|"saves ride"| node_ride_data
node_ride_discovery -->|"fetches rides"| node_ride_data
node_booking -->|"writes booking"| node_ride_data
node_auth -->|"validates access"| node_security
node_ride_data -->|"reads and writes"| node_supabase
node_active_ride -->|"renders live map"| node_mapkit
node_active_ride -->|"broadcasts location"| node_realtime
node_realtime -->|"uses channels"| node_supabase
node_ride_monitor -->|"monitors updates"| node_supabase
node_messaging -->|"stores and syncs"| node_supabase
node_booking -->|"triggers confirmation"| node_notifications
node_notifications -->|"notifies"| node_student
node_reporting -->|"writes reports"| node_supabase
node_checkout -.->|"starts payment"| node_stripe_client
node_stripe_client -->|"invokes"| node_payment_functions
node_payment_functions -.->|"processes payments"| node_stripe
node_payment_functions -.->|"persists payment state"| node_supabase

click node_app_shell "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ContentView.swift"
click node_auth "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/AuthView.swift"
click node_security "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/SecurityManager.swift"
click node_dashboard "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/DashboardView.swift"
click node_ride_post "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/PostRideView.swift"
click node_ride_discovery "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/FindRideView.swift"
click node_ride_detail "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/RideDetailView.swift"
click node_booking "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/BookingRequestsView.swift"
click node_ride_data "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/SupabaseManager.swift"
click node_active_ride "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/LiveRideView.swift"
click node_ride_monitor "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/RideMonitor.swift"
click node_realtime "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ActiveRide/ActiveRideRealtimeService.swift"
click node_messaging "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/MessagingService.swift"
click node_notifications "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/NotificationManager.swift"
click node_reporting "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ReportUserView.swift"
click node_checkout "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/Checkout/RideCheckoutFlow.swift"
click node_stripe_client "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/StripeManager.swift"
click node_payment_functions "https://github.com/ssyht/rydelapp-sourcecode/blob/main/supabase/functions/_shared/payment-http.ts"
click node_events_movies "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/EventsView.swift"
click node_rewards "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/Rewards/RewardsService.swift"
click node_pass_checkin "https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/RideCheckIn/Services/CheckInService.swift"

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_auth,node_security,node_dashboard,node_events_movies,node_student toneBlue
class node_ride_post,node_ride_discovery,node_ride_detail,node_booking,node_pass_checkin toneAmber
class node_active_ride,node_ride_monitor,node_realtime,node_messaging,node_notifications,node_reporting,node_mapkit toneMint
class node_checkout,node_stripe_client,node_rewards toneRose
class node_ride_data,node_payment_functions,node_supabase,node_stripe toneIndigo
```

## Components

### App and identity

- [App shell](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ContentView.swift): `Rydel/ContentView.swift`
- [Authentication](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/AuthView.swift): `Rydel/AuthView.swift`
- [Security controls](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/SecurityManager.swift): `Rydel/SecurityManager.swift`
- [Dashboard](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/DashboardView.swift): `Rydel/DashboardView.swift`
- [Events and movies](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/EventsView.swift): `Rydel/EventsView.swift`

### Ride lifecycle

- [Ride posting](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/PostRideView.swift): `Rydel/PostRideView.swift`
- [Ride discovery](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/FindRideView.swift): `Rydel/FindRideView.swift`
- [Ride detail](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/RideDetailView.swift): `Rydel/RideDetailView.swift`
- [Seat requests](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/BookingRequestsView.swift): `Rydel/BookingRequestsView.swift`
- [Pass and check-in](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/RideCheckIn/Services/CheckInService.swift): `Rydel/RideCheckIn/Services/CheckInService.swift`

### Ride coordination

- [Live ride](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/LiveRideView.swift): `Rydel/LiveRideView.swift`
- [Ride monitoring](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/RideMonitor.swift): `Rydel/RideMonitor.swift`
- [Realtime service](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ActiveRide/ActiveRideRealtimeService.swift): `Rydel/ActiveRide/ActiveRideRealtimeService.swift`
- [Chat and messaging](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/MessagingService.swift): `Rydel/MessagingService.swift`
- [Push notifications](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/NotificationManager.swift): `Rydel/NotificationManager.swift`
- [User reporting](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/ReportUserView.swift): `Rydel/ReportUserView.swift`
- **Apple Maps and location**

### Payments and benefits

- [Ride checkout](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/Checkout/RideCheckoutFlow.swift): `Rydel/Checkout/RideCheckoutFlow.swift`
- [Stripe client](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/StripeManager.swift): `Rydel/StripeManager.swift`
- [Rewards](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/Rewards/RewardsService.swift): `Rydel/Rewards/RewardsService.swift`

### Backend and services

- [Ride data access](https://github.com/ssyht/rydelapp-sourcecode/blob/main/Rydel/SupabaseManager.swift): `Rydel/SupabaseManager.swift`
- [Payment functions](https://github.com/ssyht/rydelapp-sourcecode/blob/main/supabase/functions/_shared/payment-http.ts): `supabase/functions/_shared/payment-http.ts`
- **Supabase backend**
- **Stripe**

### Other components

- **Student user**

## Connections

- Student user → App shell: opens (evidence: `README.md`)
- App shell → Authentication: routes to (evidence: `README.md`)
- App shell → Dashboard: routes to (evidence: `README.md`)
- Student user → Ride posting: posts ride (evidence: `README.md`)
- Student user → Ride discovery: searches rides (evidence: `README.md`)
- Ride discovery → Ride detail: opens (evidence: `README.md`)
- Ride detail → Seat requests: requests seat (evidence: `README.md`)
- Ride posting → Ride data access: saves ride (evidence: `README.md`)
- Ride discovery → Ride data access: fetches rides (evidence: `README.md`)
- Seat requests → Ride data access: writes booking (evidence: `README.md`)
- Authentication → Security controls: validates access (evidence: `README.md`)
- Ride data access → Supabase backend: reads and writes (evidence: `README.md`)
- Live ride → Apple Maps and location: renders live map (evidence: `README.md`)
- Live ride → Realtime service: broadcasts location (evidence: `README.md`)
- Realtime service → Supabase backend: uses channels (evidence: `README.md`)
- Ride monitoring → Supabase backend: monitors updates (evidence: `README.md`)
- Chat and messaging → Supabase backend: stores and syncs (evidence: `README.md`)
- Seat requests → Push notifications: triggers confirmation (evidence: `README.md`)
- Push notifications → Student user: notifies (evidence: `README.md`)
- User reporting → Supabase backend: writes reports (evidence: `README.md`)
- Ride checkout → Stripe client: starts payment
- Stripe client → Payment functions: invokes (evidence: `Rydel/StripeManager.swift`)
- Payment functions → Stripe: processes payments
- Payment functions → Supabase backend: persists payment state
