# imscottdev/onface-ecossistema architecture

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

- Interactive diagram: https://gitdiagram.com/imscottdev/onface-ecossistema
- Repository: https://github.com/imscottdev/onface-ecossistema

## Overview

ONFACE is Callface’s operational customer-journey platform, spanning acquisition through retention. The documented workflow brings leads in, qualifies them, converts them to opportunities, proposals, contracts and payment, then hands customers to onboarding, implementation and Customer Success. The graph also preserves the documented automation, service, insights and integration capabilities. README statements establish the broad product flow; source excerpts and the SOURCE INDEX support selected implementation links, while unsampled routes and subsystems are represented without asserting internal calls.

Main entry points: [`app/src/app/(produto)`](https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)) (Product UI), [`packages/domain/acquisition/commands/registrar-entrada.ts`](https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/acquisition/commands/registrar-entrada.ts) (Acquisition intake), [`app/src/lib/vendas/pipeline.ts`](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/vendas/pipeline.ts) (Sales pipeline), [`app/src/app/(produto)/clientes`](https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)/clientes) (Customer success)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commercial["Commercial journey"]
  node_acquisition["Acquisition intake"]
  node_identity["Identity resolution"]
  node_presales["Pre-sales qualification"]
  node_opportunity["Sales pipeline<br/>[pipeline.ts]"]
  node_sales_events["Sales events<br/>[eventos.ts]"]
  node_proposals["Proposals<br/>[propostas.ts]"]
  node_contracts["Contracts<br/>[contratos.ts]"]
end

subgraph group_customer["Customer operations"]
  node_customers["Customer success"]
  node_fulfillment["Onboarding delivery<br/>[fulfillments.ts]"]
  node_service["Customer service<br/>[atendimento.ts]"]
end

subgraph group_automation["Automation and insights"]
  node_automation["Automations<br/>[cadence-engine.ts]"]
  node_insights["Insights and reports"]
end

subgraph group_platform["Application platform"]
  node_web["Product UI"]
  node_api["Hono API"]
  node_database[("PostgreSQL")]
end

subgraph group_integrations["External integrations"]
  node_payments["Stripe payments<br/>[route.ts]"]
  node_meta["Meta lead integration<br/>[lead-ads.ts]"]
  node_callface_ai["Callface AI integration<br/>[leitura.ts]"]
end

node_user(("Callface team"))

node_user -->|"operates"| node_web
node_web -->|"captures leads"| node_acquisition
node_meta -.->|"supplies leads"| node_acquisition
node_acquisition -->|"resolves identity"| node_identity
node_acquisition -.->|"persists intake"| node_database
node_identity -.->|"uses repository"| node_database
node_web -->|"qualifies leads"| node_presales
node_presales -->|"advances to"| node_opportunity
node_web -->|"manages pipeline"| node_opportunity
node_opportunity -->|"records events"| node_sales_events
node_opportunity -->|"creates proposals"| node_proposals
node_proposals -->|"proceeds to signing"| node_contracts
node_contracts -->|"proceeds to payment"| node_payments
node_payments -->|"marks won customer"| node_customers
node_customers -->|"starts delivery"| node_fulfillment
node_fulfillment -->|"hands off to success"| node_customers
node_user -->|"handles conversations"| node_service
node_web -->|"configures workflows"| node_automation
node_automation -.->|"may use integration"| node_meta
node_web -->|"reviews performance"| node_insights
node_web -.->|"reviews usage"| node_callface_ai
node_api -.->|"serves API data"| node_database

click node_web "https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)"
click node_api "https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/api-server"
click node_acquisition "https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/acquisition/commands/registrar-entrada.ts"
click node_identity "https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/identity/commands/resolver-identidade.ts"
click node_presales "https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/acquisition/queries/board-pre-vendas.ts"
click node_opportunity "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/vendas/pipeline.ts"
click node_sales_events "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/vendas/eventos.ts"
click node_proposals "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/propostas.ts"
click node_contracts "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/contratos.ts"
click node_payments "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/app/api/webhooks/stripe/route.ts"
click node_customers "https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)/clientes"
click node_fulfillment "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/fulfillments.ts"
click node_service "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/atendimento.ts"
click node_automation "https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/cadencia/cadence-engine.ts"
click node_insights "https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)/relatorios"
click node_meta "https://github.com/imscottdev/onface-ecossistema/blob/main/packages/integrations/meta/src/lead-ads.ts"
click node_database "https://github.com/imscottdev/onface-ecossistema/tree/main/packages/platform/database"
click node_callface_ai "https://github.com/imscottdev/onface-ecossistema/blob/main/packages/integrations/callface-ai/src/leitura.ts"

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_acquisition,node_identity,node_presales,node_opportunity,node_sales_events,node_proposals,node_contracts toneBlue
class node_customers,node_fulfillment,node_service toneAmber
class node_automation,node_insights toneMint
class node_web,node_api,node_database toneRose
class node_payments,node_meta,node_callface_ai,node_user toneIndigo
```

## Components

### Commercial journey

- [Acquisition intake](https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/acquisition/commands/registrar-entrada.ts): `packages/domain/acquisition/commands/registrar-entrada.ts`
- [Identity resolution](https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/identity/commands/resolver-identidade.ts): `packages/domain/identity/commands/resolver-identidade.ts`
- [Pre-sales qualification](https://github.com/imscottdev/onface-ecossistema/blob/main/packages/domain/acquisition/queries/board-pre-vendas.ts): `packages/domain/acquisition/queries/board-pre-vendas.ts`
- [Sales pipeline](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/vendas/pipeline.ts): `app/src/lib/vendas/pipeline.ts`
- [Sales events](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/vendas/eventos.ts): `app/src/lib/vendas/eventos.ts`
- [Proposals](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/propostas.ts): `app/src/api-server/routes/propostas.ts`
- [Contracts](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/contratos.ts): `app/src/api-server/routes/contratos.ts`

### Customer operations

- [Customer success](https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)/clientes): `app/src/app/(produto)/clientes`
- [Onboarding delivery](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/fulfillments.ts): `app/src/api-server/routes/fulfillments.ts`
- [Customer service](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/api-server/routes/atendimento.ts): `app/src/api-server/routes/atendimento.ts`

### Automation and insights

- [Automations](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/lib/cadencia/cadence-engine.ts): `app/src/lib/cadencia/cadence-engine.ts`
- [Insights and reports](https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)/relatorios): `app/src/app/(produto)/relatorios`

### Application platform

- [Product UI](https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/app/(produto)): `app/src/app/(produto)`
- [Hono API](https://github.com/imscottdev/onface-ecossistema/tree/main/app/src/api-server): `app/src/api-server`
- [PostgreSQL](https://github.com/imscottdev/onface-ecossistema/tree/main/packages/platform/database): `packages/platform/database`

### External integrations

- [Stripe payments](https://github.com/imscottdev/onface-ecossistema/blob/main/app/src/app/api/webhooks/stripe/route.ts): `app/src/app/api/webhooks/stripe/route.ts`
- [Meta lead integration](https://github.com/imscottdev/onface-ecossistema/blob/main/packages/integrations/meta/src/lead-ads.ts): `packages/integrations/meta/src/lead-ads.ts`
- [Callface AI integration](https://github.com/imscottdev/onface-ecossistema/blob/main/packages/integrations/callface-ai/src/leitura.ts): `packages/integrations/callface-ai/src/leitura.ts`

### Other components

- **Callface team**

## Connections

- Callface team → Product UI: operates
- Product UI → Acquisition intake: captures leads
- Meta lead integration → Acquisition intake: supplies leads
- Acquisition intake → Identity resolution: resolves identity (evidence: `packages/domain/acquisition/commands/registrar-entrada.ts`)
- Acquisition intake → PostgreSQL: persists intake (evidence: `packages/platform/database/src/repositorio-aquisicao.ts`)
- Identity resolution → PostgreSQL: uses repository (evidence: `packages/platform/database/src/repositorio-aquisicao.ts`)
- Product UI → Pre-sales qualification: qualifies leads
- Pre-sales qualification → Sales pipeline: advances to
- Product UI → Sales pipeline: manages pipeline
- Sales pipeline → Sales events: records events (evidence: `app/src/lib/vendas/pipeline.ts`)
- Sales pipeline → Proposals: creates proposals
- Proposals → Contracts: proceeds to signing
- Contracts → Stripe payments: proceeds to payment
- Stripe payments → Customer success: marks won customer
- Customer success → Onboarding delivery: starts delivery
- Onboarding delivery → Customer success: hands off to success
- Callface team → Customer service: handles conversations
- Product UI → Automations: configures workflows
- Automations → Meta lead integration: may use integration
- Product UI → Insights and reports: reviews performance
- Product UI → Callface AI integration: reviews usage
- Hono API → PostgreSQL: serves API data
