# ramzi-d3v/manufacturing-industry-system architecture

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

- Interactive diagram: https://gitdiagram.com/ramzi-d3v/manufacturing-industry-system
- Repository: https://github.com/ramzi-d3v/manufacturing-industry-system

## Overview

This is a Firebase-backed manufacturing operations dashboard. Users sign in, then work across production flow, raw-material and finished-goods inventory and defect reporting, energy, finance, analytics, and storage; administrators also manage announcements and tasks. Feature pages access Firebase directly, while shared navigation and authentication support the application. The README provides no product-level architecture details, so relationships below rely on the source index and shown excerpts; unsampled feature internals are not inferred.

Main entry points: [`lib/firebase.js`](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/lib/firebase.js) (Firebase client), [`app/signin/page.jsx`](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/signin/page.jsx) (Sign in), [`components/app-sidebar.jsx`](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/app-sidebar.jsx) (App navigation), [`app/raw-materials/defect-report/page.jsx`](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/raw-materials/defect-report/page.jsx) (Raw material defects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_signin["Sign in<br/>[page.jsx]"]
  node_signup["Sign up<br/>[page.jsx]"]
  node_auth["Authentication context<br/>[AuthContext.jsx]"]
  node_routeguards["Route guards<br/>[RouteGuards.jsx]"]
  node_navigation["App navigation<br/>[app-sidebar.jsx]"]
end

subgraph group_operations["Manufacturing operations"]
  node_rawinventory["Raw materials inventory<br/>[page.jsx]"]
  node_rawdefects["Raw material defects<br/>[page.jsx]"]
  node_finishedinventory["Finished goods inventory<br/>[page.jsx]"]
  node_finisheddefects["Finished goods defects<br/>[page.jsx]"]
  node_productionflow["Production flow<br/>[page.jsx]"]
  node_defecttable["Defect report table"]
end

subgraph group_insight["Reporting and administration"]
  node_energy["Energy consumption<br/>[page.jsx]"]
  node_finance["Finance<br/>[page.jsx]"]
  node_analytics["Product analytics<br/>[page.jsx]"]
  node_dashboard["Dashboard<br/>[page.jsx]"]
  node_admin["Administration<br/>[page.jsx]"]
  node_announcements["Announcements and tasks"]
  node_notifications["Notifications<br/>[page.jsx]"]
  node_storage["Storage<br/>[page.jsx]"]
  node_settings["Settings<br/>[page.jsx]"]
end

subgraph group_platform["Shared platform"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_firestore[("Cloud Firestore")]
  node_authservice["Firebase Authentication"]
  node_header["Site header<br/>[site-header.jsx]"]
  node_uikit["UI components"]
end

node_user(("User"))

node_user -->|"signs in"| node_signin
node_user -->|"registers"| node_signup
node_signin -->|"uses guards"| node_routeguards
node_signin -.->|"authenticates via"| node_auth
node_signup -->|"uses"| node_firebase
node_auth -->|"uses"| node_firebase
node_firebase -->|"initializes"| node_authservice
node_firebase -->|"initializes"| node_firestore
node_navigation -->|"listens to company data"| node_firestore
node_navigation -->|"renders sidebar"| node_uikit
node_rawinventory -->|"uses"| node_firebase
node_rawdefects -->|"uses"| node_firebase
node_finishedinventory -->|"uses"| node_firebase
node_finisheddefects -->|"uses"| node_firebase
node_finishedinventory -->|"renders controls"| node_uikit
node_rawdefects -->|"renders"| node_defecttable
node_defecttable -->|"uses"| node_firebase
node_productionflow -->|"uses"| node_firebase
node_energy -->|"uses"| node_firebase
node_finance -->|"uses"| node_firebase
node_analytics -->|"uses"| node_firebase
node_dashboard -->|"uses"| node_firebase
node_admin -->|"uses"| node_firebase
node_admin -->|"renders manager"| node_announcements
node_announcements -->|"writes announcements and tasks"| node_firestore
node_notifications -->|"uses"| node_firebase
node_storage -->|"uses"| node_firebase
node_settings -->|"uses"| node_firebase
node_header -->|"listens for notifications"| node_firestore
node_dashboard -->|"renders"| node_header

click node_signin "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/signin/page.jsx"
click node_signup "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/signup/page.jsx"
click node_auth "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/context/AuthContext.jsx"
click node_routeguards "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/container/RouteGuards.jsx"
click node_navigation "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/app-sidebar.jsx"
click node_rawinventory "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/raw-materials/inventory/page.jsx"
click node_rawdefects "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/raw-materials/defect-report/page.jsx"
click node_finishedinventory "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/finished-products/inventory/page.jsx"
click node_finisheddefects "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/finished-products/defect-report/page.jsx"
click node_productionflow "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/flow/page.jsx"
click node_defecttable "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/defect-report-table.jsx"
click node_energy "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/energy-consumption/page.jsx"
click node_finance "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/finance/page.jsx"
click node_analytics "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/products-analytics/page.jsx"
click node_dashboard "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/dashboard/page.jsx"
click node_admin "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/admin/page.jsx"
click node_announcements "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/admin/AnnouncementsTodosManager.jsx"
click node_notifications "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/notifications/page.jsx"
click node_storage "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/storage/page.jsx"
click node_settings "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/settings/page.jsx"
click node_firebase "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/lib/firebase.js"
click node_header "https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/site-header.jsx"
click node_uikit "https://github.com/ramzi-d3v/manufacturing-industry-system/tree/main/components/ui"

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_signin,node_signup,node_auth,node_routeguards,node_navigation,node_user toneBlue
class node_rawinventory,node_rawdefects,node_finishedinventory,node_finisheddefects,node_productionflow,node_defecttable toneAmber
class node_energy,node_finance,node_analytics,node_dashboard,node_admin,node_announcements,node_notifications,node_storage,node_settings toneMint
class node_firebase,node_firestore,node_authservice,node_header,node_uikit toneRose
```

## Components

### Access and navigation

- [Sign in](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/signin/page.jsx): `app/signin/page.jsx`
- [Sign up](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/signup/page.jsx): `app/signup/page.jsx`
- [Authentication context](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/context/AuthContext.jsx): `context/AuthContext.jsx`
- [Route guards](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/container/RouteGuards.jsx): `container/RouteGuards.jsx`
- [App navigation](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/app-sidebar.jsx): `components/app-sidebar.jsx`

### Manufacturing operations

- [Raw materials inventory](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/raw-materials/inventory/page.jsx): `app/raw-materials/inventory/page.jsx`
- [Raw material defects](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/raw-materials/defect-report/page.jsx): `app/raw-materials/defect-report/page.jsx`
- [Finished goods inventory](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/finished-products/inventory/page.jsx): `app/finished-products/inventory/page.jsx`
- [Finished goods defects](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/finished-products/defect-report/page.jsx): `app/finished-products/defect-report/page.jsx`
- [Production flow](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/flow/page.jsx): `app/flow/page.jsx`
- [Defect report table](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/defect-report-table.jsx): `components/defect-report-table.jsx`

### Reporting and administration

- [Energy consumption](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/energy-consumption/page.jsx): `app/energy-consumption/page.jsx`
- [Finance](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/finance/page.jsx): `app/finance/page.jsx`
- [Product analytics](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/products-analytics/page.jsx): `app/products-analytics/page.jsx`
- [Dashboard](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/dashboard/page.jsx): `app/dashboard/page.jsx`
- [Administration](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/admin/page.jsx): `app/admin/page.jsx`
- [Announcements and tasks](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/admin/AnnouncementsTodosManager.jsx): `components/admin/AnnouncementsTodosManager.jsx`
- [Notifications](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/notifications/page.jsx): `app/notifications/page.jsx`
- [Storage](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/storage/page.jsx): `app/storage/page.jsx`
- [Settings](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/app/settings/page.jsx): `app/settings/page.jsx`

### Shared platform

- [Firebase client](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/lib/firebase.js): `lib/firebase.js`
- **Cloud Firestore**
- **Firebase Authentication**
- [Site header](https://github.com/ramzi-d3v/manufacturing-industry-system/blob/main/components/site-header.jsx): `components/site-header.jsx`
- [UI components](https://github.com/ramzi-d3v/manufacturing-industry-system/tree/main/components/ui): `components/ui`

### Other components

- **User**

## Connections

- User → Sign in: signs in (evidence: `app/signin/page.jsx`)
- User → Sign up: registers (evidence: `app/signup/page.jsx`)
- Sign in → Route guards: uses guards (evidence: `app/signin/page.jsx`)
- Sign in → Authentication context: authenticates via
- Sign up → Firebase client: uses (evidence: `app/signup/page.jsx`)
- Authentication context → Firebase client: uses (evidence: `context/AuthContext.jsx`)
- Firebase client → Firebase Authentication: initializes (evidence: `lib/firebase.js`)
- Firebase client → Cloud Firestore: initializes (evidence: `lib/firebase.js`)
- App navigation → Cloud Firestore: listens to company data (evidence: `components/app-sidebar.jsx`)
- App navigation → UI components: renders sidebar (evidence: `components/app-sidebar.jsx`)
- Raw materials inventory → Firebase client: uses (evidence: `app/raw-materials/inventory/page.jsx`)
- Raw material defects → Firebase client: uses (evidence: `app/raw-materials/defect-report/page.jsx`)
- Finished goods inventory → Firebase client: uses (evidence: `app/finished-products/inventory/page.jsx`)
- Finished goods defects → Firebase client: uses (evidence: `app/finished-products/defect-report/page.jsx`)
- Finished goods inventory → UI components: renders controls (evidence: `app/finished-products/inventory/page.jsx`)
- Raw material defects → Defect report table: renders (evidence: `app/raw-materials/defect-report/page.jsx`)
- Defect report table → Firebase client: uses (evidence: `components/defect-report-table.jsx`)
- Production flow → Firebase client: uses (evidence: `app/flow/page.jsx`)
- Energy consumption → Firebase client: uses (evidence: `app/energy-consumption/page.jsx`)
- Finance → Firebase client: uses (evidence: `app/finance/page.jsx`)
- Product analytics → Firebase client: uses (evidence: `app/products-analytics/page.jsx`)
- Dashboard → Firebase client: uses (evidence: `app/dashboard/page.jsx`)
- Administration → Firebase client: uses (evidence: `app/admin/page.jsx`)
- Administration → Announcements and tasks: renders manager (evidence: `app/admin/page.jsx`)
- Announcements and tasks → Cloud Firestore: writes announcements and tasks (evidence: `components/admin/AnnouncementsTodosManager.jsx`)
- Notifications → Firebase client: uses (evidence: `app/notifications/page.jsx`)
- Storage → Firebase client: uses (evidence: `app/storage/page.jsx`)
- Settings → Firebase client: uses (evidence: `app/settings/page.jsx`)
- Site header → Cloud Firestore: listens for notifications (evidence: `components/site-header.jsx`)
- Dashboard → Site header: renders (evidence: `app/dashboard/page.jsx`)
