# point-red/point architecture

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

- Interactive diagram: https://gitdiagram.com/point-red/point
- Repository: https://github.com/point-red/point

## Overview

Point is a Laravel-based, multi-tenant ERP exposed through API and web controllers. The principal workflow is project/tenant setup, user access to tenant-scoped business operations, then reporting or exports from recorded activity. The tree shows broad domains including purchasing, sales, inventory, manufacturing, accounting, finance, HR, and plugins. Sampled sources confirm project provisioning, tenant-scoped customer and salary handling, a ratio-report calculation, and sales-visitation photo storage; many domain links are omitted because their implementation was not sampled.

Main entry points: [`app/Http/Controllers/Api`](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api) (API Controllers), [`app/Helpers/StorageHelper.php`](https://github.com/point-red/point/blob/alpha1/app/Helpers/StorageHelper.php) (Visitation Photos), [`app/Http/Controllers/Web/CloudStorageController.php`](https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Web/CloudStorageController.php) (File Downloads), [`app/Model/CloudStorage.php`](https://github.com/point-red/point/blob/alpha1/app/Model/CloudStorage.php) (Cloud Storage Records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tenant["Tenant and Access"]
  node_projects["Project Management"]
  node_tenantdb[("Tenant Databases")]
end

subgraph group_operations["Business Operations"]
  node_masters["Master Data"]
  node_sales["Sales"]
  node_purchasing["Purchasing"]
  node_inventory["Inventory"]
  node_manufacturing["Manufacturing"]
  node_pos["Point of Sale<br/>[BillController.php]"]
end

subgraph group_finance["Finance and Accounting"]
  node_accounting["Accounting"]
  node_financeops["Finance"]
  node_ratio["Ratio Calculations"]
end

subgraph group_people["People and Plugins"]
  node_hr["Human Resources"]
  node_pinpoint["PinPoint Plugin"]
  node_otherplugins["Other Plugins"]
  node_visitation["Visitation Photos<br/>[StorageHelper.php]"]
end

subgraph group_platform["Shared Platform"]
  node_api["API Controllers"]
  node_web["Web Controllers"]
  node_reports["Reports and Exports"]
  node_cloudcontroller["Cloud Storage API"]
  node_cloudmodel[("Cloud Storage Records<br/>[CloudStorage.php]")]
  node_filedisk[("File Storage")]
  node_download["File Downloads"]
end

node_users(("Users"))

node_users -->|"submit requests"| node_api
node_users -->|"request pages"| node_web
node_api -->|"dispatches"| node_projects
node_projects -->|"provisions or deletes"| node_tenantdb
node_api -->|"dispatches"| node_masters
node_api -->|"dispatches"| node_sales
node_api -->|"dispatches"| node_purchasing
node_api -->|"dispatches"| node_inventory
node_api -->|"dispatches"| node_manufacturing
node_api -->|"dispatches"| node_pos
node_api -->|"dispatches"| node_accounting
node_api -->|"dispatches"| node_financeops
node_api -->|"dispatches"| node_hr
node_api -->|"dispatches"| node_pinpoint
node_api -->|"dispatches"| node_otherplugins
node_api -->|"generates exports"| node_reports
node_api -->|"calls calculation"| node_ratio
node_ratio -->|"returns result"| node_api
node_api -->|"reads and writes"| node_tenantdb
node_api -->|"calls upload"| node_visitation
node_visitation -->|"stores image"| node_filedisk
node_visitation -->|"saves metadata"| node_cloudmodel
node_cloudcontroller -->|"queries and updates"| node_cloudmodel
node_cloudcontroller -->|"stores and deletes files"| node_filedisk
node_web -->|"serves download"| node_download
node_download -->|"looks up key"| node_cloudmodel
node_download -->|"reads file"| node_filedisk

click node_api "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api"
click node_web "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Web"
click node_projects "https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Api/Project/ProjectController.php"
click node_tenantdb "https://github.com/point-red/point/tree/alpha1/app/Console/Commands/Tenant/Database"
click node_masters "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Master"
click node_sales "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Sales"
click node_purchasing "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Purchase"
click node_inventory "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Inventory"
click node_manufacturing "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Manufacture"
click node_pos "https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Api/Pos/BillController.php"
click node_accounting "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Accounting"
click node_financeops "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Finance"
click node_hr "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/HumanResource"
click node_pinpoint "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Plugin/PinPoint"
click node_otherplugins "https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Plugin"
click node_reports "https://github.com/point-red/point/tree/alpha1/app/Exports"
click node_ratio "https://github.com/point-red/point/tree/alpha1/app/Helpers/Ratio"
click node_visitation "https://github.com/point-red/point/blob/alpha1/app/Helpers/StorageHelper.php"
click node_cloudcontroller "https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Api/StorageController.php"
click node_cloudmodel "https://github.com/point-red/point/blob/alpha1/app/Model/CloudStorage.php"
click node_download "https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Web/CloudStorageController.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_projects,node_tenantdb,node_users toneBlue
class node_masters,node_sales,node_purchasing,node_inventory,node_manufacturing,node_pos toneAmber
class node_accounting,node_financeops,node_ratio toneMint
class node_hr,node_pinpoint,node_otherplugins,node_visitation toneRose
class node_api,node_web,node_reports,node_cloudcontroller,node_cloudmodel,node_filedisk,node_download toneIndigo
```

## Components

### Tenant and Access

- [Project Management](https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Api/Project/ProjectController.php): `app/Http/Controllers/Api/Project/ProjectController.php`
- [Tenant Databases](https://github.com/point-red/point/tree/alpha1/app/Console/Commands/Tenant/Database): `app/Console/Commands/Tenant/Database`

### Business Operations

- [Master Data](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Master): `app/Http/Controllers/Api/Master`
- [Sales](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Sales): `app/Http/Controllers/Api/Sales`
- [Purchasing](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Purchase): `app/Http/Controllers/Api/Purchase`
- [Inventory](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Inventory): `app/Http/Controllers/Api/Inventory`
- [Manufacturing](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Manufacture): `app/Http/Controllers/Api/Manufacture`
- [Point of Sale](https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Api/Pos/BillController.php): `app/Http/Controllers/Api/Pos/BillController.php`

### Finance and Accounting

- [Accounting](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Accounting): `app/Http/Controllers/Api/Accounting`
- [Finance](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Finance): `app/Http/Controllers/Api/Finance`
- [Ratio Calculations](https://github.com/point-red/point/tree/alpha1/app/Helpers/Ratio): `app/Helpers/Ratio`

### People and Plugins

- [Human Resources](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/HumanResource): `app/Http/Controllers/Api/HumanResource`
- [PinPoint Plugin](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Plugin/PinPoint): `app/Http/Controllers/Api/Plugin/PinPoint`
- [Other Plugins](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api/Plugin): `app/Http/Controllers/Api/Plugin`
- [Visitation Photos](https://github.com/point-red/point/blob/alpha1/app/Helpers/StorageHelper.php): `app/Helpers/StorageHelper.php`

### Shared Platform

- [API Controllers](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Api): `app/Http/Controllers/Api`
- [Web Controllers](https://github.com/point-red/point/tree/alpha1/app/Http/Controllers/Web): `app/Http/Controllers/Web`
- [Reports and Exports](https://github.com/point-red/point/tree/alpha1/app/Exports): `app/Exports`
- [Cloud Storage API](https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Api/StorageController.php): `app/Http/Controllers/Api/StorageController.php`
- [Cloud Storage Records](https://github.com/point-red/point/blob/alpha1/app/Model/CloudStorage.php): `app/Model/CloudStorage.php`
- **File Storage**
- [File Downloads](https://github.com/point-red/point/blob/alpha1/app/Http/Controllers/Web/CloudStorageController.php): `app/Http/Controllers/Web/CloudStorageController.php`

### Other components

- **Users**

## Connections

- Users → API Controllers: submit requests
- Users → Web Controllers: request pages
- API Controllers → Project Management: dispatches
- Project Management → Tenant Databases: provisions or deletes
- API Controllers → Master Data: dispatches
- API Controllers → Sales: dispatches
- API Controllers → Purchasing: dispatches
- API Controllers → Inventory: dispatches
- API Controllers → Manufacturing: dispatches
- API Controllers → Point of Sale: dispatches
- API Controllers → Accounting: dispatches
- API Controllers → Finance: dispatches
- API Controllers → Human Resources: dispatches
- API Controllers → PinPoint Plugin: dispatches
- API Controllers → Other Plugins: dispatches
- API Controllers → Reports and Exports: generates exports
- API Controllers → Ratio Calculations: calls calculation
- Ratio Calculations → API Controllers: returns result
- API Controllers → Tenant Databases: reads and writes
- API Controllers → Visitation Photos: calls upload
- Visitation Photos → File Storage: stores image
- Visitation Photos → Cloud Storage Records: saves metadata
- Cloud Storage API → Cloud Storage Records: queries and updates
- Cloud Storage API → File Storage: stores and deletes files
- Web Controllers → File Downloads: serves download
- File Downloads → Cloud Storage Records: looks up key
- File Downloads → File Storage: reads file
