# harsha-vardhan-03/srishti-cds architecture

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

- Interactive diagram: https://gitdiagram.com/harsha-vardhan-03/srishti-cds
- Repository: https://github.com/harsha-vardhan-03/srishti-cds

## Overview

This is a Next.js member portal for Srishti CDS. The main user journey is login, followed by a dashboard with member statistics and navigation to referral and network-tree views. Feature hooks retrieve data through feature API modules and a shared Axios client; login stores the returned session and navigates to the dashboard. The graph also shows the shared dashboard shell and query-client setup. The README is a generic Next.js starter and does not document portal capabilities; connections are limited to relationships supported by sampled source or the source index.

Main entry points: [`src/features/auth/components/LoginForm.tsx`](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/components/LoginForm.tsx) (Login form), [`src/shared/lib/axiosClient.ts`](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/lib/axiosClient.ts) (HTTP client), [`src/app/dashboard/page.tsx`](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/page.tsx) (Dashboard page), [`src/app/dashboard/referrals/page.tsx`](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/referrals/page.tsx) (Referrals page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_login_page["Login route<br/>[page.tsx]"]
  node_dashboard_layout["Dashboard shell<br/>[layout.tsx]"]
  node_dashboard_page["Dashboard page<br/>[page.tsx]"]
  node_referrals_page["Referrals page<br/>[page.tsx]"]
  node_tree_page["Network page<br/>[page.tsx]"]
end

subgraph group_auth["Authentication"]
  node_login_form["Login form<br/>[LoginForm.tsx]"]
  node_login_validation["Login validation<br/>[loginSchema.ts]"]
  node_login_hook["Login mutation<br/>[useLogin.ts]"]
  node_auth_api["Authentication API<br/>[authApi.ts]"]
  node_auth_state["Session state<br/>[authStore.ts]"]
end

subgraph group_member["Member data"]
  node_dashboard_stats["Dashboard stats"]
  node_dashboard_api["Stats API<br/>[dashboardApi.ts]"]
  node_stat_card["Stat cards<br/>[StatCard.tsx]"]
  node_referrals_hook["Referrals query<br/>[useReferrals.ts]"]
  node_referrals_api["Referrals API<br/>[referralsApi.ts]"]
  node_referral_table["Referral table<br/>[ReferralTable.tsx]"]
  node_search_bar["Referral search<br/>[SearchBar.tsx]"]
end

subgraph group_network["Network views"]
  node_tree_view["Tree view"]
  node_tree_node["Tree node<br/>[TreeNode.tsx]"]
  node_level_progress["Level progress<br/>[LevelProgress.tsx]"]
  node_tree_hook["Tree query<br/>[useNetworkTree.ts]"]
  node_tree_api["Network tree API<br/>[networkTreeApi.ts]"]
end

subgraph group_shared["Shared services"]
  node_header["Header<br/>[Header.tsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.tsx]"]
  node_profile_menu["Profile menu<br/>[ProfileMenu.tsx]"]
  node_axios["HTTP client<br/>[axiosClient.ts]"]
  node_query_client["Query defaults<br/>[queryClient.ts]"]
  node_login_input["Text input<br/>[Input.tsx]"]
  node_button["Button<br/>[Button.tsx]"]
end

node_visitor(("Member"))
node_backend{{"API service"}}

node_visitor -->|"opens"| node_login_page
node_login_page -->|"renders"| node_login_form
node_login_form -->|"validates with"| node_login_validation
node_login_form -->|"submits through"| node_login_hook
node_login_form -->|"uses"| node_login_input
node_login_form -->|"uses"| node_button
node_login_hook -->|"calls"| node_auth_api
node_auth_api -->|"requests through"| node_axios
node_login_hook -->|"stores session"| node_auth_state
node_login_hook -->|"navigates to"| node_dashboard_page
node_axios -->|"sends requests"| node_backend
node_visitor -->|"opens"| node_dashboard_layout
node_dashboard_layout -->|"renders"| node_header
node_dashboard_layout -->|"renders"| node_sidebar
node_header -->|"renders"| node_profile_menu
node_sidebar -->|"reads session"| node_auth_state
node_profile_menu -->|"reads session"| node_auth_state
node_dashboard_page -->|"loads stats"| node_dashboard_stats
node_dashboard_page -->|"reads member"| node_auth_state
node_dashboard_page -->|"renders"| node_stat_card
node_dashboard_stats -->|"queries"| node_dashboard_api
node_dashboard_api -->|"requests through"| node_axios
node_visitor -->|"opens"| node_referrals_page
node_referrals_page -->|"loads referrals"| node_referrals_hook
node_referrals_page -->|"renders"| node_search_bar
node_referrals_page -->|"renders results"| node_referral_table
node_referrals_hook -->|"queries"| node_referrals_api
node_referrals_api -->|"requests through"| node_axios
node_visitor -->|"opens"| node_tree_page
node_tree_page -->|"renders"| node_tree_view
node_tree_view -->|"loads tree"| node_tree_hook
node_tree_view -->|"renders nodes"| node_tree_node
node_tree_view -->|"renders progress"| node_level_progress
node_tree_hook -->|"queries"| node_tree_api
node_tree_api -->|"requests through"| node_axios

click node_login_page "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/login/page.tsx"
click node_dashboard_layout "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/layout.tsx"
click node_dashboard_page "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/page.tsx"
click node_referrals_page "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/referrals/page.tsx"
click node_tree_page "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/network-tree/page.tsx"
click node_login_form "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/components/LoginForm.tsx"
click node_login_validation "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/schemas/loginSchema.ts"
click node_login_hook "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/hooks/useLogin.ts"
click node_auth_api "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/api/authApi.ts"
click node_auth_state "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/store/authStore.ts"
click node_dashboard_stats "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/hooks/useDashboardStats.ts"
click node_dashboard_api "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/api/dashboardApi.ts"
click node_stat_card "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/components/StatCard.tsx"
click node_referrals_hook "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/hooks/useReferrals.ts"
click node_referrals_api "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/api/referralsApi.ts"
click node_referral_table "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/components/ReferralTable.tsx"
click node_search_bar "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/components/SearchBar.tsx"
click node_tree_view "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/components/NetworkTreeView.tsx"
click node_tree_node "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/components/TreeNode.tsx"
click node_level_progress "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/components/LevelProgress.tsx"
click node_tree_hook "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/hooks/useNetworkTree.ts"
click node_tree_api "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/api/networkTreeApi.ts"
click node_header "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/layout/Header.tsx"
click node_sidebar "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/layout/Sidebar.tsx"
click node_profile_menu "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/components/ProfileMenu.tsx"
click node_axios "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/lib/axiosClient.ts"
click node_query_client "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/lib/queryClient.ts"
click node_login_input "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/ui/Input.tsx"
click node_button "https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/ui/Button.tsx"

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_login_page,node_dashboard_layout,node_dashboard_page,node_referrals_page,node_tree_page toneBlue
class node_login_form,node_login_validation,node_login_hook,node_auth_api,node_auth_state toneAmber
class node_dashboard_stats,node_dashboard_api,node_stat_card,node_referrals_hook,node_referrals_api,node_referral_table,node_search_bar,node_backend toneMint
class node_tree_view,node_tree_node,node_level_progress,node_tree_hook,node_tree_api toneRose
class node_header,node_sidebar,node_profile_menu,node_axios,node_query_client,node_login_input,node_button,node_visitor toneIndigo
```

## Components

### Application

- [Login route](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Dashboard shell](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/layout.tsx): `src/app/dashboard/layout.tsx`
- [Dashboard page](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Referrals page](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/referrals/page.tsx): `src/app/dashboard/referrals/page.tsx`
- [Network page](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/app/dashboard/network-tree/page.tsx): `src/app/dashboard/network-tree/page.tsx`

### Authentication

- [Login form](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/components/LoginForm.tsx): `src/features/auth/components/LoginForm.tsx`
- [Login validation](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/schemas/loginSchema.ts): `src/features/auth/schemas/loginSchema.ts`
- [Login mutation](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/hooks/useLogin.ts): `src/features/auth/hooks/useLogin.ts`
- [Authentication API](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/auth/api/authApi.ts): `src/features/auth/api/authApi.ts`
- [Session state](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/store/authStore.ts): `src/shared/store/authStore.ts`

### Member data

- [Dashboard stats](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/hooks/useDashboardStats.ts): `src/features/dashboard/hooks/useDashboardStats.ts`
- [Stats API](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/api/dashboardApi.ts): `src/features/dashboard/api/dashboardApi.ts`
- [Stat cards](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/components/StatCard.tsx): `src/features/dashboard/components/StatCard.tsx`
- [Referrals query](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/hooks/useReferrals.ts): `src/features/referrals/hooks/useReferrals.ts`
- [Referrals API](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/api/referralsApi.ts): `src/features/referrals/api/referralsApi.ts`
- [Referral table](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/components/ReferralTable.tsx): `src/features/referrals/components/ReferralTable.tsx`
- [Referral search](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/referrals/components/SearchBar.tsx): `src/features/referrals/components/SearchBar.tsx`

### Network views

- [Tree view](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/components/NetworkTreeView.tsx): `src/features/network-tree/components/NetworkTreeView.tsx`
- [Tree node](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/components/TreeNode.tsx): `src/features/network-tree/components/TreeNode.tsx`
- [Level progress](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/components/LevelProgress.tsx): `src/features/network-tree/components/LevelProgress.tsx`
- [Tree query](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/hooks/useNetworkTree.ts): `src/features/network-tree/hooks/useNetworkTree.ts`
- [Network tree API](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/network-tree/api/networkTreeApi.ts): `src/features/network-tree/api/networkTreeApi.ts`

### Shared services

- [Header](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/layout/Header.tsx): `src/shared/components/layout/Header.tsx`
- [Sidebar](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/layout/Sidebar.tsx): `src/shared/components/layout/Sidebar.tsx`
- [Profile menu](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/features/dashboard/components/ProfileMenu.tsx): `src/features/dashboard/components/ProfileMenu.tsx`
- [HTTP client](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/lib/axiosClient.ts): `src/shared/lib/axiosClient.ts`
- [Query defaults](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/lib/queryClient.ts): `src/shared/lib/queryClient.ts`
- [Text input](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/ui/Input.tsx): `src/shared/components/ui/Input.tsx`
- [Button](https://github.com/harsha-vardhan-03/srishti-cds/blob/main/src/shared/components/ui/Button.tsx): `src/shared/components/ui/Button.tsx`

### Other components

- **Member**
- **API service**

## Connections

- Member → Login route: opens
- Login route → Login form: renders (evidence: `src/app/login/page.tsx`)
- Login form → Login validation: validates with (evidence: `src/features/auth/components/LoginForm.tsx`)
- Login form → Login mutation: submits through (evidence: `src/features/auth/components/LoginForm.tsx`)
- Login form → Text input: uses (evidence: `src/features/auth/components/LoginForm.tsx`)
- Login form → Button: uses (evidence: `src/features/auth/components/LoginForm.tsx`)
- Login mutation → Authentication API: calls (evidence: `src/features/auth/hooks/useLogin.ts`)
- Authentication API → HTTP client: requests through (evidence: `src/features/auth/api/authApi.ts`)
- Login mutation → Session state: stores session (evidence: `src/features/auth/hooks/useLogin.ts`)
- Login mutation → Dashboard page: navigates to (evidence: `src/features/auth/hooks/useLogin.ts`)
- HTTP client → API service: sends requests (evidence: `src/shared/lib/axiosClient.ts`)
- Member → Dashboard shell: opens
- Dashboard shell → Header: renders (evidence: `src/app/dashboard/layout.tsx`)
- Dashboard shell → Sidebar: renders (evidence: `src/app/dashboard/layout.tsx`)
- Header → Profile menu: renders (evidence: `src/shared/components/layout/Header.tsx`)
- Sidebar → Session state: reads session (evidence: `src/shared/components/layout/Sidebar.tsx`)
- Profile menu → Session state: reads session (evidence: `src/features/dashboard/components/ProfileMenu.tsx`)
- Dashboard page → Dashboard stats: loads stats (evidence: `src/app/dashboard/page.tsx`)
- Dashboard page → Session state: reads member (evidence: `src/app/dashboard/page.tsx`)
- Dashboard page → Stat cards: renders (evidence: `src/app/dashboard/page.tsx`)
- Dashboard stats → Stats API: queries (evidence: `src/features/dashboard/hooks/useDashboardStats.ts`)
- Stats API → HTTP client: requests through (evidence: `src/features/dashboard/api/dashboardApi.ts`)
- Member → Referrals page: opens
- Referrals page → Referrals query: loads referrals (evidence: `src/app/dashboard/referrals/page.tsx`)
- Referrals page → Referral search: renders (evidence: `src/app/dashboard/referrals/page.tsx`)
- Referrals page → Referral table: renders results (evidence: `src/app/dashboard/referrals/page.tsx`)
- Referrals query → Referrals API: queries (evidence: `src/features/referrals/hooks/useReferrals.ts`)
- Referrals API → HTTP client: requests through (evidence: `src/features/referrals/api/referralsApi.ts`)
- Member → Network page: opens
- Network page → Tree view: renders (evidence: `src/app/dashboard/network-tree/page.tsx`)
- Tree view → Tree query: loads tree (evidence: `src/features/network-tree/components/NetworkTreeView.tsx`)
- Tree view → Tree node: renders nodes (evidence: `src/features/network-tree/components/NetworkTreeView.tsx`)
- Tree view → Level progress: renders progress (evidence: `src/features/network-tree/components/NetworkTreeView.tsx`)
- Tree query → Network tree API: queries (evidence: `src/features/network-tree/hooks/useNetworkTree.ts`)
- Network tree API → HTTP client: requests through (evidence: `src/features/network-tree/api/networkTreeApi.ts`)
