# khoroshun/worldmech architecture

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

- Interactive diagram: https://gitdiagram.com/khoroshun/worldmech
- Repository: https://github.com/khoroshun/worldmech

## Overview

This Laravel application provides a Nova-administered scientific data catalog: administrators manage materials, constants, datasets, and dataset data points, with chart-related support and scientific-number formatting. The documented setup describes running the application and database but does not describe a separate end-user workflow. The graph focuses on the visible Nova and model workflow; routes and several implementation details were not sampled, so unsupported runtime connections are omitted.

Main entry points: [`app/Providers/NovaServiceProvider.php`](https://github.com/khoroshun/worldmech/blob/main/app/Providers/NovaServiceProvider.php) (Nova registration), [`app/Nova/Resource.php`](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Resource.php) (Resource queries), [`config/database.php`](https://github.com/khoroshun/worldmech/blob/main/config/database.php) (Application database), [`app/Nova/Dataset.php`](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Dataset.php) (Dataset resource)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Nova administration"]
  node_nova_provider["Nova registration"]
  node_nova_dataset["Dataset resource<br/>[Dataset.php]"]
  node_nova_datapoint["Data point resource<br/>[DataPoint.php]"]
  node_nova_material["Material resource<br/>[Material.php]"]
  node_nova_constant["Constant resource<br/>[Constant.php]"]
  node_nova_user["User resource<br/>[User.php]"]
  node_dashboard["Main dashboard<br/>[Main.php]"]
  node_resource_base["Resource queries<br/>[Resource.php]"]
end

subgraph group_domain["Scientific data"]
  node_dataset_model["Dataset model<br/>[Dataset.php]"]
  node_datapoint_model["Data point model<br/>[DataPoint.php]"]
  node_material_model["Material model<br/>[Material.php]"]
  node_constant_model["Constant model<br/>[Constant.php]"]
  node_scale_type["Scale type<br/>[ScaleType.php]"]
  node_user_model["User model<br/>[User.php]"]
end

subgraph group_presentation["Charts and formatting"]
  node_dataset_chart["Dataset chart<br/>[DatasetChart.php]"]
  node_chart_script["Dataset chart script"]
  node_scientific_formatter["Scientific formatter"]
end

subgraph group_platform["Application platform"]
  node_database[("Application database<br/>[database.php]")]
  node_app_bootstrap["Laravel bootstrap<br/>[app.php]"]
end

node_admin_user(("Administrator"))

node_admin_user -.->|"uses admin"| node_nova_provider
node_nova_provider -->|"registers resource"| node_nova_dataset
node_nova_provider -->|"registers resource"| node_nova_datapoint
node_nova_provider -->|"registers resource"| node_nova_material
node_nova_provider -->|"registers resource"| node_nova_constant
node_nova_provider -->|"lists dashboard"| node_dashboard
node_nova_dataset -->|"extends"| node_resource_base
node_nova_datapoint -->|"extends"| node_resource_base
node_nova_material -->|"extends"| node_resource_base
node_nova_constant -->|"extends"| node_resource_base
node_nova_user -->|"extends"| node_resource_base
node_nova_dataset -->|"uses model"| node_dataset_model
node_nova_datapoint -->|"uses model"| node_datapoint_model
node_nova_material -->|"uses model"| node_material_model
node_nova_constant -->|"uses model"| node_constant_model
node_nova_user -->|"uses model"| node_user_model
node_datapoint_model -->|"belongs to"| node_dataset_model
node_datapoint_model -->|"checks scale"| node_scale_type
node_nova_dataset -->|"configures chart"| node_dataset_chart
node_nova_datapoint -->|"formats values"| node_scientific_formatter
node_nova_provider -->|"registers script"| node_chart_script
node_dataset_model -.->|"persists records"| node_database
node_datapoint_model -.->|"persists records"| node_database
node_material_model -.->|"persists records"| node_database
node_constant_model -.->|"persists records"| node_database
node_user_model -.->|"persists records"| node_database
node_app_bootstrap -.->|"boots provider"| node_nova_provider

click node_nova_provider "https://github.com/khoroshun/worldmech/blob/main/app/Providers/NovaServiceProvider.php"
click node_nova_dataset "https://github.com/khoroshun/worldmech/blob/main/app/Nova/Dataset.php"
click node_nova_datapoint "https://github.com/khoroshun/worldmech/blob/main/app/Nova/DataPoint.php"
click node_nova_material "https://github.com/khoroshun/worldmech/blob/main/app/Nova/Material.php"
click node_nova_constant "https://github.com/khoroshun/worldmech/blob/main/app/Nova/Constant.php"
click node_nova_user "https://github.com/khoroshun/worldmech/blob/main/app/Nova/User.php"
click node_dashboard "https://github.com/khoroshun/worldmech/blob/main/app/Nova/Dashboards/Main.php"
click node_resource_base "https://github.com/khoroshun/worldmech/blob/main/app/Nova/Resource.php"
click node_dataset_model "https://github.com/khoroshun/worldmech/blob/main/app/Models/Dataset.php"
click node_datapoint_model "https://github.com/khoroshun/worldmech/blob/main/app/Models/DataPoint.php"
click node_material_model "https://github.com/khoroshun/worldmech/blob/main/app/Models/Material.php"
click node_constant_model "https://github.com/khoroshun/worldmech/blob/main/app/Models/Constant.php"
click node_scale_type "https://github.com/khoroshun/worldmech/blob/main/app/Enums/ScaleType.php"
click node_user_model "https://github.com/khoroshun/worldmech/blob/main/app/Models/User.php"
click node_database "https://github.com/khoroshun/worldmech/blob/main/config/database.php"
click node_dataset_chart "https://github.com/khoroshun/worldmech/blob/main/app/Nova/Charts/DatasetChart.php"
click node_chart_script "https://github.com/khoroshun/worldmech/blob/main/resources/js/nova-dataset-chart.js"
click node_scientific_formatter "https://github.com/khoroshun/worldmech/blob/main/app/Support/ScientificFormatter.php"
click node_app_bootstrap "https://github.com/khoroshun/worldmech/blob/main/bootstrap/app.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_nova_provider,node_nova_dataset,node_nova_datapoint,node_nova_material,node_nova_constant,node_nova_user,node_dashboard,node_resource_base toneBlue
class node_dataset_model,node_datapoint_model,node_material_model,node_constant_model,node_scale_type,node_user_model toneAmber
class node_dataset_chart,node_chart_script,node_scientific_formatter toneMint
class node_database,node_app_bootstrap toneRose
class node_admin_user toneIndigo
```

## Components

### Nova administration

- [Nova registration](https://github.com/khoroshun/worldmech/blob/main/app/Providers/NovaServiceProvider.php): `app/Providers/NovaServiceProvider.php`
- [Dataset resource](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Dataset.php): `app/Nova/Dataset.php`
- [Data point resource](https://github.com/khoroshun/worldmech/blob/main/app/Nova/DataPoint.php): `app/Nova/DataPoint.php`
- [Material resource](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Material.php): `app/Nova/Material.php`
- [Constant resource](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Constant.php): `app/Nova/Constant.php`
- [User resource](https://github.com/khoroshun/worldmech/blob/main/app/Nova/User.php): `app/Nova/User.php`
- [Main dashboard](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Dashboards/Main.php): `app/Nova/Dashboards/Main.php`
- [Resource queries](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Resource.php): `app/Nova/Resource.php`

### Scientific data

- [Dataset model](https://github.com/khoroshun/worldmech/blob/main/app/Models/Dataset.php): `app/Models/Dataset.php`
- [Data point model](https://github.com/khoroshun/worldmech/blob/main/app/Models/DataPoint.php): `app/Models/DataPoint.php`
- [Material model](https://github.com/khoroshun/worldmech/blob/main/app/Models/Material.php): `app/Models/Material.php`
- [Constant model](https://github.com/khoroshun/worldmech/blob/main/app/Models/Constant.php): `app/Models/Constant.php`
- [Scale type](https://github.com/khoroshun/worldmech/blob/main/app/Enums/ScaleType.php): `app/Enums/ScaleType.php`
- [User model](https://github.com/khoroshun/worldmech/blob/main/app/Models/User.php): `app/Models/User.php`

### Charts and formatting

- [Dataset chart](https://github.com/khoroshun/worldmech/blob/main/app/Nova/Charts/DatasetChart.php): `app/Nova/Charts/DatasetChart.php`
- [Dataset chart script](https://github.com/khoroshun/worldmech/blob/main/resources/js/nova-dataset-chart.js): `resources/js/nova-dataset-chart.js`
- [Scientific formatter](https://github.com/khoroshun/worldmech/blob/main/app/Support/ScientificFormatter.php): `app/Support/ScientificFormatter.php`

### Application platform

- [Application database](https://github.com/khoroshun/worldmech/blob/main/config/database.php): `config/database.php`
- [Laravel bootstrap](https://github.com/khoroshun/worldmech/blob/main/bootstrap/app.php): `bootstrap/app.php`

### Other components

- **Administrator**

## Connections

- Administrator → Nova registration: uses admin
- Nova registration → Dataset resource: registers resource (evidence: `app/Providers/NovaServiceProvider.php`)
- Nova registration → Data point resource: registers resource (evidence: `app/Providers/NovaServiceProvider.php`)
- Nova registration → Material resource: registers resource (evidence: `app/Providers/NovaServiceProvider.php`)
- Nova registration → Constant resource: registers resource (evidence: `app/Providers/NovaServiceProvider.php`)
- Nova registration → Main dashboard: lists dashboard (evidence: `app/Providers/NovaServiceProvider.php`)
- Dataset resource → Resource queries: extends (evidence: `app/Nova/Dataset.php`)
- Data point resource → Resource queries: extends (evidence: `app/Nova/DataPoint.php`)
- Material resource → Resource queries: extends
- Constant resource → Resource queries: extends (evidence: `app/Nova/Constant.php`)
- User resource → Resource queries: extends (evidence: `app/Nova/User.php`)
- Dataset resource → Dataset model: uses model (evidence: `app/Nova/Dataset.php`)
- Data point resource → Data point model: uses model (evidence: `app/Nova/DataPoint.php`)
- Material resource → Material model: uses model
- Constant resource → Constant model: uses model (evidence: `app/Nova/Constant.php`)
- User resource → User model: uses model (evidence: `app/Nova/User.php`)
- Data point model → Dataset model: belongs to (evidence: `app/Models/DataPoint.php`)
- Data point model → Scale type: checks scale (evidence: `app/Models/DataPoint.php`)
- Dataset resource → Dataset chart: configures chart (evidence: `app/Nova/Dataset.php`)
- Data point resource → Scientific formatter: formats values (evidence: `app/Nova/DataPoint.php`)
- Nova registration → Dataset chart script: registers script (evidence: `app/Providers/NovaServiceProvider.php`)
- Dataset model → Application database: persists records
- Data point model → Application database: persists records
- Material model → Application database: persists records
- Constant model → Application database: persists records
- User model → Application database: persists records
- Laravel bootstrap → Nova registration: boots provider
