# rohin-kbs/lead-generator architecture

> Architecture diagram of the GitHub repository rohin-kbs/lead-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohin-kbs/lead-generator
- Repository: https://github.com/rohin-kbs/lead-generator

## Overview

LeadGen Pro is a browser-based lead-generation interface. A user enters a job title, country, remote preference, and desired lead count; the form validates these criteria and POSTs them to a configurable n8n webhook. It maps the returned records into lead fields, then renders them in a detailed, scrollable table with links to company and Apollo pages. The sampled code shows no in-repository generation engine or persistent lead store: lead generation is delegated to the external webhook. The map focuses on this workflow and its UI components.

Main entry points: [`components/lead-form.tsx`](https://github.com/rohin-kbs/lead-generator/blob/main/components/lead-form.tsx) (Lead Form), [`components/leads-table.tsx`](https://github.com/rohin-kbs/lead-generator/blob/main/components/leads-table.tsx) (Lead Results), [`app/page.tsx`](https://github.com/rohin-kbs/lead-generator/blob/main/app/page.tsx) (Home Page), [`components/ui/card.tsx`](https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/card.tsx) (Card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Lead Workflow"]
  node_home["Home Page<br/>[page.tsx]"]
  node_form["Lead Form<br/>[lead-form.tsx]"]
  node_webhook{{"n8n Webhook"}}
end

subgraph group_presentation["Results Presentation"]
  node_leads["Lead Results<br/>[leads-table.tsx]"]
end

subgraph group_ui["UI Components"]
  node_form_controls["Form Controls<br/>[input.tsx]"]
  node_table_controls["Table Controls<br/>[table.tsx]"]
  node_button["Button<br/>[button.tsx]"]
  node_card["Card<br/>[card.tsx]"]
end

node_user(("Lead Seeker"))

node_user -->|"opens"| node_home
node_home -->|"renders"| node_form
node_form -->|"POSTs criteria"| node_webhook
node_webhook -->|"returns leads"| node_form
node_form -->|"passes leads"| node_leads
node_form -->|"renders inputs"| node_form_controls
node_form -->|"renders submit"| node_button
node_form -->|"uses card"| node_card
node_leads -->|"renders rows"| node_table_controls
node_leads -->|"uses card"| node_card

click node_home "https://github.com/rohin-kbs/lead-generator/blob/main/app/page.tsx"
click node_form "https://github.com/rohin-kbs/lead-generator/blob/main/components/lead-form.tsx"
click node_leads "https://github.com/rohin-kbs/lead-generator/blob/main/components/leads-table.tsx"
click node_form_controls "https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/input.tsx"
click node_table_controls "https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/table.tsx"
click node_button "https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/button.tsx"
click node_card "https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/card.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_home,node_form,node_webhook toneBlue
class node_leads toneAmber
class node_form_controls,node_table_controls,node_button,node_card toneMint
class node_user toneIndigo
```

## Components

### Lead Workflow

- [Home Page](https://github.com/rohin-kbs/lead-generator/blob/main/app/page.tsx): `app/page.tsx`
- [Lead Form](https://github.com/rohin-kbs/lead-generator/blob/main/components/lead-form.tsx): `components/lead-form.tsx`
- **n8n Webhook**

### Results Presentation

- [Lead Results](https://github.com/rohin-kbs/lead-generator/blob/main/components/leads-table.tsx): `components/leads-table.tsx`

### UI Components

- [Form Controls](https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/input.tsx): `components/ui/input.tsx`
- [Table Controls](https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/table.tsx): `components/ui/table.tsx`
- [Button](https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/button.tsx): `components/ui/button.tsx`
- [Card](https://github.com/rohin-kbs/lead-generator/blob/main/components/ui/card.tsx): `components/ui/card.tsx`

### Other components

- **Lead Seeker**

## Connections

- Lead Seeker → Home Page: opens
- Home Page → Lead Form: renders
- Lead Form → n8n Webhook: POSTs criteria
- n8n Webhook → Lead Form: returns leads
- Lead Form → Lead Results: passes leads
- Lead Form → Form Controls: renders inputs
- Lead Form → Button: renders submit
- Lead Form → Card: uses card
- Lead Results → Table Controls: renders rows
- Lead Results → Card: uses card
