# vraj0112/textilemanagementsystem architecture

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

- Interactive diagram: https://gitdiagram.com/vraj0112/textilemanagementsystem
- Repository: https://github.com/vraj0112/textilemanagementsystem

## Overview

Textile Management System is a Laravel/Vue single-page application for recording textile purchases and sales and managing related business records. Users navigate the Vue app to maintain reference data, enter inward purchases and challans, create and manage invoices, and track expenses and credit; Laravel API controllers handle requests and persist records in MySQL. Invoice and challan PDF generation is also present. The README documents the product scope; routes and most feature screens were not excerpted, so uncertain request-to-controller links are shown as unverified rather than asserted.

Main entry points: [`routes/api.php`](https://github.com/vraj0112/textilemanagementsystem/blob/main/routes/api.php) (HTTP API), [`resources/router/index.js`](https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/router/index.js) (Page routing), [`config/database.php`](https://github.com/vraj0112/textilemanagementsystem/blob/main/config/database.php) (MySQL records), [`app/Http/Controllers/PDFController.php`](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/PDFController.php) (Document generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web interface"]
  node_entry["Vue application<br/>[app.js]"]
  node_router["Page routing<br/>[index.js]"]
  node_dashboard["Dashboard<br/>[Dashboard.vue]"]
  node_reference_ui["Reference screens"]
end

subgraph group_workflow["Trading workflows"]
  node_inward_ui["Inward screens"]
  node_challan_ui["Challan screens"]
  node_invoice_ui["Invoice screens"]
  node_inward["Inward handling"]
  node_challan["Challan handling"]
  node_invoice["Invoice handling"]
  node_pdf["Document generation<br/>[PDFController.php]"]
  node_challan_pdf["Challan PDF view"]
  node_invoice_pdf["Invoice PDF view"]
end

subgraph group_records["Business records"]
  node_records_api["Business record handlers"]
  node_customer["Customer records"]
  node_expense["Expense records"]
end

subgraph group_server["Laravel services"]
  node_api["HTTP API<br/>[api.php]"]
end

subgraph group_storage["Persistence"]
  node_database[("MySQL records<br/>[database.php]")]
end

node_operator(("Textile staff"))
node_external_db[("MySQL database")]

node_operator -->|"uses"| node_entry
node_entry -->|"loads"| node_router
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_reference_ui
node_router -->|"routes to"| node_inward_ui
node_router -->|"routes to"| node_challan_ui
node_router -->|"routes to"| node_invoice_ui
node_inward_ui -.->|"requests"| node_api
node_challan_ui -.->|"requests"| node_api
node_invoice_ui -.->|"requests"| node_api
node_api -.->|"dispatches"| node_inward
node_api -.->|"dispatches"| node_challan
node_api -.->|"dispatches"| node_invoice
node_api -.->|"dispatches"| node_records_api
node_records_api -.->|"includes"| node_customer
node_records_api -.->|"includes"| node_expense
node_inward -->|"queries"| node_database
node_challan -->|"writes"| node_database
node_invoice -->|"queries"| node_database
node_pdf -->|"reads"| node_database
node_pdf -.->|"renders"| node_challan_pdf
node_pdf -.->|"renders"| node_invoice_pdf
node_database -.->|"connects"| node_external_db

click node_entry "https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/js/app.js"
click node_router "https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/router/index.js"
click node_dashboard "https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/js/components/Dashboard.vue"
click node_reference_ui "https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components"
click node_inward_ui "https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components/Inward"
click node_challan_ui "https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components/Challan"
click node_invoice_ui "https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components/Invoice"
click node_api "https://github.com/vraj0112/textilemanagementsystem/blob/main/routes/api.php"
click node_inward "https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/InwardController.php"
click node_challan "https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/ChallanController.php"
click node_invoice "https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/InvoiceController.php"
click node_pdf "https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/PDFController.php"
click node_records_api "https://github.com/vraj0112/textilemanagementsystem/tree/main/app/Http/Controllers"
click node_customer "https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/CustomerController.php"
click node_expense "https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/ExpenseController.php"
click node_database "https://github.com/vraj0112/textilemanagementsystem/blob/main/config/database.php"
click node_challan_pdf "https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/views/challanPDF.blade.php"
click node_invoice_pdf "https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/views/invoicePDF.blade.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_entry,node_router,node_dashboard,node_reference_ui toneBlue
class node_inward_ui,node_challan_ui,node_invoice_ui,node_inward,node_challan,node_invoice,node_pdf,node_challan_pdf,node_invoice_pdf,node_external_db toneAmber
class node_records_api,node_customer,node_expense toneMint
class node_api toneRose
class node_database,node_operator toneIndigo
```

## Components

### Web interface

- [Vue application](https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/js/app.js): `resources/js/app.js`
- [Page routing](https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/router/index.js): `resources/router/index.js`
- [Dashboard](https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/js/components/Dashboard.vue): `resources/js/components/Dashboard.vue`
- [Reference screens](https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components): `resources/js/components`

### Trading workflows

- [Inward screens](https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components/Inward): `resources/js/components/Inward`
- [Challan screens](https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components/Challan): `resources/js/components/Challan`
- [Invoice screens](https://github.com/vraj0112/textilemanagementsystem/tree/main/resources/js/components/Invoice): `resources/js/components/Invoice`
- [Inward handling](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/InwardController.php): `app/Http/Controllers/InwardController.php`
- [Challan handling](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/ChallanController.php): `app/Http/Controllers/ChallanController.php`
- [Invoice handling](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/InvoiceController.php): `app/Http/Controllers/InvoiceController.php`
- [Document generation](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/PDFController.php): `app/Http/Controllers/PDFController.php`
- [Challan PDF view](https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/views/challanPDF.blade.php): `resources/views/challanPDF.blade.php`
- [Invoice PDF view](https://github.com/vraj0112/textilemanagementsystem/blob/main/resources/views/invoicePDF.blade.php): `resources/views/invoicePDF.blade.php`

### Business records

- [Business record handlers](https://github.com/vraj0112/textilemanagementsystem/tree/main/app/Http/Controllers): `app/Http/Controllers`
- [Customer records](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/CustomerController.php): `app/Http/Controllers/CustomerController.php`
- [Expense records](https://github.com/vraj0112/textilemanagementsystem/blob/main/app/Http/Controllers/ExpenseController.php): `app/Http/Controllers/ExpenseController.php`

### Laravel services

- [HTTP API](https://github.com/vraj0112/textilemanagementsystem/blob/main/routes/api.php): `routes/api.php`

### Persistence

- [MySQL records](https://github.com/vraj0112/textilemanagementsystem/blob/main/config/database.php): `config/database.php`

### Other components

- **Textile staff**
- **MySQL database**

## Connections

- Textile staff → Vue application: uses (evidence: `README.md`)
- Vue application → Page routing: loads (evidence: `resources/js/app.js`)
- Page routing → Dashboard: routes to (evidence: `resources/router/index.js`)
- Page routing → Reference screens: routes to (evidence: `resources/router/index.js`)
- Page routing → Inward screens: routes to (evidence: `resources/router/index.js`)
- Page routing → Challan screens: routes to (evidence: `resources/router/index.js`)
- Page routing → Invoice screens: routes to (evidence: `resources/router/index.js`)
- Inward screens → HTTP API: requests
- Challan screens → HTTP API: requests
- Invoice screens → HTTP API: requests
- HTTP API → Inward handling: dispatches
- HTTP API → Challan handling: dispatches
- HTTP API → Invoice handling: dispatches
- HTTP API → Business record handlers: dispatches
- Business record handlers → Customer records: includes
- Business record handlers → Expense records: includes
- Inward handling → MySQL records: queries (evidence: `app/Http/Controllers/InwardController.php`)
- Challan handling → MySQL records: writes (evidence: `app/Http/Controllers/ChallanController.php`)
- Invoice handling → MySQL records: queries (evidence: `app/Http/Controllers/InvoiceController.php`)
- Document generation → MySQL records: reads (evidence: `app/Http/Controllers/PDFController.php`)
- Document generation → Challan PDF view: renders
- Document generation → Invoice PDF view: renders
- MySQL records → MySQL database: connects
