# dzuy/landclub-platform architecture

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

- Interactive diagram: https://gitdiagram.com/dzuy/landclub-platform
- Repository: https://github.com/dzuy/landclub-platform

## Overview

Land Club is a property-discovery site with a staff content-management and member-access workspace. Visitors browse published property content; staff manage drafts, previews, publication, and revision history. Supporting capabilities include structured property facts, Notion synchronization, invitations and role assignments, member properties, profiles, and club events. The graph emphasizes these product stages and their storage/auth boundaries. Some implementation files were not sampled, so uncertain subsystem connections are omitted rather than inferred.

Main entry points: [`src/lib/repository.ts`](https://github.com/dzuy/landclub-platform/blob/main/src/lib/repository.ts) (Property repository), [`src/lib/staff.ts`](https://github.com/dzuy/landclub-platform/blob/main/src/lib/staff.ts) (Staff authorization), [`src/components/discovery-home.tsx`](https://github.com/dzuy/landclub-platform/blob/main/src/components/discovery-home.tsx) (Public discovery), [`src/lib/auth/client.ts`](https://github.com/dzuy/landclub-platform/blob/main/src/lib/auth/client.ts) (Auth client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Property discovery"]
  node_public_site["Public discovery<br/>[discovery-home.tsx]"]
  node_property_view["Property detail<br/>[property-page.tsx]"]
end

subgraph group_content["Property content"]
  node_property_repo["Property repository<br/>[repository.ts]"]
  node_property_db[("Property database<br/>[database.ts]")]
  node_property_facts["Property facts<br/>[property-facts.ts]"]
  node_notion_sync["Notion sync<br/>[notion-sync.ts]"]
  node_revisions[("Revision history<br/>[database.ts]")]
end

subgraph group_access["Identity and membership"]
  node_signin["Sign-in actions<br/>[actions.ts]"]
  node_auth_client["Auth client<br/>[client.ts]"]
  node_identity["User identity<br/>[identity.ts]"]
  node_staff_guard["Staff authorization<br/>[staff.ts]"]
  node_invitations["Invitations and roles<br/>[invitations.ts]"]
  node_supabase["Supabase Auth"]
end

subgraph group_workspace["Staff workspace"]
  node_member_admin["Member directory<br/>[page.tsx]"]
  node_property_editor["Property editor"]
  node_property_actions["Property actions<br/>[actions.ts]"]
  node_events["Club events<br/>[events.ts]"]
  node_event_admin["Event management<br/>[actions.ts]"]
  node_member_properties["Member properties"]
  node_profile["Staff profile<br/>[profile.ts]"]
end

node_visitor(("Visitor"))
node_staff(("Staff user"))

node_visitor -->|"browses"| node_public_site
node_public_site -->|"reads published"| node_property_repo
node_property_repo -->|"queries"| node_property_db
node_public_site -.->|"opens property"| node_property_view
node_staff -->|"signs in"| node_signin
node_signin -->|"authenticates"| node_auth_client
node_auth_client -.->|"uses"| node_supabase
node_identity -->|"gets user"| node_auth_client
node_staff_guard -->|"checks identity"| node_identity
node_staff_guard -->|"checks roles"| node_invitations
node_member_admin -->|"requires staff"| node_staff_guard
node_member_admin -->|"loads invitations"| node_invitations
node_property_editor -->|"submits edits"| node_property_actions
node_property_editor -->|"edits facts"| node_property_facts
node_property_actions -.->|"saves drafts"| node_property_repo
node_property_repo -->|"records revisions"| node_revisions
node_notion_sync -.->|"syncs property data"| node_property_repo
node_event_admin -->|"manages events"| node_events
node_member_properties -.->|"reads properties"| node_property_repo
node_profile -.->|"requires staff"| node_staff_guard

click node_public_site "https://github.com/dzuy/landclub-platform/blob/main/src/components/discovery-home.tsx"
click node_property_view "https://github.com/dzuy/landclub-platform/blob/main/src/components/property-page.tsx"
click node_property_repo "https://github.com/dzuy/landclub-platform/blob/main/src/lib/repository.ts"
click node_property_db "https://github.com/dzuy/landclub-platform/blob/main/src/lib/database.ts"
click node_signin "https://github.com/dzuy/landclub-platform/blob/main/src/app/signin/actions.ts"
click node_auth_client "https://github.com/dzuy/landclub-platform/blob/main/src/lib/auth/client.ts"
click node_identity "https://github.com/dzuy/landclub-platform/blob/main/src/lib/auth/identity.ts"
click node_staff_guard "https://github.com/dzuy/landclub-platform/blob/main/src/lib/staff.ts"
click node_member_admin "https://github.com/dzuy/landclub-platform/blob/main/src/app/staff/members/page.tsx"
click node_invitations "https://github.com/dzuy/landclub-platform/blob/main/src/lib/invitations.ts"
click node_property_editor "https://github.com/dzuy/landclub-platform/blob/main/src/components/property-editor.tsx"
click node_property_actions "https://github.com/dzuy/landclub-platform/blob/main/src/app/staff/properties/actions.ts"
click node_property_facts "https://github.com/dzuy/landclub-platform/blob/main/src/lib/property-facts.ts"
click node_notion_sync "https://github.com/dzuy/landclub-platform/blob/main/src/lib/notion-sync.ts"
click node_events "https://github.com/dzuy/landclub-platform/blob/main/src/lib/events.ts"
click node_event_admin "https://github.com/dzuy/landclub-platform/blob/main/src/app/staff/manage-events/actions.ts"
click node_member_properties "https://github.com/dzuy/landclub-platform/blob/main/src/lib/member-properties.ts"
click node_profile "https://github.com/dzuy/landclub-platform/blob/main/src/lib/profile.ts"
click node_revisions "https://github.com/dzuy/landclub-platform/blob/main/src/lib/database.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_public_site,node_property_view,node_staff toneBlue
class node_property_repo,node_property_db,node_property_facts,node_notion_sync,node_revisions toneAmber
class node_signin,node_auth_client,node_identity,node_staff_guard,node_invitations,node_supabase toneMint
class node_member_admin,node_property_editor,node_property_actions,node_events,node_event_admin,node_member_properties,node_profile toneRose
class node_visitor toneIndigo
```

## Components

### Property discovery

- [Public discovery](https://github.com/dzuy/landclub-platform/blob/main/src/components/discovery-home.tsx): `src/components/discovery-home.tsx`
- [Property detail](https://github.com/dzuy/landclub-platform/blob/main/src/components/property-page.tsx): `src/components/property-page.tsx`

### Property content

- [Property repository](https://github.com/dzuy/landclub-platform/blob/main/src/lib/repository.ts): `src/lib/repository.ts`
- [Property database](https://github.com/dzuy/landclub-platform/blob/main/src/lib/database.ts): `src/lib/database.ts`
- [Property facts](https://github.com/dzuy/landclub-platform/blob/main/src/lib/property-facts.ts): `src/lib/property-facts.ts`
- [Notion sync](https://github.com/dzuy/landclub-platform/blob/main/src/lib/notion-sync.ts): `src/lib/notion-sync.ts`
- [Revision history](https://github.com/dzuy/landclub-platform/blob/main/src/lib/database.ts): `src/lib/database.ts`

### Identity and membership

- [Sign-in actions](https://github.com/dzuy/landclub-platform/blob/main/src/app/signin/actions.ts): `src/app/signin/actions.ts`
- [Auth client](https://github.com/dzuy/landclub-platform/blob/main/src/lib/auth/client.ts): `src/lib/auth/client.ts`
- [User identity](https://github.com/dzuy/landclub-platform/blob/main/src/lib/auth/identity.ts): `src/lib/auth/identity.ts`
- [Staff authorization](https://github.com/dzuy/landclub-platform/blob/main/src/lib/staff.ts): `src/lib/staff.ts`
- [Invitations and roles](https://github.com/dzuy/landclub-platform/blob/main/src/lib/invitations.ts): `src/lib/invitations.ts`
- **Supabase Auth**

### Staff workspace

- [Member directory](https://github.com/dzuy/landclub-platform/blob/main/src/app/staff/members/page.tsx): `src/app/staff/members/page.tsx`
- [Property editor](https://github.com/dzuy/landclub-platform/blob/main/src/components/property-editor.tsx): `src/components/property-editor.tsx`
- [Property actions](https://github.com/dzuy/landclub-platform/blob/main/src/app/staff/properties/actions.ts): `src/app/staff/properties/actions.ts`
- [Club events](https://github.com/dzuy/landclub-platform/blob/main/src/lib/events.ts): `src/lib/events.ts`
- [Event management](https://github.com/dzuy/landclub-platform/blob/main/src/app/staff/manage-events/actions.ts): `src/app/staff/manage-events/actions.ts`
- [Member properties](https://github.com/dzuy/landclub-platform/blob/main/src/lib/member-properties.ts): `src/lib/member-properties.ts`
- [Staff profile](https://github.com/dzuy/landclub-platform/blob/main/src/lib/profile.ts): `src/lib/profile.ts`

### Other components

- **Visitor**
- **Staff user**

## Connections

- Visitor → Public discovery: browses
- Public discovery → Property repository: reads published
- Property repository → Property database: queries (evidence: `src/lib/repository.ts`)
- Public discovery → Property detail: opens property
- Staff user → Sign-in actions: signs in
- Sign-in actions → Auth client: authenticates (evidence: `src/app/signin/actions.ts`)
- Auth client → Supabase Auth: uses
- User identity → Auth client: gets user (evidence: `src/lib/auth/identity.ts`)
- Staff authorization → User identity: checks identity (evidence: `src/lib/staff.ts`)
- Staff authorization → Invitations and roles: checks roles (evidence: `src/lib/staff.ts`)
- Member directory → Staff authorization: requires staff (evidence: `src/app/staff/members/page.tsx`)
- Member directory → Invitations and roles: loads invitations (evidence: `src/app/staff/members/page.tsx`)
- Property editor → Property actions: submits edits (evidence: `src/components/property-editor.tsx`)
- Property editor → Property facts: edits facts (evidence: `src/components/property-editor.tsx`)
- Property actions → Property repository: saves drafts
- Property repository → Revision history: records revisions (evidence: `src/lib/repository.ts`)
- Notion sync → Property repository: syncs property data
- Event management → Club events: manages events (evidence: `src/app/staff/manage-events/actions.ts`)
- Member properties → Property repository: reads properties
- Staff profile → Staff authorization: requires staff
