# grsantoss/operacondo-concierge-email architecture

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

- Interactive diagram: https://gitdiagram.com/grsantoss/operacondo-concierge-email
- Repository: https://github.com/grsantoss/operacondo-concierge-email

## Overview

CondoMail AI is a condominium email-management application: users authenticate, configure a condominium, review categorized messages, and prepare or approve replies. The route pages invoke authenticated server functions, which read and write condominium, email, and draft records through Supabase; the shell also offers a simulated incoming-email action. The README is empty, so capabilities and relationships here are based on the source index and sampled code; unsampled details are not inferred.

Main entry points: [`src/lib/emails.functions.ts`](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/emails.functions.ts) (Email operations), [`src/routeTree.gen.ts`](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routeTree.gen.ts) (Route registry), [`src/lib/condos.functions.ts`](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/condos.functions.ts) (Condo operations), [`src/routes/auth.tsx`](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/auth.tsx) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and routing"]
  node_route_tree["Route registry<br/>[routeTree.gen.ts]"]
  node_auth_page["Sign in<br/>[auth.tsx]"]
  node_auth_guard["Session guard<br/>[route.tsx]"]
end

subgraph group_condo["Condominium setup"]
  node_condo_setup["Setup flow<br/>[onboarding.tsx]"]
  node_condo_functions["Condo operations"]
  node_settings["Condo settings<br/>[settings.tsx]"]
end

subgraph group_mail["Email workflow"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_email_list["Email inbox<br/>[emails.index.tsx]"]
  node_email_detail["Email detail<br/>[emails.$id.tsx]"]
  node_drafts_page["Draft queue<br/>[drafts.tsx]"]
  node_email_functions["Email operations"]
  node_seed_emails["Sample messages<br/>[seed-emails.ts]"]
  node_draft_templates["Draft templates<br/>[draft-templates.ts]"]
  node_categories["Email categories<br/>[categories.ts]"]
end

subgraph group_platform["Shared platform"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_app_shell["App shell<br/>[app-shell.tsx]"]
  node_supabase_db[("Supabase data store")]
end

node_user(("Condo user"))

node_user -->|"signs in"| node_auth_page
node_auth_page -->|"authenticates with"| node_supabase_client
node_user -.->|"configures condo"| node_condo_setup
node_condo_setup -->|"submits setup"| node_condo_functions
node_settings -->|"loads condo"| node_condo_functions
node_dashboard -->|"loads email data"| node_email_functions
node_email_list -->|"lists messages"| node_email_functions
node_email_detail -->|"loads and saves"| node_email_functions
node_drafts_page -->|"loads drafts"| node_email_functions
node_app_shell -->|"simulates arrival"| node_email_functions
node_email_functions -->|"selects sample"| node_seed_emails
node_email_functions -->|"generates fallback"| node_draft_templates
node_condo_functions -->|"seeds inbox"| node_seed_emails
node_condo_functions -->|"creates drafts"| node_draft_templates
node_draft_templates -->|"uses category types"| node_categories
node_email_functions -->|"reads and writes"| node_supabase_db
node_condo_functions -->|"reads and writes"| node_supabase_db
node_auth_guard -->|"checks session"| node_supabase_client
node_route_tree -->|"registers route"| node_auth_page
node_route_tree -->|"registers route"| node_condo_setup
node_route_tree -->|"registers route"| node_email_list
node_route_tree -->|"registers route"| node_email_detail
node_route_tree -->|"registers route"| node_dashboard
node_route_tree -->|"registers route"| node_drafts_page
node_route_tree -->|"registers route"| node_settings

click node_route_tree "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routeTree.gen.ts"
click node_auth_page "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/auth.tsx"
click node_auth_guard "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/route.tsx"
click node_supabase_client "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/integrations/supabase/client.ts"
click node_condo_setup "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/onboarding.tsx"
click node_condo_functions "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/condos.functions.ts"
click node_dashboard "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/dashboard.tsx"
click node_email_list "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/emails.index.tsx"
click node_email_detail "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/emails.%24id.tsx"
click node_drafts_page "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/drafts.tsx"
click node_settings "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/settings.tsx"
click node_app_shell "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/components/app-shell.tsx"
click node_email_functions "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/emails.functions.ts"
click node_seed_emails "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/seed-emails.ts"
click node_draft_templates "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/draft-templates.ts"
click node_categories "https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/categories.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_route_tree,node_auth_page,node_auth_guard,node_user toneBlue
class node_condo_setup,node_condo_functions,node_settings toneAmber
class node_dashboard,node_email_list,node_email_detail,node_drafts_page,node_email_functions,node_seed_emails,node_draft_templates,node_categories toneMint
class node_supabase_client,node_app_shell,node_supabase_db toneRose
```

## Components

### Access and routing

- [Route registry](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [Sign in](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Session guard](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`

### Condominium setup

- [Setup flow](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/onboarding.tsx): `src/routes/_authenticated/onboarding.tsx`
- [Condo operations](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/condos.functions.ts): `src/lib/condos.functions.ts`
- [Condo settings](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/settings.tsx): `src/routes/_authenticated/settings.tsx`

### Email workflow

- [Dashboard](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/dashboard.tsx): `src/routes/_authenticated/dashboard.tsx`
- [Email inbox](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/emails.index.tsx): `src/routes/_authenticated/emails.index.tsx`
- [Email detail](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/emails.%24id.tsx): `src/routes/_authenticated/emails.$id.tsx`
- [Draft queue](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/routes/_authenticated/drafts.tsx): `src/routes/_authenticated/drafts.tsx`
- [Email operations](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/emails.functions.ts): `src/lib/emails.functions.ts`
- [Sample messages](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/seed-emails.ts): `src/lib/seed-emails.ts`
- [Draft templates](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/draft-templates.ts): `src/lib/draft-templates.ts`
- [Email categories](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/lib/categories.ts): `src/lib/categories.ts`

### Shared platform

- [Supabase client](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [App shell](https://github.com/grsantoss/operacondo-concierge-email/blob/main/src/components/app-shell.tsx): `src/components/app-shell.tsx`
- **Supabase data store**

### Other components

- **Condo user**

## Connections

- Condo user → Sign in: signs in (evidence: `src/routes/auth.tsx`)
- Sign in → Supabase client: authenticates with (evidence: `src/routes/auth.tsx`)
- Condo user → Setup flow: configures condo
- Setup flow → Condo operations: submits setup (evidence: `src/routes/_authenticated/onboarding.tsx`)
- Condo settings → Condo operations: loads condo (evidence: `src/routes/_authenticated/settings.tsx`)
- Dashboard → Email operations: loads email data (evidence: `src/routes/_authenticated/dashboard.tsx`)
- Email inbox → Email operations: lists messages (evidence: `src/routes/_authenticated/emails.index.tsx`)
- Email detail → Email operations: loads and saves (evidence: `src/routes/_authenticated/emails.$id.tsx`)
- Draft queue → Email operations: loads drafts (evidence: `src/routes/_authenticated/drafts.tsx`)
- App shell → Email operations: simulates arrival (evidence: `src/components/app-shell.tsx`)
- Email operations → Sample messages: selects sample (evidence: `src/lib/emails.functions.ts`)
- Email operations → Draft templates: generates fallback (evidence: `src/lib/emails.functions.ts`)
- Condo operations → Sample messages: seeds inbox (evidence: `src/lib/condos.functions.ts`)
- Condo operations → Draft templates: creates drafts (evidence: `src/lib/condos.functions.ts`)
- Draft templates → Email categories: uses category types (evidence: `src/lib/draft-templates.ts`)
- Email operations → Supabase data store: reads and writes (evidence: `src/lib/emails.functions.ts`)
- Condo operations → Supabase data store: reads and writes (evidence: `src/lib/condos.functions.ts`)
- Session guard → Supabase client: checks session (evidence: `src/routes/_authenticated/route.tsx`)
- Route registry → Sign in: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Setup flow: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Email inbox: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Email detail: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Dashboard: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Draft queue: registers route (evidence: `src/routeTree.gen.ts`)
- Route registry → Condo settings: registers route (evidence: `src/routeTree.gen.ts`)
