# sreeharshithreddy/syncmate architecture

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

- Interactive diagram: https://gitdiagram.com/sreeharshithreddy/syncmate
- Repository: https://github.com/sreeharshithreddy/syncmate

## Overview

SyncMates is a social scheduling app for friend groups. Users sign in, then plan events through calendars or shared availability, invite friends, and manage follow-up tasks, reminders, and meeting notes. Reusable templates and an AI assistant support planning; notifications keep users informed. The graph combines explicit route wiring and sampled authentication/task code with README-documented capabilities. Several feature pages and hooks were not sampled, so their internal calls are not inferred; the Supabase database represents the documented backend.

Main entry points: [`src/App.tsx`](https://github.com/sreeharshithreddy/syncmate/blob/main/src/App.tsx) (Application Router), [`src/pages/CreateEvent.tsx`](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/CreateEvent.tsx) (Event Creation), [`src/pages/CalendarPage.tsx`](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/CalendarPage.tsx) (Calendar Views), [`src/pages/MyTasks.tsx`](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/MyTasks.tsx) (Task Management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app["Application Router<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_layout["App Layout<br/>[AppLayout.tsx]"]
  node_ui["UI Primitives"]
end

subgraph group_planning["Scheduling"]
  node_calendar["Calendar Views<br/>[CalendarPage.tsx]"]
  node_event_create["Event Creation<br/>[CreateEvent.tsx]"]
  node_availability["Free-Time Finder"]
  node_event_data["Event Data<br/>[useEvents.ts]"]
  node_categories["Event Categories<br/>[eventCategories.ts]"]
end

subgraph group_collaboration["Group Collaboration"]
  node_friends["Friends<br/>[Friends.tsx]"]
  node_meeting_notes["Meeting Minutes"]
  node_ai_assistant["AI Assistant"]
  node_templates["Event Templates<br/>[Templates.tsx]"]
end

subgraph group_productivity["Tasks and Support"]
  node_tasks["Task Management<br/>[MyTasks.tsx]"]
  node_task_data["Task Data"]
  node_notifications["Notifications<br/>[Notifications.tsx]"]
end

subgraph group_backend["Backend Services"]
  node_supabase["Supabase Client<br/>[supabase.ts]"]
  node_database[("Supabase Backend")]
  node_ai_function["AI Edge Function<br/>[index.ts]"]
  node_reminder_function["Reminder Function<br/>[index.ts]"]
  node_email_function["Email Function<br/>[index.ts]"]
  node_google_sync["Google Calendar Sync<br/>[index.ts]"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_calendar
node_app -->|"routes to"| node_event_create
node_app -->|"routes to"| node_availability
node_app -->|"routes to"| node_friends
node_app -->|"routes to"| node_tasks
node_app -->|"routes to"| node_notifications
node_app -->|"routes to"| node_templates
node_app -->|"wraps pages"| node_layout
node_layout -.->|"uses primitives"| node_ui
node_auth -->|"reads and updates auth"| node_supabase
node_supabase -->|"connects to"| node_database
node_calendar -.->|"shows events"| node_event_data
node_event_create -.->|"creates events"| node_event_data
node_event_create -->|"invites friends"| node_friends
node_availability -->|"schedules selected slot"| node_event_create
node_availability -->|"compares busy time"| node_friends
node_calendar -->|"colors events"| node_categories
node_tasks -->|"loads task items"| node_task_data
node_tasks -->|"invalidates task queries"| node_task_data
node_task_data -->|"reads task data"| node_supabase
node_meeting_notes -->|"creates action items"| node_tasks
node_ai_assistant -.->|"requests AI assistance"| node_ai_function
node_ai_function -.->|"runs as edge function"| node_supabase
node_templates -->|"prefills event form"| node_event_create
node_reminder_function -.->|"sends reminders"| node_notifications
node_email_function -.->|"sends email"| node_user
node_google_sync -.->|"syncs calendar events"| node_calendar

click node_app "https://github.com/sreeharshithreddy/syncmate/blob/main/src/App.tsx"
click node_auth "https://github.com/sreeharshithreddy/syncmate/blob/main/src/contexts/AuthContext.tsx"
click node_layout "https://github.com/sreeharshithreddy/syncmate/blob/main/src/components/layout/AppLayout.tsx"
click node_ui "https://github.com/sreeharshithreddy/syncmate/tree/main/src/components/ui"
click node_calendar "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/CalendarPage.tsx"
click node_event_create "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/CreateEvent.tsx"
click node_availability "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/AvailabilityFinder.tsx"
click node_event_data "https://github.com/sreeharshithreddy/syncmate/blob/main/src/hooks/useEvents.ts"
click node_categories "https://github.com/sreeharshithreddy/syncmate/blob/main/src/lib/eventCategories.ts"
click node_friends "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/Friends.tsx"
click node_meeting_notes "https://github.com/sreeharshithreddy/syncmate/blob/main/src/components/MeetingMinutesDialog.tsx"
click node_ai_assistant "https://github.com/sreeharshithreddy/syncmate/blob/main/src/components/AIEventAssistant.tsx"
click node_templates "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/Templates.tsx"
click node_tasks "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/MyTasks.tsx"
click node_task_data "https://github.com/sreeharshithreddy/syncmate/blob/main/src/hooks/useUserActionItems.ts"
click node_notifications "https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/Notifications.tsx"
click node_supabase "https://github.com/sreeharshithreddy/syncmate/blob/main/src/lib/supabase.ts"
click node_ai_function "https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/ai-event-assistant/index.ts"
click node_reminder_function "https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/send-event-reminders/index.ts"
click node_email_function "https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/send-transactional-email/index.ts"
click node_google_sync "https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/google-calendar-sync/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_app,node_auth,node_layout,node_ui,node_user toneBlue
class node_calendar,node_event_create,node_availability,node_event_data,node_categories toneAmber
class node_friends,node_meeting_notes,node_ai_assistant,node_templates toneMint
class node_tasks,node_task_data,node_notifications toneRose
class node_supabase,node_database,node_ai_function,node_reminder_function,node_email_function,node_google_sync toneIndigo
```

## Components

### App Shell

- [Application Router](https://github.com/sreeharshithreddy/syncmate/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/sreeharshithreddy/syncmate/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [App Layout](https://github.com/sreeharshithreddy/syncmate/blob/main/src/components/layout/AppLayout.tsx): `src/components/layout/AppLayout.tsx`
- [UI Primitives](https://github.com/sreeharshithreddy/syncmate/tree/main/src/components/ui): `src/components/ui`

### Scheduling

- [Calendar Views](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/CalendarPage.tsx): `src/pages/CalendarPage.tsx`
- [Event Creation](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/CreateEvent.tsx): `src/pages/CreateEvent.tsx`
- [Free-Time Finder](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/AvailabilityFinder.tsx): `src/pages/AvailabilityFinder.tsx`
- [Event Data](https://github.com/sreeharshithreddy/syncmate/blob/main/src/hooks/useEvents.ts): `src/hooks/useEvents.ts`
- [Event Categories](https://github.com/sreeharshithreddy/syncmate/blob/main/src/lib/eventCategories.ts): `src/lib/eventCategories.ts`

### Group Collaboration

- [Friends](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/Friends.tsx): `src/pages/Friends.tsx`
- [Meeting Minutes](https://github.com/sreeharshithreddy/syncmate/blob/main/src/components/MeetingMinutesDialog.tsx): `src/components/MeetingMinutesDialog.tsx`
- [AI Assistant](https://github.com/sreeharshithreddy/syncmate/blob/main/src/components/AIEventAssistant.tsx): `src/components/AIEventAssistant.tsx`
- [Event Templates](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/Templates.tsx): `src/pages/Templates.tsx`

### Tasks and Support

- [Task Management](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/MyTasks.tsx): `src/pages/MyTasks.tsx`
- [Task Data](https://github.com/sreeharshithreddy/syncmate/blob/main/src/hooks/useUserActionItems.ts): `src/hooks/useUserActionItems.ts`
- [Notifications](https://github.com/sreeharshithreddy/syncmate/blob/main/src/pages/Notifications.tsx): `src/pages/Notifications.tsx`

### Backend Services

- [Supabase Client](https://github.com/sreeharshithreddy/syncmate/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase Backend**
- [AI Edge Function](https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/ai-event-assistant/index.ts): `supabase/functions/ai-event-assistant/index.ts`
- [Reminder Function](https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/send-event-reminders/index.ts): `supabase/functions/send-event-reminders/index.ts`
- [Email Function](https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/send-transactional-email/index.ts): `supabase/functions/send-transactional-email/index.ts`
- [Google Calendar Sync](https://github.com/sreeharshithreddy/syncmate/blob/main/supabase/functions/google-calendar-sync/index.ts): `supabase/functions/google-calendar-sync/index.ts`

### Other components

- **User**

## Connections

- User → Application Router: opens (evidence: `src/App.tsx`)
- Application Router → Authentication: provides auth (evidence: `src/App.tsx`)
- Application Router → Calendar Views: routes to (evidence: `src/App.tsx`)
- Application Router → Event Creation: routes to (evidence: `src/App.tsx`)
- Application Router → Free-Time Finder: routes to (evidence: `src/App.tsx`)
- Application Router → Friends: routes to (evidence: `src/App.tsx`)
- Application Router → Task Management: routes to (evidence: `src/App.tsx`)
- Application Router → Notifications: routes to (evidence: `src/App.tsx`)
- Application Router → Event Templates: routes to (evidence: `src/App.tsx`)
- Application Router → App Layout: wraps pages (evidence: `src/components/layout/AppLayout.tsx`)
- App Layout → UI Primitives: uses primitives
- Authentication → Supabase Client: reads and updates auth (evidence: `src/contexts/AuthContext.tsx`)
- Supabase Client → Supabase Backend: connects to (evidence: `README.md`)
- Calendar Views → Event Data: shows events
- Event Creation → Event Data: creates events
- Event Creation → Friends: invites friends (evidence: `README.md`)
- Free-Time Finder → Event Creation: schedules selected slot (evidence: `README.md`)
- Free-Time Finder → Friends: compares busy time (evidence: `README.md`)
- Calendar Views → Event Categories: colors events (evidence: `README.md`)
- Task Management → Task Data: loads task items (evidence: `src/pages/MyTasks.tsx`)
- Task Management → Task Data: invalidates task queries (evidence: `src/pages/MyTasks.tsx`)
- Task Data → Supabase Client: reads task data (evidence: `src/hooks/useUserActionItems.ts`)
- Meeting Minutes → Task Management: creates action items (evidence: `README.md`)
- AI Assistant → AI Edge Function: requests AI assistance
- AI Edge Function → Supabase Client: runs as edge function
- Event Templates → Event Creation: prefills event form (evidence: `README.md`)
- Reminder Function → Notifications: sends reminders
- Email Function → User: sends email
- Google Calendar Sync → Calendar Views: syncs calendar events
