# gui-bus/clubkey architecture

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

- Interactive diagram: https://gitdiagram.com/gui-bus/clubkey
- Repository: https://github.com/gui-bus/clubkey

## Overview

ClubKey is a member-facing web portal paired with an administrative back office, supported by shared UI, domain types, validation schemas, and utilities. A member enters through public/authentication screens, then uses portal capabilities such as events, experiences, stays, networking, benefits, subscriptions, and KeyPass; administrators manage operational areas and reporting. The graph preserves those documented product branches. Source excerpts are selective, so unsampled capabilities are represented at their documented app or directory level; no backend service or persistent database is evidenced here.

Main entry points: [`apps/web/src/app`](https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app) (Web app), [`apps/admin/src/app`](https://github.com/gui-bus/clubkey/tree/main/apps/admin/src/app) (Admin app), [`apps/web/src/store/usePortalStore.ts`](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/usePortalStore.ts) (Portal store), [`packages/ui/src`](https://github.com/gui-bus/clubkey/tree/main/packages/ui/src) (Bloom UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_member["Member portal"]
  node_web["Web app"]
  node_auth["Sign-up and auth"]
  node_events["Events"]
  node_experiences["Experiences"]
  node_stays["Stays"]
  node_community["Networking"]
  node_keypass["KeyPass"]
end

subgraph group_admin["Administration"]
  node_adminapp["Admin app"]
  node_adminusers["Member management"]
  node_adminproperty["Property operations"]
  node_adminprotection["Protection operations"]
  node_adminreports["Reports<br/>[reportsClient.tsx]"]
end

subgraph group_state["Application state"]
  node_webstate[("Portal store<br/>[usePortalStore.ts]")]
  node_authslice["Auth slice<br/>[authSlice.ts]"]
  node_chatslice["Chat slice<br/>[chatSlice.ts]"]
  node_eventsslice["Events slice<br/>[eventsSlice.ts]"]
  node_gamificationslice["Gamification slice"]
  node_networkingslice["Networking slice<br/>[networkingSlice.ts]"]
  node_adminstore[("Admin store<br/>[useAdminStore.ts]")]
end

subgraph group_shared["Shared packages"]
  node_ui["Bloom UI"]
  node_types["Domain types"]
  node_schemas["Validation schemas"]
  node_utils["Shared utilities"]
end

node_visitor(("Member"))
node_adminactor(("Administrator"))

node_visitor -->|"opens portal"| node_web
node_web -->|"offers sign-up"| node_auth
node_web -->|"serves events"| node_events
node_web -->|"serves experiences"| node_experiences
node_web -->|"serves stays"| node_stays
node_web -->|"serves networking"| node_community
node_web -->|"serves KeyPass"| node_keypass
node_web -->|"uses store"| node_webstate
node_webstate -->|"composes slice"| node_authslice
node_webstate -->|"composes slice"| node_chatslice
node_webstate -->|"composes slice"| node_eventsslice
node_webstate -->|"composes slice"| node_gamificationslice
node_webstate -->|"composes slice"| node_networkingslice
node_adminactor -->|"opens back office"| node_adminapp
node_adminapp -->|"manages members"| node_adminusers
node_adminapp -->|"manages properties"| node_adminproperty
node_adminapp -->|"manages protection"| node_adminprotection
node_adminapp -->|"provides reporting"| node_adminreports
node_adminapp -->|"uses store"| node_adminstore
node_web -->|"consumes components"| node_ui
node_web -->|"consumes contracts"| node_types
node_web -->|"consumes validation"| node_schemas
node_web -->|"consumes utilities"| node_utils
node_adminapp -->|"consumes components"| node_ui
node_adminapp -->|"consumes contracts"| node_types
node_adminapp -->|"consumes validation"| node_schemas
node_adminapp -->|"consumes utilities"| node_utils
node_schemas -->|"defines contracts"| node_types
node_ui -->|"uses utilities"| node_utils

click node_web "https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app"
click node_auth "https://github.com/gui-bus/clubkey/tree/main/apps/web/src/components/auth"
click node_events "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/components/portal/eventDetailClient.tsx"
click node_experiences "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/components/portal/experienceDetailClient.tsx"
click node_stays "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/components/rooms/roomDetailClient.tsx"
click node_community "https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app/(portal)/conexoes"
click node_keypass "https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app/(portal)/keypass"
click node_webstate "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/usePortalStore.ts"
click node_authslice "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/authSlice.ts"
click node_chatslice "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/chatSlice.ts"
click node_eventsslice "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/eventsSlice.ts"
click node_gamificationslice "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/gamificationSlice.ts"
click node_networkingslice "https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/networkingSlice.ts"
click node_adminapp "https://github.com/gui-bus/clubkey/tree/main/apps/admin/src/app"
click node_adminusers "https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/users/adminUsersClient.tsx"
click node_adminproperty "https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/properties/propertiesClient.tsx"
click node_adminprotection "https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/protecaoKey/protecaoKeyClient.tsx"
click node_adminreports "https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/reports/reportsClient.tsx"
click node_adminstore "https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/store/useAdminStore.ts"
click node_ui "https://github.com/gui-bus/clubkey/tree/main/packages/ui/src"
click node_types "https://github.com/gui-bus/clubkey/tree/main/packages/types/src"
click node_schemas "https://github.com/gui-bus/clubkey/tree/main/packages/schemas/src"
click node_utils "https://github.com/gui-bus/clubkey/tree/main/packages/utils/src"

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_web,node_auth,node_events,node_experiences,node_stays,node_community,node_keypass toneBlue
class node_adminapp,node_adminusers,node_adminproperty,node_adminprotection,node_adminreports toneAmber
class node_webstate,node_authslice,node_chatslice,node_eventsslice,node_gamificationslice,node_networkingslice,node_adminstore toneMint
class node_ui,node_types,node_schemas,node_utils toneRose
class node_visitor,node_adminactor toneIndigo
```

## Components

### Member portal

- [Web app](https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app): `apps/web/src/app`
- [Sign-up and auth](https://github.com/gui-bus/clubkey/tree/main/apps/web/src/components/auth): `apps/web/src/components/auth`
- [Events](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/components/portal/eventDetailClient.tsx): `apps/web/src/components/portal/eventDetailClient.tsx`
- [Experiences](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/components/portal/experienceDetailClient.tsx): `apps/web/src/components/portal/experienceDetailClient.tsx`
- [Stays](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/components/rooms/roomDetailClient.tsx): `apps/web/src/components/rooms/roomDetailClient.tsx`
- [Networking](https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app/(portal)/conexoes): `apps/web/src/app/(portal)/conexoes`
- [KeyPass](https://github.com/gui-bus/clubkey/tree/main/apps/web/src/app/(portal)/keypass): `apps/web/src/app/(portal)/keypass`

### Administration

- [Admin app](https://github.com/gui-bus/clubkey/tree/main/apps/admin/src/app): `apps/admin/src/app`
- [Member management](https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/users/adminUsersClient.tsx): `apps/admin/src/components/admin/users/adminUsersClient.tsx`
- [Property operations](https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/properties/propertiesClient.tsx): `apps/admin/src/components/admin/properties/propertiesClient.tsx`
- [Protection operations](https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/protecaoKey/protecaoKeyClient.tsx): `apps/admin/src/components/admin/protecaoKey/protecaoKeyClient.tsx`
- [Reports](https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/components/admin/reports/reportsClient.tsx): `apps/admin/src/components/admin/reports/reportsClient.tsx`

### Application state

- [Portal store](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/usePortalStore.ts): `apps/web/src/store/usePortalStore.ts`
- [Auth slice](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/authSlice.ts): `apps/web/src/store/slices/authSlice.ts`
- [Chat slice](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/chatSlice.ts): `apps/web/src/store/slices/chatSlice.ts`
- [Events slice](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/eventsSlice.ts): `apps/web/src/store/slices/eventsSlice.ts`
- [Gamification slice](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/gamificationSlice.ts): `apps/web/src/store/slices/gamificationSlice.ts`
- [Networking slice](https://github.com/gui-bus/clubkey/blob/main/apps/web/src/store/slices/networkingSlice.ts): `apps/web/src/store/slices/networkingSlice.ts`
- [Admin store](https://github.com/gui-bus/clubkey/blob/main/apps/admin/src/store/useAdminStore.ts): `apps/admin/src/store/useAdminStore.ts`

### Shared packages

- [Bloom UI](https://github.com/gui-bus/clubkey/tree/main/packages/ui/src): `packages/ui/src`
- [Domain types](https://github.com/gui-bus/clubkey/tree/main/packages/types/src): `packages/types/src`
- [Validation schemas](https://github.com/gui-bus/clubkey/tree/main/packages/schemas/src): `packages/schemas/src`
- [Shared utilities](https://github.com/gui-bus/clubkey/tree/main/packages/utils/src): `packages/utils/src`

### Other components

- **Member**
- **Administrator**

## Connections

- Member → Web app: opens portal (evidence: `README.md`)
- Web app → Sign-up and auth: offers sign-up (evidence: `README.md`)
- Web app → Events: serves events (evidence: `README.md`)
- Web app → Experiences: serves experiences (evidence: `README.md`)
- Web app → Stays: serves stays (evidence: `README.md`)
- Web app → Networking: serves networking (evidence: `README.md`)
- Web app → KeyPass: serves KeyPass (evidence: `README.md`)
- Web app → Portal store: uses store (evidence: `README.md`)
- Portal store → Auth slice: composes slice (evidence: `apps/web/src/store/usePortalStore.ts`)
- Portal store → Chat slice: composes slice (evidence: `apps/web/src/store/usePortalStore.ts`)
- Portal store → Events slice: composes slice (evidence: `apps/web/src/store/usePortalStore.ts`)
- Portal store → Gamification slice: composes slice (evidence: `apps/web/src/store/usePortalStore.ts`)
- Portal store → Networking slice: composes slice (evidence: `apps/web/src/store/usePortalStore.ts`)
- Administrator → Admin app: opens back office (evidence: `README.md`)
- Admin app → Member management: manages members (evidence: `README.md`)
- Admin app → Property operations: manages properties (evidence: `README.md`)
- Admin app → Protection operations: manages protection (evidence: `README.md`)
- Admin app → Reports: provides reporting (evidence: `README.md`)
- Admin app → Admin store: uses store (evidence: `README.md`)
- Web app → Bloom UI: consumes components (evidence: `README.md`)
- Web app → Domain types: consumes contracts (evidence: `README.md`)
- Web app → Validation schemas: consumes validation (evidence: `README.md`)
- Web app → Shared utilities: consumes utilities (evidence: `README.md`)
- Admin app → Bloom UI: consumes components (evidence: `README.md`)
- Admin app → Domain types: consumes contracts (evidence: `README.md`)
- Admin app → Validation schemas: consumes validation (evidence: `README.md`)
- Admin app → Shared utilities: consumes utilities (evidence: `README.md`)
- Validation schemas → Domain types: defines contracts (evidence: `README.md`)
- Bloom UI → Shared utilities: uses utilities (evidence: `README.md`)
