# gohitha6nadikota/dealer-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/gohitha6nadikota/dealer-pulse
- Repository: https://github.com/gohitha6nadikota/dealer-pulse

## Overview

DealerPulse is a server-rendered dealership performance dashboard for executives and branch managers. Users choose URL-backed date and branch filters, then inspect the overview, branch or sales-officer details, funnel outlook, and prioritized lead actions; lead timelines support follow-up. The documented server workflow loads, validates and enriches the dataset before analytics build page view models for rendering. The graph preserves the documented funnel, segmentation, status-conflict and action capabilities. Unsampled implementation links are shown only where the README documents them.

Main entry points: [`app/reps/[id]/page.tsx`](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/reps/%5Bid%5D/page.tsx) (Officer detail), [`app/page.tsx`](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/page.tsx) (Overview page), [`app/branches/[id]/page.tsx`](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/branches/%5Bid%5D/page.tsx) (Branch detail), [`app/funnel/page.tsx`](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/funnel/page.tsx) (Funnel outlook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Dashboard pages"]
  node_overview["Overview page<br/>[page.tsx]"]
  node_branches["Branch directory<br/>[page.tsx]"]
  node_branch["Branch detail<br/>[page.tsx]"]
  node_rep["Officer detail<br/>[page.tsx]"]
  node_funnelpage["Funnel outlook<br/>[page.tsx]"]
  node_actionpage["Action Center<br/>[page.tsx]"]
end

subgraph group_analytics["Analytics and data"]
  node_dataset["Dataset loader<br/>[data.ts]"]
  node_validation["Validation and enrichment<br/>[validate.ts]"]
  node_scope["Shared scope metrics<br/>[scope.ts]"]
  node_overviewmodel["Overview view model<br/>[overview.ts]"]
  node_branchmodel["Branch view model<br/>[branch-view.ts]"]
  node_repmodel["Officer view model<br/>[rep-view.ts]"]
  node_funnelmodel["Funnel analytics<br/>[funnel-view.ts]"]
  node_segments["Lead segmentation<br/>[segments.ts]"]
  node_conflicts["Status conflicts"]
  node_actionmodel["Action prioritization<br/>[action-center.ts]"]
end

subgraph group_views["Rendered views"]
  node_dashboardui["Dashboard summaries<br/>[kpi-strip.tsx]"]
  node_funnelui["Funnel displays"]
  node_segmentui["Lead source views<br/>[lead-sources.tsx]"]
  node_actionui["Action list<br/>[action-table.tsx]"]
  node_leadui["Lead table and timeline<br/>[lead-table.tsx]"]
end

subgraph group_interaction["Filters and drill-down"]
  node_filters["URL filter parsing<br/>[filters.ts]"]
  node_actionparams["Action filters<br/>[action-params.ts]"]
  node_filterui["Filter controls<br/>[filter-bar.tsx]"]
end

node_manager(("Dashboard user"))

node_manager -->|"opens dashboard"| node_overview
node_manager -->|"browses branches"| node_branches
node_manager -->|"reviews outlook"| node_funnelpage
node_manager -->|"reviews actions"| node_actionpage
node_overview -->|"loads data"| node_dataset
node_branch -->|"loads data"| node_dataset
node_rep -->|"loads data"| node_dataset
node_funnelpage -.->|"loads data"| node_dataset
node_actionpage -->|"loads data"| node_dataset
node_dataset -->|"validates and enriches"| node_validation
node_overview -->|"parses URL"| node_filters
node_branch -->|"parses URL"| node_filters
node_rep -->|"parses URL"| node_filters
node_actionpage -->|"parses URL"| node_filters
node_actionpage -->|"parses action filters"| node_actionparams
node_overview -->|"builds view"| node_overviewmodel
node_branch -->|"builds view"| node_branchmodel
node_rep -->|"builds view"| node_repmodel
node_actionpage -->|"builds actions"| node_actionmodel
node_overviewmodel -->|"uses shared metrics"| node_scope
node_branchmodel -->|"uses shared metrics"| node_scope
node_repmodel -->|"uses shared metrics"| node_scope
node_overview -->|"renders summaries"| node_dashboardui
node_branch -->|"renders summaries"| node_dashboardui
node_rep -->|"renders summaries"| node_dashboardui
node_funnelpage -.->|"builds funnel view"| node_funnelmodel
node_funnelpage -.->|"shows segments"| node_segments
node_funnelpage -.->|"renders reconciliation"| node_funnelui
node_funnelpage -.->|"renders sources"| node_segmentui
node_overview -->|"shows conflict notice"| node_conflicts
node_rep -->|"shows conflict notice"| node_conflicts
node_branch -->|"renders open leads"| node_leadui
node_rep -->|"renders assigned leads"| node_leadui
node_actionpage -->|"renders actions"| node_actionui
node_overview -.->|"renders filters"| node_filterui
node_branch -->|"renders filters"| node_filterui
node_rep -->|"renders filters"| node_filterui

click node_overview "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/page.tsx"
click node_branches "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/branches/page.tsx"
click node_branch "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/branches/%5Bid%5D/page.tsx"
click node_rep "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/reps/%5Bid%5D/page.tsx"
click node_funnelpage "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/funnel/page.tsx"
click node_actionpage "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/actions/page.tsx"
click node_dataset "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/data.ts"
click node_validation "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/validate.ts"
click node_filters "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/filters.ts"
click node_actionparams "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/action-params.ts"
click node_scope "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/scope.ts"
click node_overviewmodel "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/overview.ts"
click node_branchmodel "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/branch-view.ts"
click node_repmodel "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/rep-view.ts"
click node_funnelmodel "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/funnel-view.ts"
click node_segments "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/segments.ts"
click node_conflicts "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/status-conflicts.ts"
click node_actionmodel "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/action-center.ts"
click node_dashboardui "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/dashboard/kpi-strip.tsx"
click node_funnelui "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/funnel/reconciliation-table.tsx"
click node_segmentui "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/segments/lead-sources.tsx"
click node_actionui "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/actions/action-table.tsx"
click node_leadui "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/leads/lead-table.tsx"
click node_filterui "https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/filters/filter-bar.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_overview,node_branches,node_branch,node_rep,node_funnelpage,node_actionpage,node_manager toneBlue
class node_dataset,node_validation,node_scope,node_overviewmodel,node_branchmodel,node_repmodel,node_funnelmodel,node_segments,node_conflicts,node_actionmodel toneAmber
class node_dashboardui,node_funnelui,node_segmentui,node_actionui,node_leadui toneMint
class node_filters,node_actionparams,node_filterui toneRose
```

## Components

### Dashboard pages

- [Overview page](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/page.tsx): `app/page.tsx`
- [Branch directory](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/branches/page.tsx): `app/branches/page.tsx`
- [Branch detail](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/branches/%5Bid%5D/page.tsx): `app/branches/[id]/page.tsx`
- [Officer detail](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/reps/%5Bid%5D/page.tsx): `app/reps/[id]/page.tsx`
- [Funnel outlook](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/funnel/page.tsx): `app/funnel/page.tsx`
- [Action Center](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/app/actions/page.tsx): `app/actions/page.tsx`

### Analytics and data

- [Dataset loader](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/data.ts): `lib/data.ts`
- [Validation and enrichment](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/validate.ts): `lib/analytics/validate.ts`
- [Shared scope metrics](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/scope.ts): `lib/analytics/scope.ts`
- [Overview view model](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/overview.ts): `lib/analytics/overview.ts`
- [Branch view model](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/branch-view.ts): `lib/analytics/branch-view.ts`
- [Officer view model](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/rep-view.ts): `lib/analytics/rep-view.ts`
- [Funnel analytics](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/funnel-view.ts): `lib/analytics/funnel-view.ts`
- [Lead segmentation](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/segments.ts): `lib/analytics/segments.ts`
- [Status conflicts](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/status-conflicts.ts): `lib/analytics/status-conflicts.ts`
- [Action prioritization](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/analytics/action-center.ts): `lib/analytics/action-center.ts`

### Rendered views

- [Dashboard summaries](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/dashboard/kpi-strip.tsx): `components/dashboard/kpi-strip.tsx`
- [Funnel displays](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/funnel/reconciliation-table.tsx): `components/funnel/reconciliation-table.tsx`
- [Lead source views](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/segments/lead-sources.tsx): `components/segments/lead-sources.tsx`
- [Action list](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/actions/action-table.tsx): `components/actions/action-table.tsx`
- [Lead table and timeline](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/leads/lead-table.tsx): `components/leads/lead-table.tsx`

### Filters and drill-down

- [URL filter parsing](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/filters.ts): `lib/filters.ts`
- [Action filters](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/lib/action-params.ts): `lib/action-params.ts`
- [Filter controls](https://github.com/gohitha6nadikota/dealer-pulse/blob/main/components/filters/filter-bar.tsx): `components/filters/filter-bar.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Overview page: opens dashboard (evidence: `README.md`)
- Dashboard user → Branch directory: browses branches (evidence: `README.md`)
- Dashboard user → Funnel outlook: reviews outlook (evidence: `README.md`)
- Dashboard user → Action Center: reviews actions (evidence: `README.md`)
- Overview page → Dataset loader: loads data (evidence: `README.md`)
- Branch detail → Dataset loader: loads data (evidence: `README.md`)
- Officer detail → Dataset loader: loads data (evidence: `README.md`)
- Funnel outlook → Dataset loader: loads data
- Action Center → Dataset loader: loads data (evidence: `app/actions/page.tsx`)
- Dataset loader → Validation and enrichment: validates and enriches (evidence: `README.md`)
- Overview page → URL filter parsing: parses URL (evidence: `app/page.tsx`)
- Branch detail → URL filter parsing: parses URL (evidence: `app/branches/[id]/page.tsx`)
- Officer detail → URL filter parsing: parses URL (evidence: `app/reps/[id]/page.tsx`)
- Action Center → URL filter parsing: parses URL (evidence: `app/actions/page.tsx`)
- Action Center → Action filters: parses action filters (evidence: `app/actions/page.tsx`)
- Overview page → Overview view model: builds view (evidence: `app/page.tsx`)
- Branch detail → Branch view model: builds view (evidence: `app/branches/[id]/page.tsx`)
- Officer detail → Officer view model: builds view (evidence: `app/reps/[id]/page.tsx`)
- Action Center → Action prioritization: builds actions (evidence: `app/actions/page.tsx`)
- Overview view model → Shared scope metrics: uses shared metrics (evidence: `lib/analytics/scope.ts`)
- Branch view model → Shared scope metrics: uses shared metrics (evidence: `lib/analytics/scope.ts`)
- Officer view model → Shared scope metrics: uses shared metrics (evidence: `lib/analytics/scope.ts`)
- Overview page → Dashboard summaries: renders summaries (evidence: `app/page.tsx`)
- Branch detail → Dashboard summaries: renders summaries (evidence: `app/branches/[id]/page.tsx`)
- Officer detail → Dashboard summaries: renders summaries (evidence: `app/reps/[id]/page.tsx`)
- Funnel outlook → Funnel analytics: builds funnel view
- Funnel outlook → Lead segmentation: shows segments
- Funnel outlook → Funnel displays: renders reconciliation
- Funnel outlook → Lead source views: renders sources
- Overview page → Status conflicts: shows conflict notice (evidence: `app/page.tsx`)
- Officer detail → Status conflicts: shows conflict notice (evidence: `app/reps/[id]/page.tsx`)
- Branch detail → Lead table and timeline: renders open leads (evidence: `app/branches/[id]/page.tsx`)
- Officer detail → Lead table and timeline: renders assigned leads (evidence: `app/reps/[id]/page.tsx`)
- Action Center → Action list: renders actions (evidence: `app/actions/page.tsx`)
- Overview page → Filter controls: renders filters (evidence: `app/page.tsx`)
- Branch detail → Filter controls: renders filters (evidence: `app/branches/[id]/page.tsx`)
- Officer detail → Filter controls: renders filters (evidence: `app/reps/[id]/page.tsx`)
