# soumatheusgomes/buscandomilhao architecture

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

- Interactive diagram: https://gitdiagram.com/soumatheusgomes/buscandomilhao
- Repository: https://github.com/soumatheusgomes/buscandomilhao

## Overview

This repository contains a prompt, not the generated application: README.md describes the intended autonomous prospecting system, while PROMPT.md is the configurable prompt used to build it. The graph therefore represents documented capabilities and workflow, not inspected runtime code; subsystem paths point to the README that documents them.

Main entry points: [`README.md`](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md) (AI conversation), [`PROMPT.md`](https://github.com/soumatheusgomes/buscandomilhao/blob/main/PROMPT.md) (Config prompt)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Prospecting"]
  node_prompt["Config prompt<br/>[PROMPT.md]"]
  node_discovery["Lead discovery<br/>[README.md]"]
  node_qualification["Lead scoring<br/>[README.md]"]
  node_browser["Chrome outreach<br/>[README.md]"]
  node_followup["Scheduled follow-up<br/>[README.md]"]
end

subgraph group_engagement["Conversation"]
  node_handoff["Meta webhook<br/>[README.md]"]
  node_conversation["AI conversation<br/>[README.md]"]
  node_whatsapp["WhatsApp handoff<br/>[README.md]"]
  node_affiliate["Affiliate group<br/>[README.md]"]
end

subgraph group_governance["Safety and cost"]
  node_channel_lock["Channel lock<br/>[README.md]"]
  node_safety["Outreach safeguards<br/>[README.md]"]
  node_do_not_contact[("Do-not-contact<br/>[README.md]")]
  node_budget["Cost budget<br/>[README.md]"]
end

subgraph group_learning["Measurement"]
  node_metrics["Conversion metrics<br/>[README.md]"]
  node_local_data[("Local data<br/>[README.md]")]
end

node_operator(("Operator"))
node_instagram["Instagram session"]
node_openai["OpenAI API"]

node_operator -->|"configures"| node_prompt
node_prompt -->|"specifies"| node_discovery
node_discovery -->|"finds leads"| node_qualification
node_qualification -->|"prioritizes"| node_browser
node_browser -->|"sends first DM"| node_instagram
node_browser -->|"schedules"| node_followup
node_followup -->|"retries"| node_browser
node_instagram -->|"response triggers"| node_handoff
node_handoff -->|"dispatches"| node_conversation
node_conversation -->|"requests generation"| node_openai
node_conversation -->|"hands off"| node_whatsapp
node_conversation -->|"routes to"| node_affiliate
node_browser -->|"obeys"| node_channel_lock
node_conversation -->|"obeys"| node_channel_lock
node_safety -->|"limits outreach"| node_browser
node_safety -->|"limits cadence"| node_followup
node_safety -->|"records opt-outs"| node_do_not_contact
node_conversation -->|"records usage"| node_budget
node_budget -->|"pauses at limit"| node_openai
node_discovery -->|"stores lead data"| node_local_data
node_qualification -->|"stores scores"| node_local_data
node_conversation -->|"stores interactions"| node_local_data
node_local_data -->|"supplies results"| node_metrics
node_metrics -.->|"adapts targeting"| node_discovery
node_metrics -.->|"adapts messaging"| node_browser

click node_prompt "https://github.com/soumatheusgomes/buscandomilhao/blob/main/PROMPT.md"
click node_discovery "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_qualification "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_browser "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_followup "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_handoff "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_conversation "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_whatsapp "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_affiliate "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_channel_lock "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_safety "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_do_not_contact "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_budget "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_metrics "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"
click node_local_data "https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md"

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_prompt,node_discovery,node_qualification,node_browser,node_followup toneBlue
class node_handoff,node_conversation,node_whatsapp,node_affiliate toneAmber
class node_channel_lock,node_safety,node_do_not_contact,node_budget,node_openai toneMint
class node_metrics,node_local_data toneRose
class node_operator,node_instagram toneIndigo
```

## Components

### Prospecting

- [Config prompt](https://github.com/soumatheusgomes/buscandomilhao/blob/main/PROMPT.md): `PROMPT.md`
- [Lead discovery](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Lead scoring](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Chrome outreach](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Scheduled follow-up](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`

### Conversation

- [Meta webhook](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [AI conversation](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [WhatsApp handoff](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Affiliate group](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`

### Safety and cost

- [Channel lock](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Outreach safeguards](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Do-not-contact](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Cost budget](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`

### Measurement

- [Conversion metrics](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`
- [Local data](https://github.com/soumatheusgomes/buscandomilhao/blob/main/README.md): `README.md`

### Other components

- **Operator**
- **Instagram session**
- **OpenAI API**

## Connections

- Operator → Config prompt: configures
- Config prompt → Lead discovery: specifies
- Lead discovery → Lead scoring: finds leads
- Lead scoring → Chrome outreach: prioritizes
- Chrome outreach → Instagram session: sends first DM
- Chrome outreach → Scheduled follow-up: schedules
- Scheduled follow-up → Chrome outreach: retries
- Instagram session → Meta webhook: response triggers
- Meta webhook → AI conversation: dispatches
- AI conversation → OpenAI API: requests generation
- AI conversation → WhatsApp handoff: hands off
- AI conversation → Affiliate group: routes to
- Chrome outreach → Channel lock: obeys
- AI conversation → Channel lock: obeys
- Outreach safeguards → Chrome outreach: limits outreach
- Outreach safeguards → Scheduled follow-up: limits cadence
- Outreach safeguards → Do-not-contact: records opt-outs
- AI conversation → Cost budget: records usage
- Cost budget → OpenAI API: pauses at limit
- Lead discovery → Local data: stores lead data
- Lead scoring → Local data: stores scores
- AI conversation → Local data: stores interactions
- Local data → Conversion metrics: supplies results
- Conversion metrics → Lead discovery: adapts targeting
- Conversion metrics → Chrome outreach: adapts messaging
