# hisanochana/ebony-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/hisanochana/ebony-pulse
- Repository: https://github.com/hisanochana/ebony-pulse

## Overview

This is a factory production-performance portal for apparel operations. Its main workflow is recording shift output and categorized downtime, then reviewing production and managing records. The source index identifies the major UI, calculation, spreadsheet, and Firebase modules, but the README is empty and App.tsx was not sampled, so some page-to-page routing and unsampled integrations cannot be verified; those links are omitted.

Main entry points: [`src/services/googleSheetService.ts`](https://github.com/hisanochana/ebony-pulse/blob/main/src/services/googleSheetService.ts) (Google Sheets service), [`src/components/ShiftEntryForm.tsx`](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/ShiftEntryForm.tsx) (Shift entry), [`src/components/MasterDataTable.tsx`](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/MasterDataTable.tsx) (Master data table), [`src/components/FirestoreSyncModal.tsx`](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/FirestoreSyncModal.tsx) (Firestore sync controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Production Entry"]
  node_shift["Shift entry<br/>[ShiftEntryForm.tsx]"]
  node_downtime["Downtime entry"]
  node_breakdown["Style downtime detail"]
  node_hours["Hours adjustment"]
  node_codes["Downtime code catalog<br/>[downtimeCodes.ts]"]
end

subgraph group_review["Operations Review"]
  node_production["Production dashboard"]
  node_master["Master data table"]
  node_entryid["Entry ID requests"]
  node_hub["Portal hub<br/>[PortalHub.tsx]"]
end

subgraph group_services["Data Services"]
  node_sheets["Google Sheets service"]
  node_csv["CSV parser<br/>[csvParser.ts]"]
  node_firestoremodal["Firestore sync controls"]
  node_sync["Firestore sync<br/>[firestoreSync.ts]"]
  node_firebase["Firebase clients<br/>[firebase.ts]"]
  node_firebaseauth["Firebase authentication<br/>[firebaseAuth.ts]"]
end

subgraph group_platform["Shared Platform"]
  node_app["Portal app<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthModal.tsx]"]
  node_initial["Initial production data<br/>[initialData.ts]"]
  node_calculations["Production calculations<br/>[calculations.ts]"]
  node_theme["Theme preferences<br/>[ThemeContext.tsx]"]
end

node_operator(("Factory operator"))

node_operator -.->|"opens portal"| node_app
node_shift -->|"generates entry IDs"| node_calculations
node_shift -->|"renders"| node_downtime
node_shift -->|"opens detail"| node_breakdown
node_shift -->|"opens adjustment"| node_hours
node_shift -->|"submits records"| node_sheets
node_downtime -->|"uses catalog"| node_codes
node_downtime -->|"uses service"| node_sheets
node_production -->|"uses defaults"| node_initial
node_production -->|"uses service"| node_sheets
node_master -->|"uses calculations"| node_calculations
node_master -->|"uses defaults"| node_initial
node_master -->|"manages records"| node_sheets
node_master -->|"renders requests"| node_entryid
node_master -->|"uses catalog"| node_codes
node_sheets -->|"parses sheet data"| node_csv
node_sheets -->|"normalizes records"| node_calculations
node_firestoremodal -->|"invokes sync"| node_sync
node_firestoremodal -->|"uses clients"| node_firebase
node_firestoremodal -->|"uses authentication"| node_firebaseauth
node_sync -->|"writes and reads"| node_firebase
node_auth -->|"checks server users"| node_sheets
node_auth -->|"uses authentication"| node_firebaseauth
node_app -->|"wraps app"| node_theme

click node_app "https://github.com/hisanochana/ebony-pulse/blob/main/src/App.tsx"
click node_shift "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/ShiftEntryForm.tsx"
click node_downtime "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/DowntimeEntryPanel.tsx"
click node_breakdown "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/StyleDowntimeBreakdownModal.tsx"
click node_hours "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/HoursAdjustmentModal.tsx"
click node_codes "https://github.com/hisanochana/ebony-pulse/blob/main/src/data/downtimeCodes.ts"
click node_production "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/ProductionStatusPage.tsx"
click node_master "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/MasterDataTable.tsx"
click node_entryid "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/EntryIdRequestModal.tsx"
click node_hub "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/PortalHub.tsx"
click node_auth "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/AuthModal.tsx"
click node_initial "https://github.com/hisanochana/ebony-pulse/blob/main/src/data/initialData.ts"
click node_calculations "https://github.com/hisanochana/ebony-pulse/blob/main/src/utils/calculations.ts"
click node_sheets "https://github.com/hisanochana/ebony-pulse/blob/main/src/services/googleSheetService.ts"
click node_csv "https://github.com/hisanochana/ebony-pulse/blob/main/src/utils/csvParser.ts"
click node_firestoremodal "https://github.com/hisanochana/ebony-pulse/blob/main/src/components/FirestoreSyncModal.tsx"
click node_sync "https://github.com/hisanochana/ebony-pulse/blob/main/src/services/firestoreSync.ts"
click node_firebase "https://github.com/hisanochana/ebony-pulse/blob/main/src/services/firebase.ts"
click node_firebaseauth "https://github.com/hisanochana/ebony-pulse/blob/main/src/services/firebaseAuth.ts"
click node_theme "https://github.com/hisanochana/ebony-pulse/blob/main/src/context/ThemeContext.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_shift,node_downtime,node_breakdown,node_hours,node_codes toneBlue
class node_production,node_master,node_entryid,node_hub toneAmber
class node_sheets,node_csv,node_firestoremodal,node_sync,node_firebase,node_firebaseauth toneMint
class node_app,node_auth,node_initial,node_calculations,node_theme toneRose
class node_operator toneIndigo
```

## Components

### Production Entry

- [Shift entry](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/ShiftEntryForm.tsx): `src/components/ShiftEntryForm.tsx`
- [Downtime entry](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/DowntimeEntryPanel.tsx): `src/components/DowntimeEntryPanel.tsx`
- [Style downtime detail](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/StyleDowntimeBreakdownModal.tsx): `src/components/StyleDowntimeBreakdownModal.tsx`
- [Hours adjustment](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/HoursAdjustmentModal.tsx): `src/components/HoursAdjustmentModal.tsx`
- [Downtime code catalog](https://github.com/hisanochana/ebony-pulse/blob/main/src/data/downtimeCodes.ts): `src/data/downtimeCodes.ts`

### Operations Review

- [Production dashboard](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/ProductionStatusPage.tsx): `src/components/ProductionStatusPage.tsx`
- [Master data table](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/MasterDataTable.tsx): `src/components/MasterDataTable.tsx`
- [Entry ID requests](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/EntryIdRequestModal.tsx): `src/components/EntryIdRequestModal.tsx`
- [Portal hub](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/PortalHub.tsx): `src/components/PortalHub.tsx`

### Data Services

- [Google Sheets service](https://github.com/hisanochana/ebony-pulse/blob/main/src/services/googleSheetService.ts): `src/services/googleSheetService.ts`
- [CSV parser](https://github.com/hisanochana/ebony-pulse/blob/main/src/utils/csvParser.ts): `src/utils/csvParser.ts`
- [Firestore sync controls](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/FirestoreSyncModal.tsx): `src/components/FirestoreSyncModal.tsx`
- [Firestore sync](https://github.com/hisanochana/ebony-pulse/blob/main/src/services/firestoreSync.ts): `src/services/firestoreSync.ts`
- [Firebase clients](https://github.com/hisanochana/ebony-pulse/blob/main/src/services/firebase.ts): `src/services/firebase.ts`
- [Firebase authentication](https://github.com/hisanochana/ebony-pulse/blob/main/src/services/firebaseAuth.ts): `src/services/firebaseAuth.ts`

### Shared Platform

- [Portal app](https://github.com/hisanochana/ebony-pulse/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/hisanochana/ebony-pulse/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Initial production data](https://github.com/hisanochana/ebony-pulse/blob/main/src/data/initialData.ts): `src/data/initialData.ts`
- [Production calculations](https://github.com/hisanochana/ebony-pulse/blob/main/src/utils/calculations.ts): `src/utils/calculations.ts`
- [Theme preferences](https://github.com/hisanochana/ebony-pulse/blob/main/src/context/ThemeContext.tsx): `src/context/ThemeContext.tsx`

### Other components

- **Factory operator**

## Connections

- Factory operator → Portal app: opens portal
- Shift entry → Production calculations: generates entry IDs (evidence: `src/components/ShiftEntryForm.tsx`)
- Shift entry → Downtime entry: renders (evidence: `src/components/ShiftEntryForm.tsx`)
- Shift entry → Style downtime detail: opens detail (evidence: `src/components/ShiftEntryForm.tsx`)
- Shift entry → Hours adjustment: opens adjustment (evidence: `src/components/ShiftEntryForm.tsx`)
- Shift entry → Google Sheets service: submits records (evidence: `src/components/ShiftEntryForm.tsx`)
- Downtime entry → Downtime code catalog: uses catalog (evidence: `src/components/DowntimeEntryPanel.tsx`)
- Downtime entry → Google Sheets service: uses service (evidence: `src/components/DowntimeEntryPanel.tsx`)
- Production dashboard → Initial production data: uses defaults (evidence: `src/components/ProductionStatusPage.tsx`)
- Production dashboard → Google Sheets service: uses service (evidence: `src/components/ProductionStatusPage.tsx`)
- Master data table → Production calculations: uses calculations (evidence: `src/components/MasterDataTable.tsx`)
- Master data table → Initial production data: uses defaults (evidence: `src/components/MasterDataTable.tsx`)
- Master data table → Google Sheets service: manages records (evidence: `src/components/MasterDataTable.tsx`)
- Master data table → Entry ID requests: renders requests (evidence: `src/components/MasterDataTable.tsx`)
- Master data table → Downtime code catalog: uses catalog (evidence: `src/components/MasterDataTable.tsx`)
- Google Sheets service → CSV parser: parses sheet data (evidence: `src/services/googleSheetService.ts`)
- Google Sheets service → Production calculations: normalizes records (evidence: `src/services/googleSheetService.ts`)
- Firestore sync controls → Firestore sync: invokes sync (evidence: `src/components/FirestoreSyncModal.tsx`)
- Firestore sync controls → Firebase clients: uses clients (evidence: `src/components/FirestoreSyncModal.tsx`)
- Firestore sync controls → Firebase authentication: uses authentication (evidence: `src/components/FirestoreSyncModal.tsx`)
- Firestore sync → Firebase clients: writes and reads (evidence: `src/services/firestoreSync.ts`)
- Authentication → Google Sheets service: checks server users (evidence: `src/components/AuthModal.tsx`)
- Authentication → Firebase authentication: uses authentication (evidence: `src/components/AuthModal.tsx`)
- Portal app → Theme preferences: wraps app (evidence: `src/main.tsx`)
