# shyamsitaula/samarium architecture

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

- Interactive diagram: https://gitdiagram.com/shyamsitaula/samarium
- Repository: https://github.com/shyamsitaula/samarium

## Overview

Samarium is a Laravel/Livewire business management system combining ERP and point-of-sale workflows with a public website and CMS. A business user manages products and customers, records sales and expenses, and reviews financial activity; public visitors can browse the website and product catalog. The README documents the major capabilities, while the sampled controller and model excerpts show some concrete data access and relationships. Routes and most Livewire implementations were not sampled, so links between those subsystems are not asserted.

Main entry points: [`app/Livewire/Dashboard/AppLeftMenu.php`](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Dashboard/AppLeftMenu.php) (Dashboard UI), [`app/Http/Controllers/WebsiteController.php`](https://github.com/shyamsitaula/samarium/blob/master/app/Http/Controllers/WebsiteController.php) (Public website), [`app/Models/Product/Product.php`](https://github.com/shyamsitaula/samarium/blob/master/app/Models/Product/Product.php) (Product catalog), [`app/Livewire/Cms/Dashboard/WebpageComponent.php`](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Cms/Dashboard/WebpageComponent.php) (CMS pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_dashboard["Dashboard UI<br/>[AppLeftMenu.php]"]
  node_website["Public website"]
end

subgraph group_commerce["Sales and commerce"]
  node_products["Product catalog<br/>[Product.php]"]
  node_sales["Sales and POS"]
  node_onlineorders["Online orders"]
  node_customers["Customer records"]
  node_inventory["Inventory tracking"]
end

subgraph group_finance["Business operations"]
  node_purchases["Purchases"]
  node_expenses["Expenses"]
  node_accounting["Accounting"]
  node_database[("MySQL database<br/>[database.php]")]
end

subgraph group_web["Website and content"]
  node_cms["CMS pages"]
  node_reviews["Product reviews"]
end

subgraph group_support["Workspace tools"]
  node_calendar["Calendar"]
  node_tasks["Task management<br/>[TodoComponent.php]"]
  node_analytics["Analytics dashboard"]
end

node_staff(("Business user"))
node_visitor(("Website visitor"))

node_staff -->|"uses"| node_dashboard
node_visitor -->|"browses"| node_website
node_website -->|"loads products"| node_products
node_website -.->|"renders pages"| node_cms
node_products -->|"has reviews"| node_reviews
node_dashboard -.->|"records sales"| node_sales
node_dashboard -.->|"manages customers"| node_customers
node_dashboard -.->|"tracks stock"| node_inventory
node_dashboard -.->|"records purchases"| node_purchases
node_dashboard -.->|"tracks expenses"| node_expenses
node_dashboard -.->|"reviews finances"| node_accounting
node_dashboard -.->|"manages orders"| node_onlineorders
node_dashboard -.->|"manages content"| node_cms
node_dashboard -.->|"uses calendar"| node_calendar
node_dashboard -.->|"manages tasks"| node_tasks
node_dashboard -.->|"views analytics"| node_analytics

click node_dashboard "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Dashboard/AppLeftMenu.php"
click node_website "https://github.com/shyamsitaula/samarium/blob/master/app/Http/Controllers/WebsiteController.php"
click node_products "https://github.com/shyamsitaula/samarium/blob/master/app/Models/Product/Product.php"
click node_sales "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/SaleInvoice/Dashboard/SaleInvoiceEditor.php"
click node_onlineorders "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/OnlineOrder/Dashboard/OnlineOrderComponent.php"
click node_customers "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Customer/Dashboard/CustomerComponent.php"
click node_inventory "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Inventory/InventoryComponent.php"
click node_purchases "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Purchase/Dashboard/PurchaseComponent.php"
click node_expenses "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Expense/Dashboard/ExpenseComponent.php"
click node_accounting "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Accounting/Dashboard/AccountingComponent.php"
click node_database "https://github.com/shyamsitaula/samarium/blob/master/config/database.php"
click node_cms "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Cms/Dashboard/WebpageComponent.php"
click node_reviews "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Product/Website/ProductReviewCreate.php"
click node_calendar "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Calendar/Dashboard/CalendarComponent.php"
click node_tasks "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Todo/Dashboard/TodoComponent.php"
click node_analytics "https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Report/Dashboard/ReportComponent.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_dashboard,node_website,node_staff toneBlue
class node_products,node_sales,node_onlineorders,node_customers,node_inventory toneAmber
class node_purchases,node_expenses,node_accounting,node_database toneMint
class node_cms,node_reviews toneRose
class node_calendar,node_tasks,node_analytics,node_visitor toneIndigo
```

## Components

### User entry points

- [Dashboard UI](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Dashboard/AppLeftMenu.php): `app/Livewire/Dashboard/AppLeftMenu.php`
- [Public website](https://github.com/shyamsitaula/samarium/blob/master/app/Http/Controllers/WebsiteController.php): `app/Http/Controllers/WebsiteController.php`

### Sales and commerce

- [Product catalog](https://github.com/shyamsitaula/samarium/blob/master/app/Models/Product/Product.php): `app/Models/Product/Product.php`
- [Sales and POS](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/SaleInvoice/Dashboard/SaleInvoiceEditor.php): `app/Livewire/SaleInvoice/Dashboard/SaleInvoiceEditor.php`
- [Online orders](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/OnlineOrder/Dashboard/OnlineOrderComponent.php): `app/Livewire/OnlineOrder/Dashboard/OnlineOrderComponent.php`
- [Customer records](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Customer/Dashboard/CustomerComponent.php): `app/Livewire/Customer/Dashboard/CustomerComponent.php`
- [Inventory tracking](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Inventory/InventoryComponent.php): `app/Livewire/Inventory/InventoryComponent.php`

### Business operations

- [Purchases](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Purchase/Dashboard/PurchaseComponent.php): `app/Livewire/Purchase/Dashboard/PurchaseComponent.php`
- [Expenses](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Expense/Dashboard/ExpenseComponent.php): `app/Livewire/Expense/Dashboard/ExpenseComponent.php`
- [Accounting](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Accounting/Dashboard/AccountingComponent.php): `app/Livewire/Accounting/Dashboard/AccountingComponent.php`
- [MySQL database](https://github.com/shyamsitaula/samarium/blob/master/config/database.php): `config/database.php`

### Website and content

- [CMS pages](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Cms/Dashboard/WebpageComponent.php): `app/Livewire/Cms/Dashboard/WebpageComponent.php`
- [Product reviews](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Product/Website/ProductReviewCreate.php): `app/Livewire/Product/Website/ProductReviewCreate.php`

### Workspace tools

- [Calendar](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Calendar/Dashboard/CalendarComponent.php): `app/Livewire/Calendar/Dashboard/CalendarComponent.php`
- [Task management](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Todo/Dashboard/TodoComponent.php): `app/Livewire/Todo/Dashboard/TodoComponent.php`
- [Analytics dashboard](https://github.com/shyamsitaula/samarium/blob/master/app/Livewire/Report/Dashboard/ReportComponent.php): `app/Livewire/Report/Dashboard/ReportComponent.php`

### Other components

- **Business user**
- **Website visitor**

## Connections

- Business user → Dashboard UI: uses (evidence: `README.md`)
- Website visitor → Public website: browses (evidence: `README.md`)
- Public website → Product catalog: loads products (evidence: `app/Http/Controllers/WebsiteController.php`)
- Public website → CMS pages: renders pages
- Product catalog → Product reviews: has reviews (evidence: `app/Models/Product/Product.php`)
- Dashboard UI → Sales and POS: records sales
- Dashboard UI → Customer records: manages customers
- Dashboard UI → Inventory tracking: tracks stock
- Dashboard UI → Purchases: records purchases
- Dashboard UI → Expenses: tracks expenses
- Dashboard UI → Accounting: reviews finances
- Dashboard UI → Online orders: manages orders
- Dashboard UI → CMS pages: manages content
- Dashboard UI → Calendar: uses calendar
- Dashboard UI → Task management: manages tasks
- Dashboard UI → Analytics dashboard: views analytics
