# njugunamwangi/erp architecture

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

- Interactive diagram: https://gitdiagram.com/njugunamwangi/erp
- Repository: https://github.com/njugunamwangi/erp

## Overview

This is a Laravel/Filament ERP with separate admin and app panels. The visible product surface includes customer and task management, quotes and invoices, banking, assets, and team administration. A typical staff workflow begins in a panel and uses its management screens; invoices can also be viewed or downloaded as rendered documents. The excerpts directly show invoice rendering, task-chart queries, and Jetstream action registration. Other links are left unasserted or marked unverified because their routing and implementation were not sampled.

Main entry points: [`app/Providers/Filament`](https://github.com/njugunamwangi/erp/tree/main/app/Providers/Filament) (Filament panels), [`app/Filament/Clusters/CustomerRelations/Resources/InvoiceResource.php`](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/InvoiceResource.php) (Invoice management), [`app/Http/Controllers/ViewInvoiceController.php`](https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/ViewInvoiceController.php) (Invoice rendering), [`app/Http/Controllers/DownloadInvoiceController.php`](https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/DownloadInvoiceController.php) (Invoice download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_panels["Panels and access"]
  node_filament["Filament panels"]
  node_team["Team administration"]
  node_users["User management<br/>[UserResource.php]"]
end

subgraph group_crm["Customer operations"]
  node_leads["Lead management<br/>[LeadResource.php]"]
  node_pipeline["Pipeline stages<br/>[StageResource.php]"]
  node_tasks["Task management<br/>[TaskResource.php]"]
  node_quotes["Quote management<br/>[QuoteResource.php]"]
  node_invoices["Invoice management"]
end

subgraph group_finance["Finance and commerce"]
  node_invoiceview["Invoice rendering"]
  node_invoicedownload["Invoice download"]
  node_accounts["Bank accounts"]
  node_payments["Payment integrations"]
end

subgraph group_work["Work and assets"]
  node_brands["Brand management<br/>[BrandResource.php]"]
  node_equipment[("Equipment model<br/>[Equipment.php]")]
  node_calendar["Task calendar<br/>[TaskCalendar.php]"]
  node_taskchart["Task statistics<br/>[TasksChart.php]"]
  node_taskmodel[("Task records<br/>[Task.php]")]
end

node_staff(("Staff or admin"))

node_staff -->|"uses"| node_filament
node_filament -.->|"manages"| node_users
node_filament -.->|"manages"| node_leads
node_filament -.->|"manages"| node_pipeline
node_filament -.->|"manages"| node_tasks
node_filament -.->|"manages"| node_quotes
node_filament -.->|"manages"| node_invoices
node_filament -.->|"manages"| node_accounts
node_filament -.->|"manages"| node_brands
node_filament -.->|"opens"| node_calendar
node_filament -.->|"configures"| node_team
node_team -.->|"administers"| node_users
node_invoices -.->|"views via"| node_invoiceview
node_invoices -.->|"downloads via"| node_invoicedownload
node_invoiceview -->|"reads"| node_accounts
node_invoicedownload -->|"reads"| node_accounts
node_invoiceview -->|"reads record"| node_invoices
node_invoicedownload -->|"reads record"| node_invoices
node_taskchart -->|"queries"| node_taskmodel
node_tasks -.->|"shows stats"| node_taskchart

click node_filament "https://github.com/njugunamwangi/erp/tree/main/app/Providers/Filament"
click node_team "https://github.com/njugunamwangi/erp/tree/main/app/Actions/Jetstream"
click node_users "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Resources/UserResource.php"
click node_leads "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/LeadResource.php"
click node_pipeline "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/StageResource.php"
click node_tasks "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/TaskResource.php"
click node_quotes "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/QuoteResource.php"
click node_invoices "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/InvoiceResource.php"
click node_invoiceview "https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/ViewInvoiceController.php"
click node_invoicedownload "https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/DownloadInvoiceController.php"
click node_accounts "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/Banking/Resources/AccountResource.php"
click node_payments "https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/MPesaSTKPushController.php"
click node_brands "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/Commerce/Resources/BrandResource.php"
click node_equipment "https://github.com/njugunamwangi/erp/blob/main/app/Models/Equipment.php"
click node_calendar "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Pages/TaskCalendar.php"
click node_taskchart "https://github.com/njugunamwangi/erp/blob/main/app/Filament/Widgets/TasksChart.php"
click node_taskmodel "https://github.com/njugunamwangi/erp/blob/main/app/Models/Task.php"

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_filament,node_team,node_users toneBlue
class node_leads,node_pipeline,node_tasks,node_quotes,node_invoices toneAmber
class node_invoiceview,node_invoicedownload,node_accounts,node_payments toneMint
class node_brands,node_equipment,node_calendar,node_taskchart,node_taskmodel toneRose
class node_staff toneIndigo
```

## Components

### Panels and access

- [Filament panels](https://github.com/njugunamwangi/erp/tree/main/app/Providers/Filament): `app/Providers/Filament`
- [Team administration](https://github.com/njugunamwangi/erp/tree/main/app/Actions/Jetstream): `app/Actions/Jetstream`
- [User management](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Resources/UserResource.php): `app/Filament/Resources/UserResource.php`

### Customer operations

- [Lead management](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/LeadResource.php): `app/Filament/Clusters/CustomerRelations/Resources/LeadResource.php`
- [Pipeline stages](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/StageResource.php): `app/Filament/Clusters/CustomerRelations/Resources/StageResource.php`
- [Task management](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/TaskResource.php): `app/Filament/Clusters/CustomerRelations/Resources/TaskResource.php`
- [Quote management](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/QuoteResource.php): `app/Filament/Clusters/CustomerRelations/Resources/QuoteResource.php`
- [Invoice management](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/CustomerRelations/Resources/InvoiceResource.php): `app/Filament/Clusters/CustomerRelations/Resources/InvoiceResource.php`

### Finance and commerce

- [Invoice rendering](https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/ViewInvoiceController.php): `app/Http/Controllers/ViewInvoiceController.php`
- [Invoice download](https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/DownloadInvoiceController.php): `app/Http/Controllers/DownloadInvoiceController.php`
- [Bank accounts](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/Banking/Resources/AccountResource.php): `app/Filament/Clusters/Banking/Resources/AccountResource.php`
- [Payment integrations](https://github.com/njugunamwangi/erp/blob/main/app/Http/Controllers/MPesaSTKPushController.php): `app/Http/Controllers/MPesaSTKPushController.php`

### Work and assets

- [Brand management](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Clusters/Commerce/Resources/BrandResource.php): `app/Filament/Clusters/Commerce/Resources/BrandResource.php`
- [Equipment model](https://github.com/njugunamwangi/erp/blob/main/app/Models/Equipment.php): `app/Models/Equipment.php`
- [Task calendar](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Pages/TaskCalendar.php): `app/Filament/Pages/TaskCalendar.php`
- [Task statistics](https://github.com/njugunamwangi/erp/blob/main/app/Filament/Widgets/TasksChart.php): `app/Filament/Widgets/TasksChart.php`
- [Task records](https://github.com/njugunamwangi/erp/blob/main/app/Models/Task.php): `app/Models/Task.php`

### Other components

- **Staff or admin**

## Connections

- Staff or admin → Filament panels: uses
- Filament panels → User management: manages
- Filament panels → Lead management: manages
- Filament panels → Pipeline stages: manages
- Filament panels → Task management: manages
- Filament panels → Quote management: manages
- Filament panels → Invoice management: manages
- Filament panels → Bank accounts: manages
- Filament panels → Brand management: manages
- Filament panels → Task calendar: opens
- Filament panels → Team administration: configures
- Team administration → User management: administers
- Invoice management → Invoice rendering: views via
- Invoice management → Invoice download: downloads via
- Invoice rendering → Bank accounts: reads (evidence: `app/Http/Controllers/ViewInvoiceController.php`)
- Invoice download → Bank accounts: reads (evidence: `app/Http/Controllers/DownloadInvoiceController.php`)
- Invoice rendering → Invoice management: reads record (evidence: `app/Http/Controllers/ViewInvoiceController.php`)
- Invoice download → Invoice management: reads record (evidence: `app/Http/Controllers/DownloadInvoiceController.php`)
- Task statistics → Task records: queries (evidence: `app/Filament/Widgets/TasksChart.php`)
- Task management → Task statistics: shows stats
