# auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org architecture

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

- Interactive diagram: https://gitdiagram.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org
- Repository: https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org

## Overview

This is an end-of-day (EOD) variance recording and monitoring application. Staff enter branch, product, issue, financial-impact, and evidence details in the daily matrix; the app persists records locally, then presents filtered summaries, trends, risk signals, and follow-up tracking. Settings manage master data and security views, with backup/restore available. The source index establishes the main UI composition and several component dependencies; unsampled Supabase behavior and some UI details are represented cautiously.

Main entry points: [`src/App.tsx`](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/App.tsx) (Application Shell), [`src/components/DailyMatrix.tsx`](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/DailyMatrix.tsx) (Daily Entry Matrix), [`src/utils/analytics.ts`](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/analytics.ts) (Risk & Trend Analytics), [`src/components/Overview.tsx`](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/Overview.tsx) (Management Overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["EOD Workflow"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_daily["Daily Entry Matrix<br/>[DailyMatrix.tsx]"]
  node_select["Searchable Select"]
  node_duplicates["Duplicate Detection"]
  node_imagezoom["Image Zoom<br/>[ImageZoomModal.tsx]"]
  node_records["EOD Records"]
  node_storage["Local Persistence &amp; Backup<br/>[storage.ts]"]
  node_actions["Action Tracking<br/>[ActionTracker.tsx]"]
end

subgraph group_insights["Monitoring &amp; Insights"]
  node_overview["Management Overview<br/>[Overview.tsx]"]
  node_monthly["Monthly Breakdown"]
  node_analytics["Risk &amp; Trend Analytics<br/>[analytics.ts]"]
  node_drilldown["Branch Drilldown"]
  node_staff["Staff Monitoring"]
end

subgraph group_admin["Administration &amp; Security"]
  node_gate["Passcode Gate<br/>[PasscodeGate.tsx]"]
  node_settings["Settings &amp; Master Data<br/>[SettingsTab.tsx]"]
  node_security["Supabase Security View"]
  node_voidfn["Admin EOD Void<br/>[index.ts]"]
  node_schema[("Supabase EOD Schema")]
end

subgraph group_shared["Shared Logic"]
  node_types["Domain Types<br/>[index.ts]"]
  node_formatters["Formatting Helpers<br/>[formatters.ts]"]
  node_status["Status Indicators"]
end

node_user(("Staff / Manager"))

node_user -->|"uses"| node_app
node_app -->|"gates access"| node_gate
node_app -->|"renders"| node_daily
node_app -->|"renders"| node_records
node_app -->|"renders"| node_overview
node_app -->|"renders"| node_monthly
node_app -->|"renders"| node_staff
node_app -->|"renders"| node_actions
node_app -->|"renders"| node_settings
node_app -->|"loads and saves"| node_storage
node_daily -->|"uses"| node_select
node_daily -->|"renders"| node_duplicates
node_daily -->|"renders"| node_imagezoom
node_records -->|"opens"| node_imagezoom
node_overview -->|"calculates metrics"| node_analytics
node_monthly -->|"uses analytics"| node_analytics
node_staff -->|"uses analytics"| node_analytics
node_overview -->|"opens"| node_drilldown
node_daily -->|"renders"| node_status
node_actions -->|"renders"| node_status
node_analytics -->|"formats amounts"| node_formatters
node_settings -->|"renders"| node_security
node_app -->|"uses domain types"| node_types
node_settings -.->|"security configuration"| node_schema
node_security -.->|"inspects security"| node_schema
node_voidfn -.->|"updates EOD data"| node_schema

click node_app "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/App.tsx"
click node_gate "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/PasscodeGate.tsx"
click node_daily "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/DailyMatrix.tsx"
click node_select "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/SearchableSelect.tsx"
click node_duplicates "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/DuplicateDetectionModal.tsx"
click node_imagezoom "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/ImageZoomModal.tsx"
click node_records "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/EODRecordsTable.tsx"
click node_storage "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/storage.ts"
click node_overview "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/Overview.tsx"
click node_monthly "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/MonthlyBreakdown.tsx"
click node_analytics "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/analytics.ts"
click node_drilldown "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/BranchDrilldownModal.tsx"
click node_staff "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/StaffMonitoring.tsx"
click node_actions "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/ActionTracker.tsx"
click node_settings "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/SettingsTab.tsx"
click node_security "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/SupabaseSecurityView.tsx"
click node_voidfn "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/supabase/functions/admin-void-eod/index.ts"
click node_schema "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/supabase/migrations/20260924000000_secure_eod_monitoring_schema.sql"
click node_types "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/types/index.ts"
click node_formatters "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/formatters.ts"
click node_status "https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/StatusIndicator.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_daily,node_select,node_duplicates,node_imagezoom,node_records,node_storage,node_actions toneBlue
class node_overview,node_monthly,node_analytics,node_drilldown,node_staff toneAmber
class node_gate,node_settings,node_security,node_voidfn,node_schema toneMint
class node_types,node_formatters,node_status toneRose
class node_user toneIndigo
```

## Components

### EOD Workflow

- [Application Shell](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/App.tsx): `src/App.tsx`
- [Daily Entry Matrix](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/DailyMatrix.tsx): `src/components/DailyMatrix.tsx`
- [Searchable Select](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/SearchableSelect.tsx): `src/components/SearchableSelect.tsx`
- [Duplicate Detection](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/DuplicateDetectionModal.tsx): `src/components/DuplicateDetectionModal.tsx`
- [Image Zoom](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/ImageZoomModal.tsx): `src/components/ImageZoomModal.tsx`
- [EOD Records](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/EODRecordsTable.tsx): `src/components/EODRecordsTable.tsx`
- [Local Persistence & Backup](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/storage.ts): `src/utils/storage.ts`
- [Action Tracking](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/ActionTracker.tsx): `src/components/ActionTracker.tsx`

### Monitoring & Insights

- [Management Overview](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/Overview.tsx): `src/components/Overview.tsx`
- [Monthly Breakdown](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/MonthlyBreakdown.tsx): `src/components/MonthlyBreakdown.tsx`
- [Risk & Trend Analytics](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/analytics.ts): `src/utils/analytics.ts`
- [Branch Drilldown](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/BranchDrilldownModal.tsx): `src/components/BranchDrilldownModal.tsx`
- [Staff Monitoring](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/StaffMonitoring.tsx): `src/components/StaffMonitoring.tsx`

### Administration & Security

- [Passcode Gate](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/PasscodeGate.tsx): `src/components/PasscodeGate.tsx`
- [Settings & Master Data](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/SettingsTab.tsx): `src/components/SettingsTab.tsx`
- [Supabase Security View](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/SupabaseSecurityView.tsx): `src/components/SupabaseSecurityView.tsx`
- [Admin EOD Void](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/supabase/functions/admin-void-eod/index.ts): `supabase/functions/admin-void-eod/index.ts`
- [Supabase EOD Schema](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/supabase/migrations/20260924000000_secure_eod_monitoring_schema.sql): `supabase/migrations/20260924000000_secure_eod_monitoring_schema.sql`

### Shared Logic

- [Domain Types](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/types/index.ts): `src/types/index.ts`
- [Formatting Helpers](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/utils/formatters.ts): `src/utils/formatters.ts`
- [Status Indicators](https://github.com/auditstaff1jbyl-tech/auditstaff1jbyl-tech-s-org/blob/main/src/components/StatusIndicator.tsx): `src/components/StatusIndicator.tsx`

### Other components

- **Staff / Manager**

## Connections

- Staff / Manager → Application Shell: uses
- Application Shell → Passcode Gate: gates access (evidence: `src/App.tsx`)
- Application Shell → Daily Entry Matrix: renders (evidence: `src/App.tsx`)
- Application Shell → EOD Records: renders (evidence: `src/App.tsx`)
- Application Shell → Management Overview: renders (evidence: `src/App.tsx`)
- Application Shell → Monthly Breakdown: renders (evidence: `src/App.tsx`)
- Application Shell → Staff Monitoring: renders (evidence: `src/App.tsx`)
- Application Shell → Action Tracking: renders (evidence: `src/App.tsx`)
- Application Shell → Settings & Master Data: renders (evidence: `src/App.tsx`)
- Application Shell → Local Persistence & Backup: loads and saves (evidence: `src/App.tsx`)
- Daily Entry Matrix → Searchable Select: uses (evidence: `src/components/DailyMatrix.tsx`)
- Daily Entry Matrix → Duplicate Detection: renders (evidence: `src/components/DailyMatrix.tsx`)
- Daily Entry Matrix → Image Zoom: renders (evidence: `src/components/DailyMatrix.tsx`)
- EOD Records → Image Zoom: opens (evidence: `src/components/EODRecordsTable.tsx`)
- Management Overview → Risk & Trend Analytics: calculates metrics (evidence: `src/components/Overview.tsx`)
- Monthly Breakdown → Risk & Trend Analytics: uses analytics (evidence: `src/components/MonthlyBreakdown.tsx`)
- Staff Monitoring → Risk & Trend Analytics: uses analytics (evidence: `src/components/StaffMonitoring.tsx`)
- Management Overview → Branch Drilldown: opens (evidence: `src/components/Overview.tsx`)
- Daily Entry Matrix → Status Indicators: renders (evidence: `src/components/DailyMatrix.tsx`)
- Action Tracking → Status Indicators: renders (evidence: `src/components/ActionTracker.tsx`)
- Risk & Trend Analytics → Formatting Helpers: formats amounts (evidence: `src/utils/analytics.ts`)
- Settings & Master Data → Supabase Security View: renders (evidence: `src/components/SettingsTab.tsx`)
- Application Shell → Domain Types: uses domain types (evidence: `src/App.tsx`)
- Settings & Master Data → Supabase EOD Schema: security configuration
- Supabase Security View → Supabase EOD Schema: inspects security
- Admin EOD Void → Supabase EOD Schema: updates EOD data
