# kalaigram/aurevant-pkk architecture

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

- Interactive diagram: https://gitdiagram.com/kalaigram/aurevant-pkk
- Repository: https://github.com/kalaigram/aurevant-pkk

## Overview

Aurevant PKK is a multi-company, multi-branch operations platform. The visible workflow is a user working in the Vue client, which authenticates and presents company-scoped features backed by a Laravel API. The backend exposes operational domains spanning sales, stock, purchasing, finance, service orders, accounting, and workforce management. The README provides little architectural detail, so domain coverage uses exact directories from the tree; only sampled controller, routing, and persistence relationships are shown as verified.

Main entry points: [`server/app/Http/Controllers/Api/V1`](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Http/Controllers/Api/V1) (API controllers), [`client/src/App.vue`](https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/App.vue) (Vue application), [`server/routes/api.php`](https://github.com/kalaigram/aurevant-pkk/blob/main/server/routes/api.php) (API routes), [`client/src/stores/auth.ts`](https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/stores/auth.ts) (Authentication state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_vue["Vue application<br/>[App.vue]"]
  node_auth["Authentication state<br/>[auth.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_client_features["Company features"]
end

subgraph group_api["API and application"]
  node_routes["API routes<br/>[api.php]"]
  node_controllers["API controllers"]
  node_access["Company access"]
  node_persistence[("Eloquent repositories")]
end

subgraph group_operations["Commerce operations"]
  node_sales["Sales and service"]
  node_catalog_stock["Catalog and stock"]
  node_purchasing["Purchasing"]
  node_branches["Company and branches"]
end

subgraph group_finance["Finance and reporting"]
  node_finance_ops["Finance operations"]
  node_ledger["Accounting ledger"]
  node_reports["Reports and dashboard"]
  node_billing["Plans and billing"]
end

subgraph group_workforce["Workforce management"]
  node_payroll["Payroll"]
  node_attendance["Attendance and leave"]
  node_scheduling["Employee scheduling"]
  node_access_roles["Roles and assignments"]
  node_notifications["Notifications and approvals"]
end

node_user(("Company user"))

node_user -->|"uses"| node_vue
node_vue -->|"reads session"| node_auth
node_auth -->|"calls"| node_api_client
node_vue -->|"renders routes"| node_client_features
node_client_features -.->|"requests data"| node_api_client
node_routes -->|"dispatches"| node_controllers
node_routes -.->|"applies middleware"| node_access
node_controllers -->|"invokes"| node_payroll
node_controllers -->|"invokes"| node_purchasing
node_controllers -->|"invokes"| node_scheduling
node_controllers -.->|"invokes"| node_finance_ops
node_controllers -.->|"invokes"| node_sales
node_controllers -.->|"invokes"| node_catalog_stock
node_controllers -.->|"invokes"| node_branches
node_controllers -.->|"invokes"| node_ledger
node_controllers -.->|"invokes"| node_reports
node_controllers -.->|"invokes"| node_billing
node_controllers -.->|"invokes"| node_attendance
node_controllers -.->|"invokes"| node_access_roles
node_controllers -.->|"invokes"| node_notifications
node_purchasing -->|"creates sale"| node_sales
node_finance_ops -->|"posts entries"| node_ledger
node_scheduling -->|"uses repository"| node_persistence
node_payroll -.->|"stores payroll"| node_persistence

click node_vue "https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/App.vue"
click node_auth "https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/stores/auth.ts"
click node_api_client "https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/lib/api.ts"
click node_client_features "https://github.com/kalaigram/aurevant-pkk/tree/main/client/src/views"
click node_routes "https://github.com/kalaigram/aurevant-pkk/blob/main/server/routes/api.php"
click node_controllers "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Http/Controllers/Api/V1"
click node_access "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Http/Middleware"
click node_sales "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Sale"
click node_catalog_stock "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Stock"
click node_purchasing "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Purchase"
click node_branches "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Branch"
click node_finance_ops "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Finance"
click node_ledger "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Ledger"
click node_reports "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Report"
click node_billing "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Billing"
click node_payroll "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Payroll"
click node_attendance "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Attendance"
click node_scheduling "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Schedule"
click node_access_roles "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Access"
click node_notifications "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Notify"
click node_persistence "https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Infrastructure/Persistence/Eloquent"

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_vue,node_auth,node_api_client,node_client_features,node_user toneBlue
class node_routes,node_controllers,node_access,node_persistence toneAmber
class node_sales,node_catalog_stock,node_purchasing,node_branches toneMint
class node_finance_ops,node_ledger,node_reports,node_billing toneRose
class node_payroll,node_attendance,node_scheduling,node_access_roles,node_notifications toneIndigo
```

## Components

### Web client

- [Vue application](https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/App.vue): `client/src/App.vue`
- [Authentication state](https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/stores/auth.ts): `client/src/stores/auth.ts`
- [API client](https://github.com/kalaigram/aurevant-pkk/blob/main/client/src/lib/api.ts): `client/src/lib/api.ts`
- [Company features](https://github.com/kalaigram/aurevant-pkk/tree/main/client/src/views): `client/src/views`

### API and application

- [API routes](https://github.com/kalaigram/aurevant-pkk/blob/main/server/routes/api.php): `server/routes/api.php`
- [API controllers](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Http/Controllers/Api/V1): `server/app/Http/Controllers/Api/V1`
- [Company access](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Http/Middleware): `server/app/Http/Middleware`
- [Eloquent repositories](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Infrastructure/Persistence/Eloquent): `server/app/Infrastructure/Persistence/Eloquent`

### Commerce operations

- [Sales and service](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Sale): `server/app/Application/Sale`
- [Catalog and stock](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Stock): `server/app/Application/Stock`
- [Purchasing](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Purchase): `server/app/Application/Purchase`
- [Company and branches](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Branch): `server/app/Application/Branch`

### Finance and reporting

- [Finance operations](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Finance): `server/app/Application/Finance`
- [Accounting ledger](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Ledger): `server/app/Application/Ledger`
- [Reports and dashboard](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Report): `server/app/Application/Report`
- [Plans and billing](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Billing): `server/app/Application/Billing`

### Workforce management

- [Payroll](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Payroll): `server/app/Application/Payroll`
- [Attendance and leave](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Attendance): `server/app/Application/Attendance`
- [Employee scheduling](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Schedule): `server/app/Application/Schedule`
- [Roles and assignments](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Access): `server/app/Application/Access`
- [Notifications and approvals](https://github.com/kalaigram/aurevant-pkk/tree/main/server/app/Application/Notify): `server/app/Application/Notify`

### Other components

- **Company user**

## Connections

- Company user → Vue application: uses (evidence: `client/src/App.vue`)
- Vue application → Authentication state: reads session (evidence: `client/src/App.vue`)
- Authentication state → API client: calls (evidence: `client/src/stores/auth.ts`)
- Vue application → Company features: renders routes (evidence: `client/src/App.vue`)
- Company features → API client: requests data
- API routes → API controllers: dispatches (evidence: `server/routes/api.php`)
- API routes → Company access: applies middleware
- API controllers → Payroll: invokes (evidence: `server/app/Http/Controllers/Api/V1/PayrollController.php`)
- API controllers → Purchasing: invokes (evidence: `server/app/Http/Controllers/Api/V1/PurchaseOrderController.php`)
- API controllers → Employee scheduling: invokes (evidence: `server/app/Http/Controllers/Api/V1/ScheduleController.php`)
- API controllers → Finance operations: invokes
- API controllers → Sales and service: invokes
- API controllers → Catalog and stock: invokes
- API controllers → Company and branches: invokes
- API controllers → Accounting ledger: invokes
- API controllers → Reports and dashboard: invokes
- API controllers → Plans and billing: invokes
- API controllers → Attendance and leave: invokes
- API controllers → Roles and assignments: invokes
- API controllers → Notifications and approvals: invokes
- Purchasing → Sales and service: creates sale
- Finance operations → Accounting ledger: posts entries (evidence: `server/app/Application/Finance/UseCases/ManageReceivables.php`)
- Employee scheduling → Eloquent repositories: uses repository
- Payroll → Eloquent repositories: stores payroll
