# jinendra/crm-dashboard-react architecture

> Architecture diagram of the GitHub repository jinendra/crm-dashboard-react, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jinendra/crm-dashboard-react
- Repository: https://github.com/jinendra/crm-dashboard-react

## Overview

#### Purpose and Runtime

CRM Pro Dashboard is a client-side CRM/sales dashboard. It presents sales metrics, charts, customer views, and placeholder navigation sections using React 18, TypeScript, Tailwind CSS, Recharts, and Lucide icons. No backend, authentication, persistence, or external API integration is present; the application operates from bundled mock data.

Entry/bootstrap paths:
- `src/index.tsx`
- `src/App.tsx`
- `index.html`

#### Application Shell and Navigation

`App.tsx` is the primary composition and view-selection boundary. It owns the active section state and renders the application shell rather than using a routing library. `Sidebar.tsx` supplies collapsible navigation and communicates section selection upward; `App.tsx` conditionally selects dashboard, customer management, settings, or other section content.

Paths:
- `src/App.tsx`
- `src/components/Sidebar.tsx`
- `src/components/Settings.tsx`

#### Dashboard Analytics Stage

The dashboard is the main reporting surface. It transforms supplied CRM aggregates into KPI cards, revenue trends, pipeline distribution, recent activity, and team-performance UI. Recharts is the visualization boundary: React components configure/render charts, while mock data supplies the series and categories.

Paths:
- `src/components/Dashboard.tsx`
- `src/components/MetricCard.tsx`
- `src/data/mockData.ts`

#### Customer Management Workflow

Customer management is a local CRUD-style interface composed from list, detail, add, edit, and delete-confirmation views. Its state/control flow is expected to remain inside the React component hierarchy: selection from the list drives detail/edit views, while add/edit/delete actions update in-memory customer state. There is no indicated repository layer or remote persistence boundary.

Paths:
- `src/components/CustomerManagement.tsx`
- `src/components/CustomerList.tsx`
- `src/components/AddCustomer.tsx`

#### Customer Detail and Mutation Boundaries

Customer inspection and mutation are deliberately separated into focused presentation/dialog components. `CustomerDetails.tsx` displays the selected entity; `EditCustomer.tsx` collects changes; `DeleteConfirmation.tsx` gates destructive operations. The parent management component should remain the authority for customer collection state and callback orchestration.

Paths:
- `src/components/CustomerDetails.tsx`
- `src/components/EditCustomer.tsx`
- `src/components/DeleteConfirmation.tsx`

#### Data Contract Boundary

CRM domain shapes are centralized in TypeScript definitions and instantiated by static sample data. Components should consume these contracts rather than introduce ad hoc entity shapes. Replacing `mockData.ts` with API adapters is the main future integration seam, while `src/types/index.ts` should remain the shared UI/domain contract.

Paths:
- `src/types/index.ts`
- `src/data/mockData.ts`

#### Styling, Build, and Delivery

Global CSS and Tailwind establish the visual system, including responsive and dashboard-specific styling. The repository is Vite-based, despite README references to Create React App; `vite.config.ts` and the presence of `src/index.tsx` define the material build/runtime setup. Node/npm provides local development and production bundling.

Paths:
- `src/index.css`
- `tailwind.config.js`
- `vite.config.ts`

Main entry points: [`src/components/CustomerManagement.tsx`](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerManagement.tsx) (Customer state controller), [`src/App.tsx`](https://github.com/jinendra/crm-dashboard-react/blob/main/src/App.tsx) (App view controller), [`src/components/Dashboard.tsx`](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Dashboard.tsx) (Dashboard reporting), [`src/types/index.ts`](https://github.com/jinendra/crm-dashboard-react/blob/main/src/types/index.ts) (CRM contracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Client Runtime"]
  node_html["HTML host<br/>document<br/>[index.html]"]
  node_bootstrap["React bootstrap<br/>entrypoint<br/>[index.tsx]"]
end

subgraph group_shell["Application Shell"]
  node_app["App view controller<br/>React composition<br/>[App.tsx]"]
  node_sidebar["Sidebar navigation<br/>React component<br/>[Sidebar.tsx]"]
  node_settings["Settings view<br/>React component<br/>[Settings.tsx]"]
end

subgraph group_dashboard["Dashboard Analytics"]
  node_dashboard_view["Dashboard reporting<br/>React component<br/>[Dashboard.tsx]"]
  node_metric_card["KPI cards<br/>React component<br/>[MetricCard.tsx]"]
  node_recharts{{"Recharts<br/>chart library"}}
end

subgraph group_customers["Customer Management"]
  node_customer_management["Customer state controller<br/>React container"]
  node_customer_list["Customer list<br/>React component<br/>[CustomerList.tsx]"]
  node_add_customer["Add customer<br/>React form<br/>[AddCustomer.tsx]"]
  node_customer_details["Customer details<br/>React component"]
  node_edit_customer["Edit customer<br/>React dialog<br/>[EditCustomer.tsx]"]
  node_delete_confirmation["Delete confirmation<br/>React dialog"]
end

subgraph group_data["Data Contract"]
  node_types["CRM contracts<br/>TypeScript types<br/>[index.ts]"]
  node_mock_data[("Bundled mock data<br/>static data<br/>[mockData.ts]")]
end

subgraph group_delivery["Build &amp; Styling"]
  node_global_css["Global visual system<br/>CSS<br/>[index.css]"]
  node_tailwind["Tailwind configuration<br/>style config<br/>[tailwind.config.js]"]
  node_vite{{"Vite build runtime<br/>build config<br/>[vite.config.ts]"}}
end

node_html -->|"hosts"| node_bootstrap
node_bootstrap -->|"mounts"| node_app
node_bootstrap -->|"loads"| node_global_css
node_vite -->|"serves/bundles"| node_html
node_tailwind -->|"generates utilities for"| node_global_css
node_app -->|"renders"| node_sidebar
node_sidebar -->|"section selection"| node_app
node_app -->|"selects dashboard"| node_dashboard_view
node_app -->|"selects customers"| node_customer_management
node_app -->|"selects settings"| node_settings
node_dashboard_view -->|"composes"| node_metric_card
node_dashboard_view -->|"configures charts"| node_recharts
node_mock_data -->|"supplies aggregates"| node_dashboard_view
node_types -->|"defines data shapes"| node_mock_data
node_types -.->|"contracts"| node_dashboard_view
node_mock_data -->|"seeds customers"| node_customer_management
node_types -.->|"contracts"| node_customer_management
node_customer_management -->|"provides collection"| node_customer_list
node_customer_list -->|"selects customer"| node_customer_management
node_customer_management -->|"orchestrates create"| node_add_customer
node_customer_management -->|"shows selected"| node_customer_details
node_customer_management -->|"orchestrates update"| node_edit_customer
node_customer_management -->|"orchestrates delete"| node_delete_confirmation

click node_html "https://github.com/jinendra/crm-dashboard-react/blob/main/index.html"
click node_bootstrap "https://github.com/jinendra/crm-dashboard-react/blob/main/src/index.tsx"
click node_app "https://github.com/jinendra/crm-dashboard-react/blob/main/src/App.tsx"
click node_sidebar "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Sidebar.tsx"
click node_settings "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Settings.tsx"
click node_dashboard_view "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Dashboard.tsx"
click node_metric_card "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/MetricCard.tsx"
click node_customer_management "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerManagement.tsx"
click node_customer_list "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerList.tsx"
click node_add_customer "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/AddCustomer.tsx"
click node_customer_details "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerDetails.tsx"
click node_edit_customer "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/EditCustomer.tsx"
click node_delete_confirmation "https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/DeleteConfirmation.tsx"
click node_types "https://github.com/jinendra/crm-dashboard-react/blob/main/src/types/index.ts"
click node_mock_data "https://github.com/jinendra/crm-dashboard-react/blob/main/src/data/mockData.ts"
click node_global_css "https://github.com/jinendra/crm-dashboard-react/blob/main/src/index.css"
click node_tailwind "https://github.com/jinendra/crm-dashboard-react/blob/main/tailwind.config.js"
click node_vite "https://github.com/jinendra/crm-dashboard-react/blob/main/vite.config.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_html,node_bootstrap toneBlue
class node_app,node_sidebar,node_settings toneAmber
class node_dashboard_view,node_metric_card,node_recharts toneMint
class node_customer_management,node_customer_list,node_add_customer,node_customer_details,node_edit_customer,node_delete_confirmation toneRose
class node_types,node_mock_data toneIndigo
class node_global_css,node_tailwind,node_vite toneTeal
```

## Components

### Client Runtime

- [HTML host](https://github.com/jinendra/crm-dashboard-react/blob/main/index.html): document · `index.html`
- [React bootstrap](https://github.com/jinendra/crm-dashboard-react/blob/main/src/index.tsx): entrypoint · `src/index.tsx`

### Application Shell

- [App view controller](https://github.com/jinendra/crm-dashboard-react/blob/main/src/App.tsx): React composition · Owns active-section state and conditional view selection. · `src/App.tsx`
- [Sidebar navigation](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Sidebar.tsx): React component · Reports selected sections to App. · `src/components/Sidebar.tsx`
- [Settings view](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Settings.tsx): React component · `src/components/Settings.tsx`

### Dashboard Analytics

- [Dashboard reporting](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/Dashboard.tsx): React component · Composes KPI, activity, pipeline, trend, and team reporting. · `src/components/Dashboard.tsx`
- [KPI cards](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/MetricCard.tsx): React component · `src/components/MetricCard.tsx`
- **Recharts**: chart library · Visualization rendering boundary.

### Customer Management

- [Customer state controller](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerManagement.tsx): React container · Owns in-memory customer collection and mutation callbacks. · `src/components/CustomerManagement.tsx`
- [Customer list](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerList.tsx): React component · Selection drives detail and edit flows. · `src/components/CustomerList.tsx`
- [Add customer](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/AddCustomer.tsx): React form · `src/components/AddCustomer.tsx`
- [Customer details](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/CustomerDetails.tsx): React component · `src/components/CustomerDetails.tsx`
- [Edit customer](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/EditCustomer.tsx): React dialog · `src/components/EditCustomer.tsx`
- [Delete confirmation](https://github.com/jinendra/crm-dashboard-react/blob/main/src/components/DeleteConfirmation.tsx): React dialog · Gates destructive customer actions. · `src/components/DeleteConfirmation.tsx`

### Data Contract

- [CRM contracts](https://github.com/jinendra/crm-dashboard-react/blob/main/src/types/index.ts): TypeScript types · Shared UI and domain entity shapes. · `src/types/index.ts`
- [Bundled mock data](https://github.com/jinendra/crm-dashboard-react/blob/main/src/data/mockData.ts): static data · Primary future API-adapter seam. · `src/data/mockData.ts`

### Build & Styling

- [Global visual system](https://github.com/jinendra/crm-dashboard-react/blob/main/src/index.css): CSS · `src/index.css`
- [Tailwind configuration](https://github.com/jinendra/crm-dashboard-react/blob/main/tailwind.config.js): style config · `tailwind.config.js`
- [Vite build runtime](https://github.com/jinendra/crm-dashboard-react/blob/main/vite.config.ts): build config · Drives local development and production bundling. · `vite.config.ts`

## Connections

- HTML host → React bootstrap: hosts
- React bootstrap → App view controller: mounts
- React bootstrap → Global visual system: loads
- Vite build runtime → HTML host: serves/bundles
- Tailwind configuration → Global visual system: generates utilities for
- App view controller → Sidebar navigation: renders
- Sidebar navigation → App view controller: section selection
- App view controller → Dashboard reporting: selects dashboard
- App view controller → Customer state controller: selects customers
- App view controller → Settings view: selects settings
- Dashboard reporting → KPI cards: composes
- Dashboard reporting → Recharts: configures charts
- Bundled mock data → Dashboard reporting: supplies aggregates
- CRM contracts → Bundled mock data: defines data shapes
- CRM contracts → Dashboard reporting: contracts
- Bundled mock data → Customer state controller: seeds customers
- CRM contracts → Customer state controller: contracts
- Customer state controller → Customer list: provides collection
- Customer list → Customer state controller: selects customer
- Customer state controller → Add customer: orchestrates create
- Customer state controller → Customer details: shows selected
- Customer state controller → Edit customer: orchestrates update
- Customer state controller → Delete confirmation: orchestrates delete
