# nojus77/eventcast architecture

> Architecture diagram of the GitHub repository nojus77/eventcast, 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/nojus77/eventcast
- Repository: https://github.com/nojus77/eventcast

## Overview

This is a multi-tenant restaurant and workforce operations application, with manager/admin, employee, kitchen, and kiosk interfaces. Its broad product areas include staffing, procurement and inventory, accounting, training, compliance, communications, and automation. The tree establishes these product surfaces, while sampled source confirms several internal engines and their dependencies; the README is only the default Next.js template. Accordingly, the graph maps major capabilities but limits arrows to relationships supported by the excerpts.

Main entry points: [`lib/procurement/ocr/pipeline.ts`](https://github.com/nojus77/eventcast/blob/main/lib/procurement/ocr/pipeline.ts) (Invoice OCR), [`lib/ai/worker/pipeline.ts`](https://github.com/nojus77/eventcast/blob/main/lib/ai/worker/pipeline.ts) (AI worker pipeline), [`lib/cogs/engine.ts`](https://github.com/nojus77/eventcast/blob/main/lib/cogs/engine.ts) (Recipes and COGS), [`lib/corrective/engine.ts`](https://github.com/nojus77/eventcast/blob/main/lib/corrective/engine.ts) (Corrective chains)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_people["People and workforce"]
  node_workforce["Workforce<br/>[page.tsx]"]
  node_rota["Scheduling and time<br/>[page.tsx]"]
  node_training["Training<br/>[page.tsx]"]
  node_employee_import["Employee import<br/>[page.tsx]"]
  node_employee_portal["Employee portal<br/>[page.tsx]"]
end

subgraph group_operations["Restaurant operations"]
  node_inventory["Inventory<br/>[page.tsx]"]
  node_recipes_cogs["Recipes and COGS<br/>[engine.ts]"]
  node_compliance["Compliance and incidents<br/>[page.tsx]"]
  node_automation["Automation rules<br/>[page.tsx]"]
  node_ai_assistant["AI assistant<br/>[page.tsx]"]
end

subgraph group_finance["Finance and procurement"]
  node_procurement["Procurement<br/>[page.tsx]"]
  node_invoice_ocr["Invoice OCR<br/>[pipeline.ts]"]
  node_accounting["Accounting and payroll<br/>[page.tsx]"]
end

subgraph group_platform["Platform and administration"]
  node_crm["CRM and leads<br/>[page.tsx]"]
  node_admin["Administration<br/>[layout.tsx]"]
  node_supabase[("Supabase data store")]
end

subgraph group_engines["Internal engines"]
  node_corrective_engine["Corrective chains<br/>[engine.ts]"]
  node_automation_engine["Automation engine<br/>[engine.ts]"]
  node_ai_worker["AI worker pipeline<br/>[pipeline.ts]"]
  node_celebrations["Celebrations<br/>[engine.ts]"]
  node_notification_dispatch["Notification dispatch"]
end

node_manager(("Manager"))
node_employee(("Employee"))
node_ai_provider(("AI provider"))

node_manager -->|"manages purchasing"| node_procurement
node_manager -->|"manages schedules"| node_rota
node_manager -->|"manages learning"| node_training
node_employee -->|"uses portal"| node_employee_portal
node_employee -->|"takes training"| node_training
node_employee_import -->|"imports employees"| node_employee_import
node_invoice_ocr -->|"extracts invoice"| node_ai_provider
node_invoice_ocr -->|"reads and writes"| node_supabase
node_invoice_ocr -->|"prepares invoices"| node_procurement
node_recipes_cogs -->|"reads product costs"| node_inventory
node_recipes_cogs -->|"loads sales and purchases"| node_supabase
node_corrective_engine -->|"reads and writes incidents"| node_supabase
node_corrective_engine -->|"sends notices"| node_notification_dispatch
node_automation_engine -->|"records runs"| node_supabase
node_automation_engine -->|"sends notices"| node_notification_dispatch
node_celebrations -->|"sends greetings"| node_notification_dispatch
node_ai_assistant -->|"handles chat turns"| node_ai_worker
node_ai_worker -->|"parses intent"| node_ai_provider
node_ai_worker -->|"stores conversations"| node_supabase
node_crm -->|"supports lead management"| node_manager
node_admin -->|"provides oversight"| node_manager

click node_workforce "https://github.com/nojus77/eventcast/blob/main/app/(app)/workforce/page.tsx"
click node_rota "https://github.com/nojus77/eventcast/blob/main/app/(app)/rota/page.tsx"
click node_training "https://github.com/nojus77/eventcast/blob/main/app/(app)/training/page.tsx"
click node_employee_import "https://github.com/nojus77/eventcast/blob/main/app/(app)/employees/import/page.tsx"
click node_employee_portal "https://github.com/nojus77/eventcast/blob/main/app/(employee)/employee/page.tsx"
click node_procurement "https://github.com/nojus77/eventcast/blob/main/app/(app)/procurement/page.tsx"
click node_invoice_ocr "https://github.com/nojus77/eventcast/blob/main/lib/procurement/ocr/pipeline.ts"
click node_accounting "https://github.com/nojus77/eventcast/blob/main/app/(app)/accounting/page.tsx"
click node_inventory "https://github.com/nojus77/eventcast/blob/main/app/(app)/atsargos/page.tsx"
click node_recipes_cogs "https://github.com/nojus77/eventcast/blob/main/lib/cogs/engine.ts"
click node_compliance "https://github.com/nojus77/eventcast/blob/main/app/(admin)/compliance/page.tsx"
click node_corrective_engine "https://github.com/nojus77/eventcast/blob/main/lib/corrective/engine.ts"
click node_automation "https://github.com/nojus77/eventcast/blob/main/app/(app)/automations/page.tsx"
click node_automation_engine "https://github.com/nojus77/eventcast/blob/main/lib/ai/automation/engine.ts"
click node_ai_assistant "https://github.com/nojus77/eventcast/blob/main/app/(app)/ai/assistant/page.tsx"
click node_ai_worker "https://github.com/nojus77/eventcast/blob/main/lib/ai/worker/pipeline.ts"
click node_crm "https://github.com/nojus77/eventcast/blob/main/app/(admin)/crm/page.tsx"
click node_admin "https://github.com/nojus77/eventcast/blob/main/app/(admin)/layout.tsx"
click node_celebrations "https://github.com/nojus77/eventcast/blob/main/lib/celebrations/engine.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_workforce,node_rota,node_training,node_employee_import,node_employee_portal toneBlue
class node_inventory,node_recipes_cogs,node_compliance,node_automation,node_ai_assistant toneAmber
class node_procurement,node_invoice_ocr,node_accounting toneMint
class node_crm,node_admin,node_supabase toneRose
class node_corrective_engine,node_automation_engine,node_ai_worker,node_celebrations,node_notification_dispatch,node_manager,node_employee,node_ai_provider toneIndigo
```

## Components

### People and workforce

- [Workforce](https://github.com/nojus77/eventcast/blob/main/app/(app)/workforce/page.tsx): `app/(app)/workforce/page.tsx`
- [Scheduling and time](https://github.com/nojus77/eventcast/blob/main/app/(app)/rota/page.tsx): `app/(app)/rota/page.tsx`
- [Training](https://github.com/nojus77/eventcast/blob/main/app/(app)/training/page.tsx): `app/(app)/training/page.tsx`
- [Employee import](https://github.com/nojus77/eventcast/blob/main/app/(app)/employees/import/page.tsx): `app/(app)/employees/import/page.tsx`
- [Employee portal](https://github.com/nojus77/eventcast/blob/main/app/(employee)/employee/page.tsx): `app/(employee)/employee/page.tsx`

### Restaurant operations

- [Inventory](https://github.com/nojus77/eventcast/blob/main/app/(app)/atsargos/page.tsx): `app/(app)/atsargos/page.tsx`
- [Recipes and COGS](https://github.com/nojus77/eventcast/blob/main/lib/cogs/engine.ts): `lib/cogs/engine.ts`
- [Compliance and incidents](https://github.com/nojus77/eventcast/blob/main/app/(admin)/compliance/page.tsx): `app/(admin)/compliance/page.tsx`
- [Automation rules](https://github.com/nojus77/eventcast/blob/main/app/(app)/automations/page.tsx): `app/(app)/automations/page.tsx`
- [AI assistant](https://github.com/nojus77/eventcast/blob/main/app/(app)/ai/assistant/page.tsx): `app/(app)/ai/assistant/page.tsx`

### Finance and procurement

- [Procurement](https://github.com/nojus77/eventcast/blob/main/app/(app)/procurement/page.tsx): `app/(app)/procurement/page.tsx`
- [Invoice OCR](https://github.com/nojus77/eventcast/blob/main/lib/procurement/ocr/pipeline.ts): `lib/procurement/ocr/pipeline.ts`
- [Accounting and payroll](https://github.com/nojus77/eventcast/blob/main/app/(app)/accounting/page.tsx): `app/(app)/accounting/page.tsx`

### Platform and administration

- [CRM and leads](https://github.com/nojus77/eventcast/blob/main/app/(admin)/crm/page.tsx): `app/(admin)/crm/page.tsx`
- [Administration](https://github.com/nojus77/eventcast/blob/main/app/(admin)/layout.tsx): `app/(admin)/layout.tsx`
- **Supabase data store**

### Internal engines

- [Corrective chains](https://github.com/nojus77/eventcast/blob/main/lib/corrective/engine.ts): `lib/corrective/engine.ts`
- [Automation engine](https://github.com/nojus77/eventcast/blob/main/lib/ai/automation/engine.ts): `lib/ai/automation/engine.ts`
- [AI worker pipeline](https://github.com/nojus77/eventcast/blob/main/lib/ai/worker/pipeline.ts): `lib/ai/worker/pipeline.ts`
- [Celebrations](https://github.com/nojus77/eventcast/blob/main/lib/celebrations/engine.ts): `lib/celebrations/engine.ts`
- **Notification dispatch**

### Other components

- **Manager**
- **Employee**
- **AI provider**

## Connections

- Manager → Procurement: manages purchasing
- Manager → Scheduling and time: manages schedules
- Manager → Training: manages learning
- Employee → Employee portal: uses portal
- Employee → Training: takes training
- Employee import → Employee import: imports employees
- Invoice OCR → AI provider: extracts invoice
- Invoice OCR → Supabase data store: reads and writes
- Invoice OCR → Procurement: prepares invoices
- Recipes and COGS → Inventory: reads product costs
- Recipes and COGS → Supabase data store: loads sales and purchases
- Corrective chains → Supabase data store: reads and writes incidents
- Corrective chains → Notification dispatch: sends notices
- Automation engine → Supabase data store: records runs
- Automation engine → Notification dispatch: sends notices
- Celebrations → Notification dispatch: sends greetings
- AI assistant → AI worker pipeline: handles chat turns
- AI worker pipeline → AI provider: parses intent
- AI worker pipeline → Supabase data store: stores conversations
- CRM and leads → Manager: supports lead management
- Administration → Manager: provides oversight
