# viniciuscasagrande-creator/eagle architecture

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

- Interactive diagram: https://gitdiagram.com/viniciuscasagrande-creator/eagle
- Repository: https://github.com/viniciuscasagrande-creator/eagle

## Overview

DiskIngressos EAGLE is a producer-facing event operations portal integrated with Keeper ERP. Producers authenticate, select an event, and use protected dashboards and event tools to manage ticketing, sales, check-in, commercial accounts, marketing, remarketing, finance, and reports. The shared API adapter mediates much of the product data access; finance balances and ledger data remain Keeper-owned, rather than forming a second portal ledger. Marketing and remarketing have broad documented capabilities, but unsampled page internals limit the relationships shown here.

Main entry points: [`src/app/routes/index.tsx`](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/app/routes/index.tsx) (Protected routes), [`src/services/api/keeperAdapter.ts`](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/keeperAdapter.ts) (Keeper API adapter), [`src/app/App.tsx`](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/app/App.tsx) (Application shell), [`src/modules/financeiro`](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/financeiro) (Finance and settlements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Portal and access"]
  node_app["Application shell<br/>[App.tsx]"]
  node_routes["Protected routes<br/>[index.tsx]"]
  node_auth["Producer authentication<br/>[AuthContext.tsx]"]
  node_login["Producer login<br/>[LoginPage.tsx]"]
end

subgraph group_events["Event operations"]
  node_eventctx["Selected event context<br/>[EventContext.tsx]"]
  node_eventhub["Event operations"]
  node_checkin["Gate check-in"]
end

subgraph group_business["Producer business"]
  node_dashboard["Producer dashboard"]
  node_commercial["Commercial management"]
  node_marketing["Marketing campaigns and analytics"]
  node_utm["UTM conversion analytics"]
  node_remarketing["Remarketing and recovery"]
  node_finance["Finance and settlements"]
  node_reports["Consolidated reporting"]
end

subgraph group_services["Data and contracts"]
  node_adapter["Keeper API adapter<br/>[keeperAdapter.ts]"]
  node_api_client["API client<br/>[client.ts]"]
  node_mockdata[("Local mock data<br/>[mockSeedData.ts]")]
  node_contracts["Domain contracts"]
  node_marketing_api["Marketing API routes"]
  node_remarketing_api["Remarketing API routes"]
end

node_producer(("Event producer"))
node_keeper[("Keeper ERP")]

node_producer -->|"signs in"| node_login
node_app -->|"provides auth"| node_auth
node_app -->|"provides event"| node_eventctx
node_app -->|"mounts routes"| node_routes
node_routes -->|"routes login"| node_login
node_routes -->|"routes event tools"| node_eventhub
node_routes -->|"routes marketing"| node_marketing
node_routes -->|"routes remarketing"| node_remarketing
node_login -->|"authenticates"| node_auth
node_auth -->|"uses session client"| node_api_client
node_eventctx -->|"loads event data"| node_adapter
node_checkin -->|"reads event context"| node_eventctx
node_checkin -->|"uses event API"| node_adapter
node_routes -->|"routes dashboard"| node_dashboard
node_dashboard -->|"loads producer data"| node_adapter
node_routes -->|"routes commercial"| node_commercial
node_commercial -->|"loads and updates"| node_adapter
node_routes -->|"routes finance"| node_finance
node_finance -.->|"uses finance API"| node_adapter
node_routes -->|"routes reports"| node_reports
node_routes -->|"routes conversions"| node_utm
node_utm -->|"loads seed data"| node_mockdata
node_marketing -.->|"optional API"| node_marketing_api
node_remarketing -.->|"optional API"| node_remarketing_api
node_adapter -->|"uses HTTP client"| node_api_client
node_adapter -->|"uses fallback data"| node_mockdata
node_adapter -->|"uses domain types"| node_contracts
node_api_client -->|"calls ERP API"| node_keeper
node_finance -->|"reads official ledger"| node_keeper

click node_app "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/app/App.tsx"
click node_routes "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/app/routes/index.tsx"
click node_auth "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/contexts/AuthContext.tsx"
click node_login "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/auth/LoginPage.tsx"
click node_eventctx "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/contexts/EventContext.tsx"
click node_eventhub "https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/eventos"
click node_checkin "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/eventos/PortariaCheckinPage.tsx"
click node_dashboard "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/dashboard/DashboardGeralPage.tsx"
click node_commercial "https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/comercial"
click node_marketing "https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/marketing"
click node_utm "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/marketing/CentralUtmConversoesPage.tsx"
click node_remarketing "https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/remarketing"
click node_finance "https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/financeiro"
click node_reports "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/relatorios/RelatoriosConsolidadosPage.tsx"
click node_adapter "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/keeperAdapter.ts"
click node_api_client "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/client.ts"
click node_mockdata "https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/mockSeedData.ts"
click node_contracts "https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/types"
click node_marketing_api "https://github.com/viniciuscasagrande-creator/eagle/blob/main/api/producer-marketing.js"
click node_remarketing_api "https://github.com/viniciuscasagrande-creator/eagle/blob/main/api/producer-remarketing.js"

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_routes,node_auth,node_login toneBlue
class node_eventctx,node_eventhub,node_checkin,node_keeper toneAmber
class node_dashboard,node_commercial,node_marketing,node_utm,node_remarketing,node_finance,node_reports toneMint
class node_adapter,node_api_client,node_mockdata,node_contracts,node_marketing_api,node_remarketing_api toneRose
class node_producer toneIndigo
```

## Components

### Portal and access

- [Application shell](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Protected routes](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/app/routes/index.tsx): `src/app/routes/index.tsx`
- [Producer authentication](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Producer login](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/auth/LoginPage.tsx): `src/modules/auth/LoginPage.tsx`

### Event operations

- [Selected event context](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/contexts/EventContext.tsx): `src/contexts/EventContext.tsx`
- [Event operations](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/eventos): `src/modules/eventos`
- [Gate check-in](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/eventos/PortariaCheckinPage.tsx): `src/modules/eventos/PortariaCheckinPage.tsx`

### Producer business

- [Producer dashboard](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/dashboard/DashboardGeralPage.tsx): `src/modules/dashboard/DashboardGeralPage.tsx`
- [Commercial management](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/comercial): `src/modules/comercial`
- [Marketing campaigns and analytics](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/marketing): `src/modules/marketing`
- [UTM conversion analytics](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/marketing/CentralUtmConversoesPage.tsx): `src/modules/marketing/CentralUtmConversoesPage.tsx`
- [Remarketing and recovery](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/remarketing): `src/modules/remarketing`
- [Finance and settlements](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/modules/financeiro): `src/modules/financeiro`
- [Consolidated reporting](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/modules/relatorios/RelatoriosConsolidadosPage.tsx): `src/modules/relatorios/RelatoriosConsolidadosPage.tsx`

### Data and contracts

- [Keeper API adapter](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/keeperAdapter.ts): `src/services/api/keeperAdapter.ts`
- [API client](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/client.ts): `src/services/api/client.ts`
- [Local mock data](https://github.com/viniciuscasagrande-creator/eagle/blob/main/src/services/api/mockSeedData.ts): `src/services/api/mockSeedData.ts`
- [Domain contracts](https://github.com/viniciuscasagrande-creator/eagle/tree/main/src/types): `src/types`
- [Marketing API routes](https://github.com/viniciuscasagrande-creator/eagle/blob/main/api/producer-marketing.js): `api/producer-marketing.js`
- [Remarketing API routes](https://github.com/viniciuscasagrande-creator/eagle/blob/main/api/producer-remarketing.js): `api/producer-remarketing.js`

### Other components

- **Event producer**
- **Keeper ERP**

## Connections

- Event producer → Producer login: signs in
- Application shell → Producer authentication: provides auth (evidence: `src/app/App.tsx`)
- Application shell → Selected event context: provides event (evidence: `src/app/App.tsx`)
- Application shell → Protected routes: mounts routes (evidence: `src/app/App.tsx`)
- Protected routes → Producer login: routes login (evidence: `src/app/routes/index.tsx`)
- Protected routes → Event operations: routes event tools (evidence: `src/app/routes/index.tsx`)
- Protected routes → Marketing campaigns and analytics: routes marketing (evidence: `src/app/routes/index.tsx`)
- Protected routes → Remarketing and recovery: routes remarketing (evidence: `src/app/routes/index.tsx`)
- Producer login → Producer authentication: authenticates (evidence: `src/modules/auth/LoginPage.tsx`)
- Producer authentication → API client: uses session client (evidence: `src/contexts/AuthContext.tsx`)
- Selected event context → Keeper API adapter: loads event data (evidence: `src/contexts/EventContext.tsx`)
- Gate check-in → Selected event context: reads event context (evidence: `src/modules/eventos/PortariaCheckinPage.tsx`)
- Gate check-in → Keeper API adapter: uses event API (evidence: `src/modules/eventos/PortariaCheckinPage.tsx`)
- Protected routes → Producer dashboard: routes dashboard (evidence: `src/app/routes/index.tsx`)
- Producer dashboard → Keeper API adapter: loads producer data (evidence: `src/modules/dashboard/DashboardGeralPage.tsx`)
- Protected routes → Commercial management: routes commercial (evidence: `src/app/routes/index.tsx`)
- Commercial management → Keeper API adapter: loads and updates (evidence: `src/modules/comercial/ClientesPage.tsx`)
- Protected routes → Finance and settlements: routes finance (evidence: `src/app/routes/index.tsx`)
- Finance and settlements → Keeper API adapter: uses finance API
- Protected routes → Consolidated reporting: routes reports (evidence: `src/app/routes/index.tsx`)
- Protected routes → UTM conversion analytics: routes conversions (evidence: `src/app/routes/index.tsx`)
- UTM conversion analytics → Local mock data: loads seed data (evidence: `src/modules/marketing/CentralUtmConversoesPage.tsx`)
- Marketing campaigns and analytics → Marketing API routes: optional API
- Remarketing and recovery → Remarketing API routes: optional API
- Keeper API adapter → API client: uses HTTP client (evidence: `src/services/api/keeperAdapter.ts`)
- Keeper API adapter → Local mock data: uses fallback data (evidence: `src/services/api/keeperAdapter.ts`)
- Keeper API adapter → Domain contracts: uses domain types (evidence: `src/services/api/keeperAdapter.ts`)
- API client → Keeper ERP: calls ERP API (evidence: `README.md`)
- Finance and settlements → Keeper ERP: reads official ledger (evidence: `README.md`)
