# webotapp-academy/auditflow-erp architecture

> Architecture diagram of the GitHub repository webotapp-academy/auditflow-erp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/webotapp-academy/auditflow-erp
- Repository: https://github.com/webotapp-academy/auditflow-erp

## Overview

AuditFlow ERP is a Laravel practice-management system for accounting firms, spanning client records, tax compliance, audits, documents, tasks, billing, communications, and reporting. Staff work through role-scoped web features; clients use an isolated portal to view filings and invoices, exchange documents, and message the firm. The graph preserves the README’s major product branches. Several controllers and services were not sampled, so those subsystem links are documented capabilities rather than verified internal calls; edges are limited to documented or indexed relationships.

Main entry points: [`app/Http/Controllers/ClientController.php`](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/ClientController.php) (Client CRM), [`app/Services/ActivityLogger.php`](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ActivityLogger.php) (Activity logging), [`app/Http/Controllers/Portal/ClientPortalController.php`](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/Portal/ClientPortalController.php) (Client portal), [`app/Http/Controllers/AuditController.php`](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/AuditController.php) (Audit management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and CRM"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_client_crm["Client CRM"]
  node_access_rules["Role and client access"]
  node_client_records[("Client and user records<br/>[Client.php]")]
end

subgraph group_compliance["Compliance and Assurance"]
  node_tax_returns[("GST, ITR, TDS<br/>[GstReturn.php]")]
  node_deadline_calendar["Deadlines and rules"]
  node_audit_work["Audit management"]
  node_audit_records[("Audit records<br/>[Audit.php]")]
end

subgraph group_operations["Practice Operations"]
  node_document_work["Document workflow"]
  node_document_storage["Private files and versions"]
  node_document_records[("Document records<br/>[Document.php]")]
  node_task_work["Tasks and reviews<br/>[TaskController.php]"]
  node_task_records[("Task records<br/>[Task.php]")]
  node_billing["Invoices and payments"]
  node_invoice_records[("Invoice and payment records<br/>[Invoice.php]")]
  node_communications["Messaging and reminders"]
  node_whatsapp["WhatsApp provider"]
end

subgraph group_portal["Client Portal"]
  node_portal["Client portal"]
end

subgraph group_insights["Practice Insights"]
  node_dashboard["Practice dashboard"]
  node_reports["Reports and exports<br/>[ReportService.php]"]
  node_activity["Activity logging<br/>[ActivityLogger.php]"]
  node_activity_records[("Activity records<br/>[ActivityLog.php]")]
end

node_staff(("Firm staff"))
node_clients(("Firm clients"))

node_staff -->|"signs in"| node_auth
node_clients -->|"signs in"| node_auth
node_auth -->|"routes to"| node_client_crm
node_staff -->|"manages clients"| node_client_crm
node_client_crm -->|"maintains"| node_client_records
node_client_crm -->|"checks access"| node_access_rules
node_staff -->|"tracks filings"| node_tax_returns
node_staff -->|"manages deadlines"| node_deadline_calendar
node_staff -->|"manages audits"| node_audit_work
node_audit_work -->|"updates"| node_audit_records
node_staff -->|"reviews documents"| node_document_work
node_clients -->|"uses"| node_portal
node_portal -->|"scopes clients"| node_access_rules
node_portal -->|"lists shared files"| node_document_records
node_portal -->|"uses messaging"| node_communications
node_document_work -.->|"stores uploads"| node_document_storage
node_document_storage -->|"updates versions"| node_document_records
node_staff -->|"manages tasks"| node_task_work
node_task_work -->|"loads and updates"| node_task_records
node_staff -->|"manages billing"| node_billing
node_billing -.->|"records invoices"| node_invoice_records
node_staff -->|"views metrics"| node_dashboard
node_staff -->|"runs reports"| node_reports
node_task_work -->|"logs actions"| node_activity
node_client_crm -->|"logs actions"| node_activity
node_audit_work -->|"logs actions"| node_activity
node_document_storage -->|"logs actions"| node_activity
node_activity -->|"writes logs"| node_activity_records
node_communications -.->|"optional provider"| node_whatsapp

click node_auth "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/Auth/AuthController.php"
click node_client_crm "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/ClientController.php"
click node_access_rules "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ClientAccessService.php"
click node_client_records "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Client.php"
click node_tax_returns "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/GstReturn.php"
click node_deadline_calendar "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/ComplianceDeadlineController.php"
click node_audit_work "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/AuditController.php"
click node_audit_records "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Audit.php"
click node_document_work "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/DocumentController.php"
click node_document_storage "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/DocumentStorageService.php"
click node_document_records "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Document.php"
click node_task_work "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/TaskController.php"
click node_task_records "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Task.php"
click node_billing "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/BillingController.php"
click node_invoice_records "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Invoice.php"
click node_communications "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/CommunicationService.php"
click node_portal "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/Portal/ClientPortalController.php"
click node_dashboard "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/DashboardService.php"
click node_reports "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ReportService.php"
click node_activity "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ActivityLogger.php"
click node_activity_records "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/ActivityLog.php"
click node_whatsapp "https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/WhatsApp/MetaWhatsAppCloudService.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_auth,node_client_crm,node_access_rules,node_client_records,node_clients toneBlue
class node_tax_returns,node_deadline_calendar,node_audit_work,node_audit_records toneAmber
class node_document_work,node_document_storage,node_document_records,node_task_work,node_task_records,node_billing,node_invoice_records,node_communications,node_whatsapp toneMint
class node_portal toneRose
class node_dashboard,node_reports,node_activity,node_activity_records,node_staff toneIndigo
```

## Components

### Access and CRM

- [Authentication](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/Auth/AuthController.php): `app/Http/Controllers/Auth/AuthController.php`
- [Client CRM](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/ClientController.php): `app/Http/Controllers/ClientController.php`
- [Role and client access](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ClientAccessService.php): `app/Services/ClientAccessService.php`
- [Client and user records](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Client.php): `app/Models/Client.php`

### Compliance and Assurance

- [GST, ITR, TDS](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/GstReturn.php): `app/Models/GstReturn.php`
- [Deadlines and rules](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/ComplianceDeadlineController.php): `app/Http/Controllers/ComplianceDeadlineController.php`
- [Audit management](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/AuditController.php): `app/Http/Controllers/AuditController.php`
- [Audit records](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Audit.php): `app/Models/Audit.php`

### Practice Operations

- [Document workflow](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/DocumentController.php): `app/Http/Controllers/DocumentController.php`
- [Private files and versions](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/DocumentStorageService.php): `app/Services/DocumentStorageService.php`
- [Document records](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Document.php): `app/Models/Document.php`
- [Tasks and reviews](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/TaskController.php): `app/Http/Controllers/TaskController.php`
- [Task records](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Task.php): `app/Models/Task.php`
- [Invoices and payments](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/BillingController.php): `app/Http/Controllers/BillingController.php`
- [Invoice and payment records](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/Invoice.php): `app/Models/Invoice.php`
- [Messaging and reminders](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/CommunicationService.php): `app/Services/CommunicationService.php`
- [WhatsApp provider](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/WhatsApp/MetaWhatsAppCloudService.php): `app/Services/WhatsApp/MetaWhatsAppCloudService.php`

### Client Portal

- [Client portal](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Http/Controllers/Portal/ClientPortalController.php): `app/Http/Controllers/Portal/ClientPortalController.php`

### Practice Insights

- [Practice dashboard](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/DashboardService.php): `app/Services/DashboardService.php`
- [Reports and exports](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ReportService.php): `app/Services/ReportService.php`
- [Activity logging](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Services/ActivityLogger.php): `app/Services/ActivityLogger.php`
- [Activity records](https://github.com/webotapp-academy/auditflow-erp/blob/main/app/Models/ActivityLog.php): `app/Models/ActivityLog.php`

### Other components

- **Firm staff**
- **Firm clients**

## Connections

- Firm staff → Authentication: signs in (evidence: `README.md`)
- Firm clients → Authentication: signs in (evidence: `README.md`)
- Authentication → Client CRM: routes to (evidence: `routes/web.php`)
- Firm staff → Client CRM: manages clients (evidence: `README.md`)
- Client CRM → Client and user records: maintains (evidence: `app/Http/Controllers/ClientController.php`)
- Client CRM → Role and client access: checks access (evidence: `app/Http/Controllers/ClientController.php`)
- Firm staff → GST, ITR, TDS: tracks filings (evidence: `README.md`)
- Firm staff → Deadlines and rules: manages deadlines (evidence: `README.md`)
- Firm staff → Audit management: manages audits (evidence: `README.md`)
- Audit management → Audit records: updates (evidence: `app/Http/Controllers/AuditController.php`)
- Firm staff → Document workflow: reviews documents (evidence: `README.md`)
- Firm clients → Client portal: uses (evidence: `README.md`)
- Client portal → Role and client access: scopes clients (evidence: `app/Http/Controllers/Portal/ClientPortalController.php`)
- Client portal → Document records: lists shared files (evidence: `app/Http/Controllers/Portal/ClientPortalController.php`)
- Client portal → Messaging and reminders: uses messaging (evidence: `README.md`)
- Document workflow → Private files and versions: stores uploads
- Private files and versions → Document records: updates versions (evidence: `app/Services/DocumentStorageService.php`)
- Firm staff → Tasks and reviews: manages tasks (evidence: `README.md`)
- Tasks and reviews → Task records: loads and updates (evidence: `app/Http/Controllers/TaskController.php`)
- Firm staff → Invoices and payments: manages billing (evidence: `README.md`)
- Invoices and payments → Invoice and payment records: records invoices
- Firm staff → Practice dashboard: views metrics (evidence: `README.md`)
- Firm staff → Reports and exports: runs reports (evidence: `README.md`)
- Tasks and reviews → Activity logging: logs actions (evidence: `app/Http/Controllers/TaskController.php`)
- Client CRM → Activity logging: logs actions (evidence: `app/Http/Controllers/ClientController.php`)
- Audit management → Activity logging: logs actions (evidence: `app/Http/Controllers/AuditController.php`)
- Private files and versions → Activity logging: logs actions (evidence: `app/Services/DocumentStorageService.php`)
- Activity logging → Activity records: writes logs (evidence: `app/Services/ActivityLogger.php`)
- Messaging and reminders → WhatsApp provider: optional provider (evidence: `README.md`)
