# arpon-dev-stack/matrimony architecture

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

- Interactive diagram: https://gitdiagram.com/arpon-dev-stack/matrimony
- Repository: https://github.com/arpon-dev-stack/matrimony

## Overview

Metrimony is a matrimonial discovery and profile-management web app. Visitors browse featured profiles and stories, submit match filters, and can register or sign in; authenticated members view profiles and edit details and photos. The graph follows documented routes and excerpted calls. Several route layouts, profile components, and follow-related implementations were not sampled, so those connections are omitted rather than inferred.

Main entry points: [`app/lib/bd.ts`](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/bd.ts) (Supabase client), [`app/actions/signUpAction.ts`](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signUpAction.ts) (Registration action), [`app/actions/signInAction.ts`](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signInAction.ts) (Auth actions), [`app/(service)/edit/page.tsx`](https://github.com/arpon-dev-stack/matrimony/blob/master/app/(service)/edit/page.tsx) (Profile editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Public discovery"]
  node_home["Landing page<br/>[page.tsx]"]
  node_searchform["Search form"]
  node_searchroute["Search route<br/>[page.tsx]"]
  node_searchdata["Search results<br/>[ProfileData.tsx]"]
  node_searchhook["Search hook<br/>[useSearch.ts]"]
  node_homefeeds["Home profile feeds<br/>[homeData.ts]"]
end

subgraph group_identity["Authentication"]
  node_signin["Sign-in page<br/>[page.tsx]"]
  node_signup["Sign-up page<br/>[page.tsx]"]
  node_authstate["Auth state<br/>[AuthContext.tsx]"]
  node_authactions["Auth actions<br/>[signInAction.ts]"]
  node_signupaction["Registration action<br/>[signUpAction.ts]"]
  node_sessionactions["Session actions"]
  node_signoutaction["Sign-out action<br/>[signOutAction.ts]"]
  node_token["Token helpers<br/>[tokenGenerator.ts]"]
  node_authhelpers["Auth helpers<br/>[auth.ts]"]
end

subgraph group_profiles["Profile services"]
  node_profileview["Profile routes"]
  node_profilehook["Profile hook<br/>[useUserProfile.ts]"]
  node_profiledata["Profile queries<br/>[profiles.ts]"]
  node_editroute["Profile editor<br/>[page.tsx]"]
  node_updateaction["Profile update action"]
  node_follow["Follow options<br/>[userFollow.ts]"]
end

subgraph group_presentation["Profile UI"]
  node_editui["Profile edit UI<br/>[EditProfile.tsx]"]
  node_detailsui["Profile details UI<br/>[UserDetails.tsx]"]
end

subgraph group_data["Data and integrations"]
  node_supabaseclient["Supabase client<br/>[bd.ts]"]
  node_supabase[("Supabase")]
  node_cloudinary["Cloudinary uploads"]
end

node_visitor(("Visitor"))
node_member(("Member"))

node_visitor -->|"browses"| node_home
node_home -->|"loads featured content"| node_homefeeds
node_home -->|"renders"| node_searchform
node_searchform -->|"navigates with filters"| node_searchroute
node_visitor -->|"signs in"| node_signin
node_visitor -->|"registers"| node_signup
node_signin -->|"invokes"| node_authactions
node_signup -->|"invokes"| node_signupaction
node_signupaction -->|"calls"| node_authactions
node_signin -->|"sets session"| node_authstate
node_signup -->|"sets session"| node_authstate
node_authstate -->|"refreshes session"| node_sessionactions
node_authstate -->|"signs out"| node_signoutaction
node_authactions -->|"uses"| node_token
node_authactions -->|"uses"| node_authhelpers
node_signupaction -->|"uses"| node_token
node_signupaction -->|"uses"| node_authhelpers
node_authactions -->|"reads and writes"| node_supabaseclient
node_signupaction -->|"reads and writes"| node_supabaseclient
node_sessionactions -->|"reads and writes"| node_supabaseclient
node_signoutaction -->|"updates"| node_supabaseclient
node_updateaction -->|"updates"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase
node_searchroute -->|"renders"| node_searchdata
node_searchhook -->|"queries profiles"| node_profiledata
node_profiledata -->|"queries users"| node_supabaseclient
node_homefeeds -->|"uses profile queries"| node_profiledata
node_member -->|"views profiles"| node_profileview
node_profileview -->|"loads profile"| node_profilehook
node_profilehook -->|"fetches profile"| node_profiledata
node_profileview -->|"renders details"| node_detailsui
node_member -->|"manages profile"| node_editroute
node_editroute -->|"submits changes"| node_updateaction
node_editroute -->|"uses loading UI"| node_editui
node_updateaction -->|"updates user data"| node_supabaseclient
node_editroute -->|"uploads photos"| node_cloudinary
node_searchform -->|"uses filter options"| node_follow

click node_home "https://github.com/arpon-dev-stack/matrimony/blob/master/app/(main)/page.tsx"
click node_searchform "https://github.com/arpon-dev-stack/matrimony/blob/master/components/HomeSearchClient.tsx"
click node_searchroute "https://github.com/arpon-dev-stack/matrimony/blob/master/app/(main)/search/page.tsx"
click node_searchdata "https://github.com/arpon-dev-stack/matrimony/blob/master/components/ProfileData.tsx"
click node_searchhook "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/useSearch.ts"
click node_homefeeds "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/homeData.ts"
click node_signin "https://github.com/arpon-dev-stack/matrimony/blob/master/app/(auth)/signin/page.tsx"
click node_signup "https://github.com/arpon-dev-stack/matrimony/blob/master/app/(auth)/signup/page.tsx"
click node_authstate "https://github.com/arpon-dev-stack/matrimony/blob/master/app/_store/AuthContext.tsx"
click node_authactions "https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signInAction.ts"
click node_signupaction "https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signUpAction.ts"
click node_sessionactions "https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/refreshTokenAction.ts"
click node_signoutaction "https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signOutAction.ts"
click node_token "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/tokenGenerator.ts"
click node_authhelpers "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/auth.ts"
click node_profileview "https://github.com/arpon-dev-stack/matrimony/tree/master/app/(service)/(profile)"
click node_profilehook "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/useUserProfile.ts"
click node_profiledata "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/profiles.ts"
click node_editroute "https://github.com/arpon-dev-stack/matrimony/blob/master/app/(service)/edit/page.tsx"
click node_updateaction "https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/updateProfileAction.ts"
click node_editui "https://github.com/arpon-dev-stack/matrimony/blob/master/components/ui/EditProfile.tsx"
click node_detailsui "https://github.com/arpon-dev-stack/matrimony/blob/master/components/ui/UserDetails.tsx"
click node_follow "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/userFollow.ts"
click node_supabaseclient "https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/bd.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_home,node_searchform,node_searchroute,node_searchdata,node_searchhook,node_homefeeds toneBlue
class node_signin,node_signup,node_authstate,node_authactions,node_signupaction,node_sessionactions,node_signoutaction,node_token,node_authhelpers toneAmber
class node_profileview,node_profilehook,node_profiledata,node_editroute,node_updateaction,node_follow toneMint
class node_editui,node_detailsui toneRose
class node_supabaseclient,node_supabase,node_cloudinary,node_visitor,node_member toneIndigo
```

## Components

### Public discovery

- [Landing page](https://github.com/arpon-dev-stack/matrimony/blob/master/app/(main)/page.tsx): `app/(main)/page.tsx`
- [Search form](https://github.com/arpon-dev-stack/matrimony/blob/master/components/HomeSearchClient.tsx): `components/HomeSearchClient.tsx`
- [Search route](https://github.com/arpon-dev-stack/matrimony/blob/master/app/(main)/search/page.tsx): `app/(main)/search/page.tsx`
- [Search results](https://github.com/arpon-dev-stack/matrimony/blob/master/components/ProfileData.tsx): `components/ProfileData.tsx`
- [Search hook](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/useSearch.ts): `app/lib/useSearch.ts`
- [Home profile feeds](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/homeData.ts): `app/lib/homeData.ts`

### Authentication

- [Sign-in page](https://github.com/arpon-dev-stack/matrimony/blob/master/app/(auth)/signin/page.tsx): `app/(auth)/signin/page.tsx`
- [Sign-up page](https://github.com/arpon-dev-stack/matrimony/blob/master/app/(auth)/signup/page.tsx): `app/(auth)/signup/page.tsx`
- [Auth state](https://github.com/arpon-dev-stack/matrimony/blob/master/app/_store/AuthContext.tsx): `app/_store/AuthContext.tsx`
- [Auth actions](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signInAction.ts): `app/actions/signInAction.ts`
- [Registration action](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signUpAction.ts): `app/actions/signUpAction.ts`
- [Session actions](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/refreshTokenAction.ts): `app/actions/refreshTokenAction.ts`
- [Sign-out action](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/signOutAction.ts): `app/actions/signOutAction.ts`
- [Token helpers](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/tokenGenerator.ts): `app/lib/tokenGenerator.ts`
- [Auth helpers](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/auth.ts): `app/lib/auth.ts`

### Profile services

- [Profile routes](https://github.com/arpon-dev-stack/matrimony/tree/master/app/(service)/(profile)): `app/(service)/(profile)`
- [Profile hook](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/useUserProfile.ts): `app/lib/useUserProfile.ts`
- [Profile queries](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/profiles.ts): `app/lib/profiles.ts`
- [Profile editor](https://github.com/arpon-dev-stack/matrimony/blob/master/app/(service)/edit/page.tsx): `app/(service)/edit/page.tsx`
- [Profile update action](https://github.com/arpon-dev-stack/matrimony/blob/master/app/actions/updateProfileAction.ts): `app/actions/updateProfileAction.ts`
- [Follow options](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/userFollow.ts): `app/lib/userFollow.ts`

### Profile UI

- [Profile edit UI](https://github.com/arpon-dev-stack/matrimony/blob/master/components/ui/EditProfile.tsx): `components/ui/EditProfile.tsx`
- [Profile details UI](https://github.com/arpon-dev-stack/matrimony/blob/master/components/ui/UserDetails.tsx): `components/ui/UserDetails.tsx`

### Data and integrations

- [Supabase client](https://github.com/arpon-dev-stack/matrimony/blob/master/app/lib/bd.ts): `app/lib/bd.ts`
- **Supabase**
- **Cloudinary uploads**

### Other components

- **Visitor**
- **Member**

## Connections

- Visitor → Landing page: browses (evidence: `README.md`)
- Landing page → Home profile feeds: loads featured content (evidence: `app/(main)/page.tsx`)
- Landing page → Search form: renders (evidence: `app/(main)/page.tsx`)
- Search form → Search route: navigates with filters (evidence: `components/HomeSearchClient.tsx`)
- Visitor → Sign-in page: signs in (evidence: `README.md`)
- Visitor → Sign-up page: registers (evidence: `README.md`)
- Sign-in page → Auth actions: invokes (evidence: `app/(auth)/signin/page.tsx`)
- Sign-up page → Registration action: invokes (evidence: `app/(auth)/signup/page.tsx`)
- Registration action → Auth actions: calls (evidence: `app/actions/signUpAction.ts`)
- Sign-in page → Auth state: sets session (evidence: `app/(auth)/signin/page.tsx`)
- Sign-up page → Auth state: sets session (evidence: `app/(auth)/signup/page.tsx`)
- Auth state → Session actions: refreshes session (evidence: `app/_store/AuthContext.tsx`)
- Auth state → Sign-out action: signs out (evidence: `app/_store/AuthContext.tsx`)
- Auth actions → Token helpers: uses (evidence: `app/actions/signInAction.ts`)
- Auth actions → Auth helpers: uses (evidence: `app/actions/signInAction.ts`)
- Registration action → Token helpers: uses (evidence: `app/actions/signUpAction.ts`)
- Registration action → Auth helpers: uses (evidence: `app/actions/signUpAction.ts`)
- Auth actions → Supabase client: reads and writes (evidence: `app/actions/signInAction.ts`)
- Registration action → Supabase client: reads and writes (evidence: `app/actions/signUpAction.ts`)
- Session actions → Supabase client: reads and writes (evidence: `app/actions/refreshTokenAction.ts`)
- Sign-out action → Supabase client: updates (evidence: `app/actions/signOutAction.ts`)
- Profile update action → Supabase client: updates (evidence: `app/actions/updateProfileAction.ts`)
- Supabase client → Supabase: connects to (evidence: `README.md`)
- Search route → Search results: renders (evidence: `app/(main)/search/page.tsx`)
- Search hook → Profile queries: queries profiles (evidence: `app/lib/useSearch.ts`)
- Profile queries → Supabase client: queries users (evidence: `app/lib/profiles.ts`)
- Home profile feeds → Profile queries: uses profile queries (evidence: `app/lib/homeData.ts`)
- Member → Profile routes: views profiles (evidence: `README.md`)
- Profile routes → Profile hook: loads profile (evidence: `app/(service)/(profile)/profile/[id]/page.tsx`)
- Profile hook → Profile queries: fetches profile (evidence: `app/lib/useUserProfile.ts`)
- Profile routes → Profile details UI: renders details (evidence: `app/(service)/(profile)/profile/[id]/page.tsx`)
- Member → Profile editor: manages profile (evidence: `README.md`)
- Profile editor → Profile update action: submits changes (evidence: `app/(service)/edit/page.tsx`)
- Profile editor → Profile edit UI: uses loading UI (evidence: `app/(service)/edit/page.tsx`)
- Profile update action → Supabase client: updates user data (evidence: `app/actions/updateProfileAction.ts`)
- Profile editor → Cloudinary uploads: uploads photos (evidence: `app/(service)/edit/page.tsx`)
- Search form → Follow options: uses filter options (evidence: `components/HomeSearchClient.tsx`)
