# shigosag/shigosagnexuserp architecture

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

- Interactive diagram: https://gitdiagram.com/shigosag/shigosagnexuserp
- Repository: https://github.com/shigosag/shigosagnexuserp

## Overview

Shigosag Nexus ERP is a Windows WPF desktop application for enterprise operations. The user-facing flow is launch and authenticate, enter the command-center dashboard, then navigate among sales, inventory, CRM, HR, finance, and settings. MVVM view models coordinate those domain screens with authentication, data, and notification services; EF Core persists the business entities. The README documents the product capabilities, while the sampled sources expose several service and dashboard data paths. Some view wiring and domain-view implementations were not excerpted, so those links are left unasserted.

Main entry points: [`ViewModels/MainViewModel.cs`](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/MainViewModel.cs) (Navigation), [`Data/AppDbContext.cs`](https://github.com/shigosag/shigosagnexuserp/blob/main/Data/AppDbContext.cs) (EF Core context), [`Services/DataService.cs`](https://github.com/shigosag/shigosagnexuserp/blob/main/Services/DataService.cs) (Business data service), [`ViewModels/DashboardViewModel.cs`](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/DashboardViewModel.cs) (Command center)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Desktop experience"]
  node_app["WPF application<br/>[App.xaml.cs]"]
  node_mainview["Main window<br/>[MainWindow.xaml]"]
  node_mainvm["Navigation<br/>[MainViewModel.cs]"]
  node_dashboardview["Dashboard view<br/>[DashboardView.xaml]"]
  node_inventoryview["Inventory view<br/>[InventoryView.xaml]"]
end

subgraph group_domains["Enterprise modules"]
  node_dashboard["Command center"]
  node_sales["Sales intelligence<br/>[SalesViewModel.cs]"]
  node_inventory["Inventory"]
  node_crm["CRM<br/>[CRMViewModel.cs]"]
  node_hr["Human resources<br/>[HRViewModel.cs]"]
  node_finance["Finance"]
  node_settings["Settings"]
end

subgraph group_services["Application services"]
  node_auth["Authentication<br/>[AuthService.cs]"]
  node_jwt["JWT tokens<br/>[JwtTokenService.cs]"]
  node_dataservice["Business data service<br/>[DataService.cs]"]
  node_notifications["Notifications"]
end

subgraph group_persistence["Data and entities"]
  node_db[("EF Core context<br/>[AppDbContext.cs]")]
  node_userentity["User records<br/>[User.cs]"]
  node_product["Product records<br/>[Product.cs]"]
  node_customer["Customer records<br/>[Customer.cs]"]
  node_order["Order records<br/>[Order.cs]"]
  node_employee["Employee records<br/>[Employee.cs]"]
end

node_user(("ERP user"))

node_user -->|"launches"| node_app
node_app -.->|"authenticates"| node_auth
node_user -->|"signs in"| node_auth
node_user -->|"views analytics"| node_dashboard
node_user -->|"opens sales"| node_sales
node_user -->|"opens inventory"| node_inventory
node_user -->|"opens CRM"| node_crm
node_user -->|"opens HR"| node_hr
node_user -->|"opens finance"| node_finance
node_user -->|"opens settings"| node_settings
node_mainview -.->|"binds to"| node_mainvm
node_mainvm -.->|"coordinates"| node_dashboard
node_mainvm -.->|"coordinates"| node_sales
node_mainvm -.->|"coordinates"| node_inventory
node_mainvm -.->|"coordinates"| node_crm
node_mainvm -.->|"coordinates"| node_hr
node_mainvm -.->|"coordinates"| node_finance
node_mainvm -.->|"coordinates"| node_settings
node_dashboardview -.->|"presents"| node_dashboard
node_inventoryview -.->|"presents"| node_inventory
node_auth -->|"checks users"| node_db
node_auth -->|"creates tokens"| node_jwt
node_dataservice -->|"reads and writes"| node_db
node_dashboard -->|"queries telemetry"| node_db
node_dashboard -->|"reports refresh"| node_notifications
node_dataservice -->|"manages"| node_product
node_dataservice -->|"manages"| node_customer
node_dataservice -->|"manages"| node_order
node_dataservice -->|"manages"| node_employee
node_db -->|"maps"| node_userentity
node_db -->|"maps"| node_product
node_db -->|"maps"| node_customer
node_db -->|"maps"| node_order
node_db -->|"maps"| node_employee

click node_app "https://github.com/shigosag/shigosagnexuserp/blob/main/App.xaml.cs"
click node_mainview "https://github.com/shigosag/shigosagnexuserp/blob/main/Views/MainWindow.xaml"
click node_mainvm "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/MainViewModel.cs"
click node_dashboard "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/DashboardViewModel.cs"
click node_sales "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/SalesViewModel.cs"
click node_inventory "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/InventoryViewModel.cs"
click node_crm "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/CRMViewModel.cs"
click node_hr "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/HRViewModel.cs"
click node_finance "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/FinanceViewModel.cs"
click node_settings "https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/SettingsViewModel.cs"
click node_dashboardview "https://github.com/shigosag/shigosagnexuserp/blob/main/Views/DashboardView.xaml"
click node_inventoryview "https://github.com/shigosag/shigosagnexuserp/blob/main/Views/InventoryView.xaml"
click node_auth "https://github.com/shigosag/shigosagnexuserp/blob/main/Services/AuthService.cs"
click node_jwt "https://github.com/shigosag/shigosagnexuserp/blob/main/Services/JwtTokenService.cs"
click node_dataservice "https://github.com/shigosag/shigosagnexuserp/blob/main/Services/DataService.cs"
click node_notifications "https://github.com/shigosag/shigosagnexuserp/blob/main/Services/NotificationService.cs"
click node_db "https://github.com/shigosag/shigosagnexuserp/blob/main/Data/AppDbContext.cs"
click node_userentity "https://github.com/shigosag/shigosagnexuserp/blob/main/Models/User.cs"
click node_product "https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Product.cs"
click node_customer "https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Customer.cs"
click node_order "https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Order.cs"
click node_employee "https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Employee.cs"

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_mainview,node_mainvm,node_dashboardview,node_inventoryview,node_user toneBlue
class node_dashboard,node_sales,node_inventory,node_crm,node_hr,node_finance,node_settings toneAmber
class node_auth,node_jwt,node_dataservice,node_notifications toneMint
class node_db,node_userentity,node_product,node_customer,node_order,node_employee toneRose
```

## Components

### Desktop experience

- [WPF application](https://github.com/shigosag/shigosagnexuserp/blob/main/App.xaml.cs): `App.xaml.cs`
- [Main window](https://github.com/shigosag/shigosagnexuserp/blob/main/Views/MainWindow.xaml): `Views/MainWindow.xaml`
- [Navigation](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/MainViewModel.cs): `ViewModels/MainViewModel.cs`
- [Dashboard view](https://github.com/shigosag/shigosagnexuserp/blob/main/Views/DashboardView.xaml): `Views/DashboardView.xaml`
- [Inventory view](https://github.com/shigosag/shigosagnexuserp/blob/main/Views/InventoryView.xaml): `Views/InventoryView.xaml`

### Enterprise modules

- [Command center](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/DashboardViewModel.cs): `ViewModels/DashboardViewModel.cs`
- [Sales intelligence](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/SalesViewModel.cs): `ViewModels/SalesViewModel.cs`
- [Inventory](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/InventoryViewModel.cs): `ViewModels/InventoryViewModel.cs`
- [CRM](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/CRMViewModel.cs): `ViewModels/CRMViewModel.cs`
- [Human resources](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/HRViewModel.cs): `ViewModels/HRViewModel.cs`
- [Finance](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/FinanceViewModel.cs): `ViewModels/FinanceViewModel.cs`
- [Settings](https://github.com/shigosag/shigosagnexuserp/blob/main/ViewModels/SettingsViewModel.cs): `ViewModels/SettingsViewModel.cs`

### Application services

- [Authentication](https://github.com/shigosag/shigosagnexuserp/blob/main/Services/AuthService.cs): `Services/AuthService.cs`
- [JWT tokens](https://github.com/shigosag/shigosagnexuserp/blob/main/Services/JwtTokenService.cs): `Services/JwtTokenService.cs`
- [Business data service](https://github.com/shigosag/shigosagnexuserp/blob/main/Services/DataService.cs): `Services/DataService.cs`
- [Notifications](https://github.com/shigosag/shigosagnexuserp/blob/main/Services/NotificationService.cs): `Services/NotificationService.cs`

### Data and entities

- [EF Core context](https://github.com/shigosag/shigosagnexuserp/blob/main/Data/AppDbContext.cs): `Data/AppDbContext.cs`
- [User records](https://github.com/shigosag/shigosagnexuserp/blob/main/Models/User.cs): `Models/User.cs`
- [Product records](https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Product.cs): `Models/Product.cs`
- [Customer records](https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Customer.cs): `Models/Customer.cs`
- [Order records](https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Order.cs): `Models/Order.cs`
- [Employee records](https://github.com/shigosag/shigosagnexuserp/blob/main/Models/Employee.cs): `Models/Employee.cs`

### Other components

- **ERP user**

## Connections

- ERP user → WPF application: launches (evidence: `README.md`)
- WPF application → Authentication: authenticates (evidence: `App.xaml.cs`)
- ERP user → Authentication: signs in (evidence: `README.md`)
- ERP user → Command center: views analytics (evidence: `README.md`)
- ERP user → Sales intelligence: opens sales (evidence: `README.md`)
- ERP user → Inventory: opens inventory (evidence: `README.md`)
- ERP user → CRM: opens CRM (evidence: `README.md`)
- ERP user → Human resources: opens HR (evidence: `README.md`)
- ERP user → Finance: opens finance (evidence: `README.md`)
- ERP user → Settings: opens settings (evidence: `README.md`)
- Main window → Navigation: binds to
- Navigation → Command center: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Navigation → Sales intelligence: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Navigation → Inventory: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Navigation → CRM: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Navigation → Human resources: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Navigation → Finance: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Navigation → Settings: coordinates (evidence: `ViewModels/MainViewModel.cs`)
- Dashboard view → Command center: presents
- Inventory view → Inventory: presents
- Authentication → EF Core context: checks users (evidence: `Services/AuthService.cs`)
- Authentication → JWT tokens: creates tokens (evidence: `Services/AuthService.cs`)
- Business data service → EF Core context: reads and writes (evidence: `Services/DataService.cs`)
- Command center → EF Core context: queries telemetry (evidence: `ViewModels/DashboardViewModel.cs`)
- Command center → Notifications: reports refresh (evidence: `ViewModels/DashboardViewModel.cs`)
- Business data service → Product records: manages (evidence: `Services/DataService.cs`)
- Business data service → Customer records: manages (evidence: `Services/DataService.cs`)
- Business data service → Order records: manages (evidence: `Services/DataService.cs`)
- Business data service → Employee records: manages (evidence: `Services/DataService.cs`)
- EF Core context → User records: maps (evidence: `Data/AppDbContext.cs`)
- EF Core context → Product records: maps (evidence: `Data/AppDbContext.cs`)
- EF Core context → Customer records: maps (evidence: `Data/AppDbContext.cs`)
- EF Core context → Order records: maps (evidence: `Data/AppDbContext.cs`)
- EF Core context → Employee records: maps (evidence: `Data/AppDbContext.cs`)
