# elitetamil/matrimony architecture

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

- Interactive diagram: https://gitdiagram.com/elitetamil/matrimony
- Repository: https://github.com/elitetamil/matrimony

## Overview

Elite Tamil Matrimony is a matrimonial service for discovering profiles, expressing interest, and managing membership. Its frontend also provides account and profile management, messaging and notifications, and administrative tools. The visible server routes support email OTP, MSG91 token verification, Razorpay orders and payment confirmation, membership cancellation, expiry notices, and admin data operations. Source evidence is incomplete: the README is empty and many page implementations were not excerpted, so frontend-to-API connections are omitted where they cannot be verified.

Main entry points: [`frontend/src/app/api/verify-payment/route.ts`](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/verify-payment/route.ts) (Verify Payment), [`frontend/src/app/api/send-email-otp/route.ts`](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/send-email-otp/route.ts) (Email OTP Routes), [`frontend/src/app/api/notify-expiry/route.ts`](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/notify-expiry/route.ts) (Expiry Notifications), [`frontend/src/app/api/cancel-membership/route.ts`](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/cancel-membership/route.ts) (Cancel Membership)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and Profiles"]
  node_auth_pages["Sign-in and Registration<br/>[page.tsx]"]
  node_auth_api["Account API Routes<br/>[route.ts]"]
  node_email_otp["Email OTP Routes<br/>[route.ts]"]
  node_otp_store[("OTP Store<br/>[otp-store.ts]")]
  node_email_templates["Email Templates<br/>[templates.ts]"]
  node_msg91_verify["MSG91 Token Verification<br/>[route.ts]"]
  node_profile_pages["Profile Management<br/>[page.tsx]"]
  node_profile_view["Profile Viewing<br/>[page.tsx]"]
end

subgraph group_discovery["Matrimonial Discovery"]
  node_search["Profile Search<br/>[page.tsx]"]
  node_regular_search["Regular Search<br/>[page.tsx]"]
  node_matches["Matches<br/>[page.tsx]"]
  node_daily_recs["Daily Recommendations<br/>[page.tsx]"]
end

subgraph group_engagement["Member Engagement"]
  node_interests["Interests<br/>[page.tsx]"]
  node_messages["Messaging<br/>[page.tsx]"]
  node_notifications["Notifications<br/>[page.tsx]"]
  node_expiry_api["Expiry Notifications<br/>[route.ts]"]
end

subgraph group_membership["Membership and Payments"]
  node_membership_pages["Membership and Payment Pages<br/>[page.tsx]"]
  node_create_order["Create Payment Order<br/>[route.ts]"]
  node_verify_payment["Verify Payment<br/>[route.ts]"]
  node_cancel_membership["Cancel Membership<br/>[route.ts]"]
end

subgraph group_operations["Administration"]
  node_admin_ui["Admin Console<br/>[page.tsx]"]
  node_admin_api["Admin Data API<br/>[route.ts]"]
end

node_member(("Member"))
node_msg91["MSG91"]
node_razorpay["Razorpay"]
node_supabase[("Supabase Data and Auth")]
node_resend["Resend Email"]

node_member -.->|"uses"| node_auth_pages
node_member -.->|"manages profile"| node_profile_pages
node_member -.->|"searches profiles"| node_search
node_member -.->|"views matches"| node_matches
node_member -.->|"manages membership"| node_membership_pages
node_email_otp -->|"stores OTP"| node_otp_store
node_email_otp -->|"renders email"| node_email_templates
node_email_otp -->|"sends email"| node_resend
node_auth_api -->|"creates auth session"| node_supabase
node_msg91_verify -->|"validates token"| node_msg91
node_create_order -->|"creates order"| node_razorpay
node_verify_payment -->|"updates membership"| node_supabase
node_verify_payment -->|"renders confirmation"| node_email_templates
node_verify_payment -->|"sends confirmation"| node_resend
node_cancel_membership -->|"updates membership"| node_supabase
node_cancel_membership -->|"sends cancellation"| node_resend
node_expiry_api -->|"reads and records"| node_supabase
node_expiry_api -->|"sends notice"| node_resend
node_admin_api -->|"queries and updates"| node_supabase
node_verify_payment -->|"checks signature"| node_razorpay

click node_auth_pages "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/login/page.tsx"
click node_auth_api "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/otp-login/route.ts"
click node_email_otp "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/send-email-otp/route.ts"
click node_otp_store "https://github.com/elitetamil/matrimony/blob/main/frontend/src/lib/email/otp-store.ts"
click node_email_templates "https://github.com/elitetamil/matrimony/blob/main/frontend/src/lib/email/templates.ts"
click node_msg91_verify "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/verify-msg91-token/route.ts"
click node_profile_pages "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/profile/edit/page.tsx"
click node_profile_view "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/profile/%5Bid%5D/page.tsx"
click node_search "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/search/page.tsx"
click node_regular_search "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/search/regular/page.tsx"
click node_matches "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/matches/page.tsx"
click node_daily_recs "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/daily-recs/page.tsx"
click node_interests "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/interests/page.tsx"
click node_messages "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/messages/page.tsx"
click node_notifications "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/notifications/page.tsx"
click node_expiry_api "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/notify-expiry/route.ts"
click node_membership_pages "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/membership/page.tsx"
click node_create_order "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/create-order/route.ts"
click node_verify_payment "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/verify-payment/route.ts"
click node_cancel_membership "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/cancel-membership/route.ts"
click node_admin_ui "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/admin/page.tsx"
click node_admin_api "https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/admin/data/route.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_auth_pages,node_auth_api,node_email_otp,node_otp_store,node_email_templates,node_msg91_verify,node_profile_pages,node_profile_view toneBlue
class node_search,node_regular_search,node_matches,node_daily_recs,node_supabase toneAmber
class node_interests,node_messages,node_notifications,node_expiry_api toneMint
class node_membership_pages,node_create_order,node_verify_payment,node_cancel_membership toneRose
class node_admin_ui,node_admin_api,node_member,node_msg91,node_razorpay,node_resend toneIndigo
```

## Components

### Accounts and Profiles

- [Sign-in and Registration](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/login/page.tsx): `frontend/src/app/login/page.tsx`
- [Account API Routes](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/otp-login/route.ts): `frontend/src/app/api/otp-login/route.ts`
- [Email OTP Routes](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/send-email-otp/route.ts): `frontend/src/app/api/send-email-otp/route.ts`
- [OTP Store](https://github.com/elitetamil/matrimony/blob/main/frontend/src/lib/email/otp-store.ts): `frontend/src/lib/email/otp-store.ts`
- [Email Templates](https://github.com/elitetamil/matrimony/blob/main/frontend/src/lib/email/templates.ts): `frontend/src/lib/email/templates.ts`
- [MSG91 Token Verification](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/verify-msg91-token/route.ts): `frontend/src/app/api/verify-msg91-token/route.ts`
- [Profile Management](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/profile/edit/page.tsx): `frontend/src/app/profile/edit/page.tsx`
- [Profile Viewing](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/profile/%5Bid%5D/page.tsx): `frontend/src/app/profile/[id]/page.tsx`

### Matrimonial Discovery

- [Profile Search](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/search/page.tsx): `frontend/src/app/search/page.tsx`
- [Regular Search](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/search/regular/page.tsx): `frontend/src/app/search/regular/page.tsx`
- [Matches](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/matches/page.tsx): `frontend/src/app/matches/page.tsx`
- [Daily Recommendations](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/daily-recs/page.tsx): `frontend/src/app/daily-recs/page.tsx`

### Member Engagement

- [Interests](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/interests/page.tsx): `frontend/src/app/interests/page.tsx`
- [Messaging](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/messages/page.tsx): `frontend/src/app/messages/page.tsx`
- [Notifications](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/notifications/page.tsx): `frontend/src/app/notifications/page.tsx`
- [Expiry Notifications](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/notify-expiry/route.ts): `frontend/src/app/api/notify-expiry/route.ts`

### Membership and Payments

- [Membership and Payment Pages](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/membership/page.tsx): `frontend/src/app/membership/page.tsx`
- [Create Payment Order](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/create-order/route.ts): `frontend/src/app/api/create-order/route.ts`
- [Verify Payment](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/verify-payment/route.ts): `frontend/src/app/api/verify-payment/route.ts`
- [Cancel Membership](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/cancel-membership/route.ts): `frontend/src/app/api/cancel-membership/route.ts`

### Administration

- [Admin Console](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/admin/page.tsx): `frontend/src/app/admin/page.tsx`
- [Admin Data API](https://github.com/elitetamil/matrimony/blob/main/frontend/src/app/api/admin/data/route.ts): `frontend/src/app/api/admin/data/route.ts`

### Other components

- **Member**
- **MSG91**
- **Razorpay**
- **Supabase Data and Auth**
- **Resend Email**

## Connections

- Member → Sign-in and Registration: uses
- Member → Profile Management: manages profile
- Member → Profile Search: searches profiles
- Member → Matches: views matches
- Member → Membership and Payment Pages: manages membership
- Email OTP Routes → OTP Store: stores OTP (evidence: `frontend/src/app/api/send-email-otp/route.ts`)
- Email OTP Routes → Email Templates: renders email (evidence: `frontend/src/app/api/send-email-otp/route.ts`)
- Email OTP Routes → Resend Email: sends email (evidence: `frontend/src/app/api/send-email-otp/route.ts`)
- Account API Routes → Supabase Data and Auth: creates auth session (evidence: `frontend/src/app/api/otp-login/route.ts`)
- MSG91 Token Verification → MSG91: validates token (evidence: `frontend/src/app/api/verify-msg91-token/route.ts`)
- Create Payment Order → Razorpay: creates order (evidence: `frontend/src/app/api/create-order/route.ts`)
- Verify Payment → Supabase Data and Auth: updates membership (evidence: `frontend/src/app/api/verify-payment/route.ts`)
- Verify Payment → Email Templates: renders confirmation (evidence: `frontend/src/app/api/verify-payment/route.ts`)
- Verify Payment → Resend Email: sends confirmation (evidence: `frontend/src/app/api/verify-payment/route.ts`)
- Cancel Membership → Supabase Data and Auth: updates membership (evidence: `frontend/src/app/api/cancel-membership/route.ts`)
- Cancel Membership → Resend Email: sends cancellation (evidence: `frontend/src/app/api/cancel-membership/route.ts`)
- Expiry Notifications → Supabase Data and Auth: reads and records (evidence: `frontend/src/app/api/notify-expiry/route.ts`)
- Expiry Notifications → Resend Email: sends notice (evidence: `frontend/src/app/api/notify-expiry/route.ts`)
- Admin Data API → Supabase Data and Auth: queries and updates (evidence: `frontend/src/app/api/admin/data/route.ts`)
- Verify Payment → Razorpay: checks signature (evidence: `frontend/src/app/api/verify-payment/route.ts`)
