# danielmariano93-hub/goal-driven-glow architecture

> Architecture diagram of the GitHub repository danielmariano93-hub/goal-driven-glow, 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/danielmariano93-hub/goal-driven-glow
- Repository: https://github.com/danielmariano93-hub/goal-driven-glow

## Overview

This is a Portuguese-language personal-finance application with an AI financial assistant, built as a React client with Supabase-backed edge functions. A central user workflow is recording or importing financial activity, classifying it, and using the resulting financial picture for reports and guidance. Other visible product areas include goals, behavioral insights, proactive messaging, WhatsApp, and platform administration. The README describes the development stack rather than product behavior; several links below are therefore limited to relationships explicit in the sampled source or evident from named modules.

Main entry points: [`src/App.tsx`](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/App.tsx) (Application), [`src/lib/engine/engineEnvelope.ts`](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/engine/engineEnvelope.ts) (Finance engines), [`supabase/functions/_shared/categorization/pipeline.ts`](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/categorization/pipeline.ts) (Category pipeline), [`supabase/functions/_shared/agent/core/AgentCoreV2Entry.ts`](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/core/AgentCoreV2Entry.ts) (Agent core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["App experience"]
  node_app["Application<br/>[App.tsx]"]
  node_finance_pages["Finance screens<br/>[Lancamentos.tsx]"]
  node_goals["Goals &amp; planning<br/>[Metas.tsx]"]
  node_behavior["Behavior insights<br/>[Emocoes.tsx]"]
  node_nino_ui["Nino screens<br/>[Nino.tsx]"]
  node_report_ui["Smart reports"]
end

subgraph group_finance["Finance core"]
  node_finance_db["Finance access<br/>[finance.ts]"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_category_client["Category client<br/>[categoryEngine.ts]"]
  node_category_edge["Category pipeline<br/>[pipeline.ts]"]
  node_engine["Finance engines<br/>[engineEnvelope.ts]"]
  node_report_engine["Report engine<br/>[engine.ts]"]
  node_report_client["Report client<br/>[client.ts]"]
end

subgraph group_assistant["Nino intelligence"]
  node_nino_client["Nino client<br/>[client.ts]"]
  node_agent_core["Agent core"]
  node_turn_context["Turn context<br/>[ContextPipeline.ts]"]
  node_engine_tools["Agent tools<br/>[engineToolsImpl.ts]"]
end

subgraph group_messaging["Messaging"]
  node_proactive["Proactive pipeline<br/>[pipeline.ts]"]
  node_split["Split receipts"]
end

subgraph group_ops["Platform operations"]
  node_admin_ui["Admin console<br/>[OperacoesHub.tsx]"]
  node_admin_proactive["Proactive controls"]
end

node_user(("User"))
node_supabase[("Supabase")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_finance_pages
node_app -->|"routes to"| node_nino_ui
node_app -->|"routes to"| node_report_ui
node_finance_pages -->|"accesses finance"| node_finance_db
node_finance_db -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_category_client -->|"invokes function"| node_supabase
node_category_edge -->|"uses data"| node_supabase
node_category_edge -->|"classifies with"| node_engine
node_report_ui -->|"requests reports"| node_report_client
node_report_client -->|"builds report"| node_report_engine
node_report_engine -->|"uses finance facts"| node_engine
node_nino_ui -->|"requests guidance"| node_nino_client
node_nino_client -->|"invokes backend"| node_supabase
node_agent_core -->|"loads context"| node_turn_context
node_turn_context -->|"reads context"| node_supabase
node_agent_core -->|"dispatches tools"| node_engine_tools
node_engine_tools -->|"computes insights"| node_engine
node_proactive -->|"reads and writes"| node_supabase
node_split -->|"records receipts"| node_supabase
node_admin_ui -->|"presents controls"| node_admin_proactive
node_admin_proactive -->|"loads status"| node_supabase

click node_app "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/App.tsx"
click node_finance_pages "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Lancamentos.tsx"
click node_goals "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Metas.tsx"
click node_behavior "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Emocoes.tsx"
click node_nino_ui "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Nino.tsx"
click node_report_ui "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/RelatoriosInteligentes.tsx"
click node_finance_db "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/db/finance.ts"
click node_supabase_client "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/integrations/supabase/client.ts"
click node_category_client "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/categoryEngine.ts"
click node_category_edge "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/categorization/pipeline.ts"
click node_engine "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/engine/engineEnvelope.ts"
click node_report_engine "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/reports/intelligent/engine.ts"
click node_report_client "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/reports/intelligent/client.ts"
click node_nino_client "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/nino/client.ts"
click node_agent_core "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/core/AgentCoreV2Entry.ts"
click node_turn_context "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/core/ContextPipeline.ts"
click node_engine_tools "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/engineToolsImpl.ts"
click node_proactive "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/proactive/pipeline.ts"
click node_split "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/split/participantPipeline.ts"
click node_admin_ui "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/admin/OperacoesHub.tsx"
click node_admin_proactive "https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/components/admin/ProactiveEnginePanelV2.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_app,node_finance_pages,node_goals,node_behavior,node_nino_ui,node_report_ui,node_user toneBlue
class node_finance_db,node_supabase_client,node_category_client,node_category_edge,node_engine,node_report_engine,node_report_client,node_supabase toneAmber
class node_nino_client,node_agent_core,node_turn_context,node_engine_tools toneMint
class node_proactive,node_split toneRose
class node_admin_ui,node_admin_proactive toneIndigo
```

## Components

### App experience

- [Application](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/App.tsx): `src/App.tsx`
- [Finance screens](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Lancamentos.tsx): `src/pages/Lancamentos.tsx`
- [Goals & planning](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Metas.tsx): `src/pages/Metas.tsx`
- [Behavior insights](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Emocoes.tsx): `src/pages/Emocoes.tsx`
- [Nino screens](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/Nino.tsx): `src/pages/Nino.tsx`
- [Smart reports](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/RelatoriosInteligentes.tsx): `src/pages/RelatoriosInteligentes.tsx`

### Finance core

- [Finance access](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/db/finance.ts): `src/lib/db/finance.ts`
- [Supabase client](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Category client](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/categoryEngine.ts): `src/lib/categoryEngine.ts`
- [Category pipeline](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/categorization/pipeline.ts): `supabase/functions/_shared/categorization/pipeline.ts`
- [Finance engines](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/engine/engineEnvelope.ts): `src/lib/engine/engineEnvelope.ts`
- [Report engine](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/reports/intelligent/engine.ts): `src/lib/reports/intelligent/engine.ts`
- [Report client](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/reports/intelligent/client.ts): `src/lib/reports/intelligent/client.ts`

### Nino intelligence

- [Nino client](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/lib/nino/client.ts): `src/lib/nino/client.ts`
- [Agent core](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/core/AgentCoreV2Entry.ts): `supabase/functions/_shared/agent/core/AgentCoreV2Entry.ts`
- [Turn context](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/core/ContextPipeline.ts): `supabase/functions/_shared/agent/core/ContextPipeline.ts`
- [Agent tools](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/agent/engineToolsImpl.ts): `supabase/functions/_shared/agent/engineToolsImpl.ts`

### Messaging

- [Proactive pipeline](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/proactive/pipeline.ts): `supabase/functions/_shared/proactive/pipeline.ts`
- [Split receipts](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/supabase/functions/_shared/split/participantPipeline.ts): `supabase/functions/_shared/split/participantPipeline.ts`

### Platform operations

- [Admin console](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/pages/admin/OperacoesHub.tsx): `src/pages/admin/OperacoesHub.tsx`
- [Proactive controls](https://github.com/danielmariano93-hub/goal-driven-glow/blob/main/src/components/admin/ProactiveEnginePanelV2.tsx): `src/components/admin/ProactiveEnginePanelV2.tsx`

### Other components

- **User**
- **Supabase**

## Connections

- User → Application: uses
- Application → Finance screens: routes to
- Application → Nino screens: routes to
- Application → Smart reports: routes to
- Finance screens → Finance access: accesses finance
- Finance access → Supabase client: uses client
- Supabase client → Supabase: connects
- Category client → Supabase: invokes function
- Category pipeline → Supabase: uses data
- Category pipeline → Finance engines: classifies with
- Smart reports → Report client: requests reports
- Report client → Report engine: builds report
- Report engine → Finance engines: uses finance facts
- Nino screens → Nino client: requests guidance
- Nino client → Supabase: invokes backend
- Agent core → Turn context: loads context
- Turn context → Supabase: reads context
- Agent core → Agent tools: dispatches tools
- Agent tools → Finance engines: computes insights
- Proactive pipeline → Supabase: reads and writes
- Split receipts → Supabase: records receipts
- Admin console → Proactive controls: presents controls
- Proactive controls → Supabase: loads status
