# ariahansajunior/rollyn architecture

> Architecture diagram of the GitHub repository ariahansajunior/rollyn, 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/ariahansajunior/rollyn
- Repository: https://github.com/ariahansajunior/rollyn

## Overview

IDX AI WISE (Rollyn) is a warehouse-management system for finished paper rolls. Its primary flow captures and validates incoming-roll weight, records the roll, recommends a storage slot, and supports locating and verifying rolls during shipment. Separate capabilities cover JOP/production planning, warehouse visibility, reporting, user administration, notifications, and OCR model monitoring/training. The graph uses documented workflow links and excerpted controller/service calls; unsampled routes and UI wiring are not asserted.

Main entry points: [`app/Models/Jop.php`](https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Jop.php) (JOP and targets), [`app/Http/Controllers/SpectrumEngineController.php`](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/SpectrumEngineController.php) (SPECTRUM proxy), [`app/Http/Controllers/IncomingRollController.php`](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/IncomingRollController.php) (Incoming roll), [`resources/js/Components/IncomingRoll`](https://github.com/ariahansajunior/rollyn/tree/main/resources/js/Components/IncomingRoll) (Weight capture UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Receipt and Vision"]
  node_incoming["Incoming roll"]
  node_weight_ui["Weight capture UI"]
  node_ocr["Local OCR pipeline<br/>[OCRService.ts]"]
  node_image["Image processing<br/>[ImageProcessor.ts]"]
  node_spectrum_ui["SPECTRUM client"]
  node_spectrum_api["SPECTRUM service<br/>[app.py]"]
end

subgraph group_inventory["Inventory and Storage"]
  node_rolls["Roll inventory<br/>[RollController.php]"]
  node_roll_model[("Roll records<br/>[Roll.php]")]
  node_recommend["Slot recommendations"]
  node_locations[("Warehouse locations<br/>[Location.php]")]
  node_recommend_logs[("Recommendation history")]
  node_warehouse_map["Warehouse map<br/>[WarehouseMap.tsx]"]
  node_slot_status["Slot status<br/>[SlotStatus.tsx]"]
end

subgraph group_orders["Orders and Dispatch"]
  node_jop[("JOP and targets<br/>[Jop.php]")]
  node_jumbo["Jumbo roll production"]
  node_schedule["Production schedule"]
  node_shipments["Shipment management"]
end

subgraph group_insight["AI and Analytics"]
  node_spectrum_proxy["SPECTRUM proxy"]
  node_reporting["Reports and analytics"]
  node_training["OCR training<br/>[Training.tsx]"]
  node_monitoring["OCR monitoring<br/>[OcrMonitoring.tsx]"]
end

subgraph group_admin["Administration"]
  node_users[("User access<br/>[User.php]")]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_notifications["Notifications"]
end

node_operator(("Warehouse operator"))
node_mysql[("MySQL database")]
node_spectrum_external{{"SPECTRUM microservice"}}

node_operator -->|"records receipt"| node_incoming
node_incoming -->|"captures weight"| node_weight_ui
node_weight_ui -.->|"processes locally"| node_ocr
node_ocr -->|"uses processing"| node_image
node_weight_ui -.->|"offers vision mode"| node_spectrum_ui
node_spectrum_ui -.->|"sends detection"| node_spectrum_proxy
node_spectrum_proxy -->|"posts detection"| node_spectrum_external
node_spectrum_external -->|"returns inference"| node_spectrum_proxy
node_incoming -->|"records roll"| node_rolls
node_rolls -->|"reads and writes"| node_roll_model
node_rolls -.->|"requests slot"| node_recommend
node_recommend -->|"reads availability"| node_locations
node_recommend -.->|"records outcomes"| node_recommend_logs
node_operator -->|"views locations"| node_warehouse_map
node_warehouse_map -.->|"shows occupancy"| node_slot_status
node_operator -->|"manages orders"| node_jop
node_jop -->|"supports production rolls"| node_jumbo
node_jop -->|"plans production"| node_schedule
node_jop -->|"selects rolls"| node_shipments
node_shipments -.->|"dispatches rolls"| node_roll_model
node_operator -->|"reviews metrics"| node_reporting
node_operator -->|"trains vision"| node_training
node_operator -->|"reviews OCR"| node_monitoring
node_training -.->|"requests retraining"| node_spectrum_proxy
node_operator -->|"signs in"| node_auth
node_auth -.->|"authenticates"| node_users
node_operator -->|"receives alerts"| node_notifications
node_roll_model -.->|"persists data"| node_mysql
node_locations -.->|"persists slots"| node_mysql

click node_incoming "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/IncomingRollController.php"
click node_weight_ui "https://github.com/ariahansajunior/rollyn/tree/main/resources/js/Components/IncomingRoll"
click node_ocr "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/OCR/OCRService.ts"
click node_image "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/OCR/ImageProcessor.ts"
click node_spectrum_ui "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/SPECTRUM/SpectrumWeightDetectionEngine.tsx"
click node_spectrum_api "https://github.com/ariahansajunior/rollyn/blob/main/spectrum_engine/app.py"
click node_spectrum_proxy "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/SpectrumEngineController.php"
click node_rolls "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/RollController.php"
click node_roll_model "https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Roll.php"
click node_recommend "https://github.com/ariahansajunior/rollyn/blob/main/app/Services/SpectrumRecommendationEngine.php"
click node_locations "https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Location.php"
click node_recommend_logs "https://github.com/ariahansajunior/rollyn/blob/main/app/Models/LocationRecommendationLog.php"
click node_warehouse_map "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/WarehouseMap.tsx"
click node_slot_status "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/SlotStatus.tsx"
click node_jop "https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Jop.php"
click node_jumbo "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/JumboRollController.php"
click node_schedule "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/ProductionScheduleController.php"
click node_shipments "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/ShipmentController.php"
click node_reporting "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/ReportController.php"
click node_training "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/Training.tsx"
click node_monitoring "https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/OcrMonitoring.tsx"
click node_users "https://github.com/ariahansajunior/rollyn/blob/main/app/Models/User.php"
click node_auth "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/AuthController.php"
click node_notifications "https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/NotificationController.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_incoming,node_weight_ui,node_ocr,node_image,node_spectrum_ui,node_spectrum_api toneBlue
class node_rolls,node_roll_model,node_recommend,node_locations,node_recommend_logs,node_warehouse_map,node_slot_status,node_mysql toneAmber
class node_jop,node_jumbo,node_schedule,node_shipments toneMint
class node_spectrum_proxy,node_reporting,node_training,node_monitoring toneRose
class node_users,node_auth,node_notifications,node_operator,node_spectrum_external toneIndigo
```

## Components

### Receipt and Vision

- [Incoming roll](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/IncomingRollController.php): `app/Http/Controllers/IncomingRollController.php`
- [Weight capture UI](https://github.com/ariahansajunior/rollyn/tree/main/resources/js/Components/IncomingRoll): `resources/js/Components/IncomingRoll`
- [Local OCR pipeline](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/OCR/OCRService.ts): `resources/js/OCR/OCRService.ts`
- [Image processing](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/OCR/ImageProcessor.ts): `resources/js/OCR/ImageProcessor.ts`
- [SPECTRUM client](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/SPECTRUM/SpectrumWeightDetectionEngine.tsx): `resources/js/SPECTRUM/SpectrumWeightDetectionEngine.tsx`
- [SPECTRUM service](https://github.com/ariahansajunior/rollyn/blob/main/spectrum_engine/app.py): `spectrum_engine/app.py`

### Inventory and Storage

- [Roll inventory](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/RollController.php): `app/Http/Controllers/RollController.php`
- [Roll records](https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Roll.php): `app/Models/Roll.php`
- [Slot recommendations](https://github.com/ariahansajunior/rollyn/blob/main/app/Services/SpectrumRecommendationEngine.php): `app/Services/SpectrumRecommendationEngine.php`
- [Warehouse locations](https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Location.php): `app/Models/Location.php`
- [Recommendation history](https://github.com/ariahansajunior/rollyn/blob/main/app/Models/LocationRecommendationLog.php): `app/Models/LocationRecommendationLog.php`
- [Warehouse map](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/WarehouseMap.tsx): `resources/js/Pages/WarehouseMap.tsx`
- [Slot status](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/SlotStatus.tsx): `resources/js/Pages/SlotStatus.tsx`

### Orders and Dispatch

- [JOP and targets](https://github.com/ariahansajunior/rollyn/blob/main/app/Models/Jop.php): `app/Models/Jop.php`
- [Jumbo roll production](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/JumboRollController.php): `app/Http/Controllers/JumboRollController.php`
- [Production schedule](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/ProductionScheduleController.php): `app/Http/Controllers/ProductionScheduleController.php`
- [Shipment management](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/ShipmentController.php): `app/Http/Controllers/ShipmentController.php`

### AI and Analytics

- [SPECTRUM proxy](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/SpectrumEngineController.php): `app/Http/Controllers/SpectrumEngineController.php`
- [Reports and analytics](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`
- [OCR training](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/Training.tsx): `resources/js/Pages/Training.tsx`
- [OCR monitoring](https://github.com/ariahansajunior/rollyn/blob/main/resources/js/Pages/OcrMonitoring.tsx): `resources/js/Pages/OcrMonitoring.tsx`

### Administration

- [User access](https://github.com/ariahansajunior/rollyn/blob/main/app/Models/User.php): `app/Models/User.php`
- [Authentication](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Notifications](https://github.com/ariahansajunior/rollyn/blob/main/app/Http/Controllers/NotificationController.php): `app/Http/Controllers/NotificationController.php`

### Other components

- **Warehouse operator**
- **MySQL database**
- **SPECTRUM microservice**

## Connections

- Warehouse operator → Incoming roll: records receipt
- Incoming roll → Weight capture UI: captures weight
- Weight capture UI → Local OCR pipeline: processes locally
- Local OCR pipeline → Image processing: uses processing (evidence: `resources/js/OCR/OCRService.ts`)
- Weight capture UI → SPECTRUM client: offers vision mode
- SPECTRUM client → SPECTRUM proxy: sends detection
- SPECTRUM proxy → SPECTRUM microservice: posts detection (evidence: `app/Http/Controllers/SpectrumEngineController.php`)
- SPECTRUM microservice → SPECTRUM proxy: returns inference (evidence: `app/Http/Controllers/SpectrumEngineController.php`)
- Incoming roll → Roll inventory: records roll
- Roll inventory → Roll records: reads and writes (evidence: `app/Http/Controllers/RollController.php`)
- Roll inventory → Slot recommendations: requests slot
- Slot recommendations → Warehouse locations: reads availability (evidence: `app/Services/SpectrumRecommendationEngine.php`)
- Slot recommendations → Recommendation history: records outcomes (evidence: `app/Services/SpectrumRecommendationEngine.php`)
- Warehouse operator → Warehouse map: views locations
- Warehouse map → Slot status: shows occupancy
- Warehouse operator → JOP and targets: manages orders
- JOP and targets → Jumbo roll production: supports production rolls (evidence: `app/Models/Jop.php`)
- JOP and targets → Production schedule: plans production (evidence: `app/Models/Jop.php`)
- JOP and targets → Shipment management: selects rolls
- Shipment management → Roll records: dispatches rolls
- Warehouse operator → Reports and analytics: reviews metrics
- Warehouse operator → OCR training: trains vision
- Warehouse operator → OCR monitoring: reviews OCR
- OCR training → SPECTRUM proxy: requests retraining
- Warehouse operator → Authentication: signs in
- Authentication → User access: authenticates
- Warehouse operator → Notifications: receives alerts
- Roll records → MySQL database: persists data
- Warehouse locations → MySQL database: persists slots
