# syahrullah26/bastamifrozen architecture

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

- Interactive diagram: https://gitdiagram.com/syahrullah26/bastamifrozen
- Repository: https://github.com/syahrullah26/bastamifrozen

## Overview

This is a business-management application for inventory, purchasing, sales, payments, workforce, and financial reporting. Users work in the Next.js dashboard; its domain services call the Laravel API, whose controllers validate/process requests and read or update persistent business records. The sales and purchasing excerpts show stock and cost handling, while supplier payments allocate payments against purchase balances. Other capabilities are represented from the file tree; their detailed wiring was not sampled.

Main entry points: [`backend/routes/api.php`](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/routes/api.php) (Laravel API routes), [`backend/app/Models`](https://github.com/syahrullah26/bastamifrozen/tree/main/backend/app/Models) (Business models), [`frontend/src/lib/axios.ts`](https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/lib/axios.ts) (HTTP client), [`frontend/src/app/(dashboard)`](https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)) (Dashboard pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard"]
  node_dashboard["Dashboard pages"]
  node_login["Login page<br/>[page.tsx]"]
  node_services["Domain services"]
  node_http["HTTP client<br/>[axios.ts]"]
  node_authservice["Authentication service<br/>[authService.ts]"]
  node_financialpages["Finance and reports"]
  node_paymentsservice["Payment service<br/>[paymentService.ts]"]
  node_reportsservice["Report service"]
end

subgraph group_backend["Business API"]
  node_api["Laravel API routes<br/>[api.php]"]
  node_authcontroller["Authentication<br/>[AuthController.php]"]
  node_sales["Sales and stock<br/>[SaleController.php]"]
  node_purchases["Purchasing"]
  node_supplierpay["Supplier payments"]
  node_othercontrollers["Domain endpoints"]
end

subgraph group_data["Business Data"]
  node_models["Business models"]
  node_database[("Relational database<br/>[database.php]")]
end

subgraph group_workforce["Workforce"]
  node_workforcepages["Staff and attendance"]
  node_workforceapi["Workforce endpoints"]
end

node_user(("Business user"))

node_user -->|"uses"| node_dashboard
node_user -->|"signs in"| node_login
node_dashboard -->|"requests data"| node_services
node_workforcepages -->|"requests data"| node_services
node_financialpages -->|"requests reports"| node_reportsservice
node_dashboard -->|"manages payments"| node_paymentsservice
node_services -->|"sends requests"| node_http
node_paymentsservice -->|"sends requests"| node_http
node_reportsservice -->|"sends requests"| node_http
node_login -->|"submits credentials"| node_authservice
node_authservice -->|"sends requests"| node_http
node_http -->|"transfers API data"| node_api
node_api -->|"dispatches auth"| node_authcontroller
node_api -->|"dispatches sales"| node_sales
node_api -->|"dispatches purchasing"| node_purchases
node_api -->|"dispatches payments"| node_supplierpay
node_api -->|"dispatches requests"| node_othercontrollers
node_api -->|"dispatches workforce"| node_workforceapi
node_authcontroller -->|"reads and writes"| node_models
node_sales -->|"reads and updates"| node_models
node_purchases -->|"reads and updates"| node_models
node_supplierpay -->|"allocates and updates"| node_models
node_othercontrollers -->|"reads and writes"| node_models
node_workforceapi -->|"reads and writes"| node_models
node_models -->|"persists records"| node_database

click node_dashboard "https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)"
click node_login "https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/app/(auth)/login/page.tsx"
click node_services "https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/services"
click node_http "https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/lib/axios.ts"
click node_authservice "https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/services/authService.ts"
click node_api "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/routes/api.php"
click node_authcontroller "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/AuthController.php"
click node_sales "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/SaleController.php"
click node_purchases "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/PurchaseController.php"
click node_supplierpay "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/SupplierPaymentController.php"
click node_othercontrollers "https://github.com/syahrullah26/bastamifrozen/tree/main/backend/app/Http/Controllers/Api"
click node_models "https://github.com/syahrullah26/bastamifrozen/tree/main/backend/app/Models"
click node_database "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/config/database.php"
click node_workforcepages "https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)/employees"
click node_workforceapi "https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/EmployeeController.php"
click node_financialpages "https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)/revenue"
click node_paymentsservice "https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/services/paymentService.ts"
click node_reportsservice "https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/services/financialReportService.ts"

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_dashboard,node_login,node_services,node_http,node_authservice,node_financialpages,node_paymentsservice,node_reportsservice,node_user toneBlue
class node_api,node_authcontroller,node_sales,node_purchases,node_supplierpay,node_othercontrollers toneAmber
class node_models,node_database toneMint
class node_workforcepages,node_workforceapi toneRose
```

## Components

### Dashboard

- [Dashboard pages](https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)): `frontend/src/app/(dashboard)`
- [Login page](https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/app/(auth)/login/page.tsx): `frontend/src/app/(auth)/login/page.tsx`
- [Domain services](https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/services): `frontend/src/services`
- [HTTP client](https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/lib/axios.ts): `frontend/src/lib/axios.ts`
- [Authentication service](https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/services/authService.ts): `frontend/src/services/authService.ts`
- [Finance and reports](https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)/revenue): `frontend/src/app/(dashboard)/revenue`
- [Payment service](https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/services/paymentService.ts): `frontend/src/services/paymentService.ts`
- [Report service](https://github.com/syahrullah26/bastamifrozen/blob/main/frontend/src/services/financialReportService.ts): `frontend/src/services/financialReportService.ts`

### Business API

- [Laravel API routes](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Authentication](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/AuthController.php): `backend/app/Http/Controllers/Api/AuthController.php`
- [Sales and stock](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/SaleController.php): `backend/app/Http/Controllers/Api/SaleController.php`
- [Purchasing](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/PurchaseController.php): `backend/app/Http/Controllers/Api/PurchaseController.php`
- [Supplier payments](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/SupplierPaymentController.php): `backend/app/Http/Controllers/Api/SupplierPaymentController.php`
- [Domain endpoints](https://github.com/syahrullah26/bastamifrozen/tree/main/backend/app/Http/Controllers/Api): `backend/app/Http/Controllers/Api`

### Business Data

- [Business models](https://github.com/syahrullah26/bastamifrozen/tree/main/backend/app/Models): `backend/app/Models`
- [Relational database](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/config/database.php): `backend/config/database.php`

### Workforce

- [Staff and attendance](https://github.com/syahrullah26/bastamifrozen/tree/main/frontend/src/app/(dashboard)/employees): `frontend/src/app/(dashboard)/employees`
- [Workforce endpoints](https://github.com/syahrullah26/bastamifrozen/blob/main/backend/app/Http/Controllers/Api/EmployeeController.php): `backend/app/Http/Controllers/Api/EmployeeController.php`

### Other components

- **Business user**

## Connections

- Business user → Dashboard pages: uses
- Business user → Login page: signs in
- Dashboard pages → Domain services: requests data
- Staff and attendance → Domain services: requests data
- Finance and reports → Report service: requests reports
- Dashboard pages → Payment service: manages payments
- Domain services → HTTP client: sends requests
- Payment service → HTTP client: sends requests
- Report service → HTTP client: sends requests
- Login page → Authentication service: submits credentials
- Authentication service → HTTP client: sends requests
- HTTP client → Laravel API routes: transfers API data
- Laravel API routes → Authentication: dispatches auth
- Laravel API routes → Sales and stock: dispatches sales
- Laravel API routes → Purchasing: dispatches purchasing
- Laravel API routes → Supplier payments: dispatches payments
- Laravel API routes → Domain endpoints: dispatches requests
- Laravel API routes → Workforce endpoints: dispatches workforce
- Authentication → Business models: reads and writes
- Sales and stock → Business models: reads and updates
- Purchasing → Business models: reads and updates
- Supplier payments → Business models: allocates and updates
- Domain endpoints → Business models: reads and writes
- Workforce endpoints → Business models: reads and writes
- Business models → Relational database: persists records
