# vanshita-vilas-parab/lead-management-crm architecture

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

- Interactive diagram: https://gitdiagram.com/vanshita-vilas-parab/lead-management-crm
- Repository: https://github.com/vanshita-vilas-parab/lead-management-crm

## Overview

Lead Management CRM lets users create and maintain sales leads, inspect them in a table, search by name/email/company, filter by pipeline status, and track status from New through Lost. The browser app in App coordinates listing and form state; form and table actions use the Axios client to reach Express CRUD routes, which operate on the Mongoose Lead model in MongoDB. The README documents single-lead retrieval and the status stages. Source excerpts establish the frontend calls and backend route/model wiring; no separate database connection beyond the server configuration is inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/App.jsx) (Workspace coordinator), [`frontend/src/api/leadApi.js`](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/api/leadApi.js) (Axios client), [`backend/server.js`](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/server.js) (Express server), [`frontend/src/components/LeadForm.jsx`](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/LeadForm.jsx) (Lead editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Lead workspace"]
  node_app["Workspace coordinator<br/>[App.jsx]"]
  node_navbar["Navigation bar<br/>[Navbar.jsx]"]
  node_form["Lead editor<br/>[LeadForm.jsx]"]
  node_table["Lead table<br/>[LeadTable.jsx]"]
  node_client["Axios client<br/>[leadApi.js]"]
end

subgraph group_api["Lead API"]
  node_server["Express server<br/>[server.js]"]
  node_routes["CRUD and filtering<br/>[leads.js]"]
end

subgraph group_data["Lead persistence"]
  node_model["Lead schema<br/>[Lead.js]"]
  node_mongo[("MongoDB")]
end

node_user(("CRM user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_form
node_app -->|"renders"| node_table
node_app -->|"fetches leads"| node_client
node_form -->|"creates or updates"| node_client
node_table -->|"deletes leads"| node_client
node_client -.->|"HTTP requests"| node_server
node_server -->|"mounts routes"| node_routes
node_routes -->|"queries and mutates"| node_model
node_server -->|"connects"| node_mongo

click node_app "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/Navbar.jsx"
click node_form "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/LeadForm.jsx"
click node_table "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/LeadTable.jsx"
click node_client "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/api/leadApi.js"
click node_server "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/server.js"
click node_routes "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/routes/leads.js"
click node_model "https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/models/Lead.js"

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_app,node_navbar,node_form,node_table,node_client,node_user toneBlue
class node_server,node_routes toneAmber
class node_model,node_mongo toneMint
```

## Components

### Lead workspace

- [Workspace coordinator](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation bar](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Lead editor](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/LeadForm.jsx): `frontend/src/components/LeadForm.jsx`
- [Lead table](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/components/LeadTable.jsx): `frontend/src/components/LeadTable.jsx`
- [Axios client](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/frontend/src/api/leadApi.js): `frontend/src/api/leadApi.js`

### Lead API

- [Express server](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/server.js): `backend/server.js`
- [CRUD and filtering](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/routes/leads.js): `backend/routes/leads.js`

### Lead persistence

- [Lead schema](https://github.com/vanshita-vilas-parab/lead-management-crm/blob/main/backend/models/Lead.js): `backend/models/Lead.js`
- **MongoDB**

### Other components

- **CRM user**

## Connections

- CRM user → Workspace coordinator: uses (evidence: `README.md`)
- Workspace coordinator → Navigation bar: renders (evidence: `frontend/src/App.jsx`)
- Workspace coordinator → Lead editor: renders (evidence: `frontend/src/App.jsx`)
- Workspace coordinator → Lead table: renders (evidence: `frontend/src/App.jsx`)
- Workspace coordinator → Axios client: fetches leads (evidence: `frontend/src/App.jsx`)
- Lead editor → Axios client: creates or updates (evidence: `frontend/src/components/LeadForm.jsx`)
- Lead table → Axios client: deletes leads (evidence: `frontend/src/components/LeadTable.jsx`)
- Axios client → Express server: HTTP requests
- Express server → CRUD and filtering: mounts routes (evidence: `backend/server.js`)
- CRUD and filtering → Lead schema: queries and mutates (evidence: `backend/routes/leads.js`)
- Express server → MongoDB: connects (evidence: `backend/server.js`)
