How haris-khan-durrani/free-accounting-application works
This PHP application provides multi-tenant invoicing, payments, accounting, compliance reporting, and client self-service. The main workflow is workspace users creating invoices for clients, collecting payments through gateways, and recording transactions in the general ledger for reports and tax exports. The README documents recurring billing, OTP portal access, custom domains, templates, and integrations; the graph preserves these capabilities. Relationships are limited to calls visible in excerpts or the SOURCE INDEX, plus workflows stated in the README; unsampled implementations are represented by their exact paths without inferred call chains.
Main entry points: AccountingService.php General ledger · bootstrap.php Application bootstrap · layout.php Workspace interface · Mailer.php Email delivery
Components 34
Workspace and tenancy
- Workspace interface
layout.php - Tenant context
Core/Tenant.php - Workspace branding
Core/Branding.php - Workspaces and domains
subaccounts.php
Billing and client service
- Invoices and quotes
invoices.php - Invoice templates
templates/invoices/custom_drag_drop.php - Recurring invoices
recurring_invoices.php - Recurring worker
cron_recurring.php - Client portal and OTP
client_portal.php - Client login
client_login.php - Email delivery
Services/Mailer.php - Payment gateways
Services/PaymentGatewayService.php - Gateway webhooks
api/v1/webhooks/stripe.php
Accounting and compliance
- General ledger
Services/AccountingService.php - Expense tracking
expenses.php - Financial reports
reports_pnl.php - VAT 201 return
reports_vat201.php - FTA audit export
export_faf.php - Corporate tax
reports_corporate_tax.php
API and integrations
- REST API
api/v1/index.php - API authentication
Core/ApiAuthenticator.php - MCP endpoint
api/v1/mcp.php - MCP tools
Services/McpService.php - Automation engine
Services/AutomationService.php - WhatsApp service
Services/WhatsAppService.php
Shared services
- Application bootstrap
bootstrap.php - Security utilities
Core/Security.php - Cryptography
Core/Crypto.php - Currency engine
Core/Currency.php - Cache
Core/Cache.php - Commission calculations
Core/Commission.php - Plugin engine
Services/PluginEngine.php
Other components
- Workspace user
- Client user
Connections 44
- Workspace user → Workspace interface: uses
- Workspace interface → Invoices and quotes: navigates to
layout.php - Workspace interface → Workspaces and domains: navigates to
layout.php - Workspace interface → Tenant context: loads context
layout.php - Workspace interface → Workspace branding: loads branding
layout.php - Invoices and quotes → General ledger: posts sales
- Expense tracking → General ledger: posts expenses
- Invoices and quotes → Invoice templates: renders with
- Recurring invoices → Recurring worker: processed by
- Recurring worker → Invoices and quotes: generates due
- Recurring worker → General ledger: posts entries
- Client user → Client login: requests access
- Client login → Email delivery: sends OTP
client_login.php - Client login → Client portal and OTP: authenticates to
- Client portal and OTP → Payment gateways: initiates payment
- Gateway webhooks → Payment gateways: verifies payment
api/v1/webhooks/stripe.php - Gateway webhooks → General ledger: records payment
api/v1/webhooks/stripe.php - General ledger → Financial reports: feeds reports
- General ledger → VAT 201 return: provides filing data
- General ledger → FTA audit export: provides audit data
- General ledger → Corporate tax: provides liability data
- REST API → API authentication: authenticates requests
api/v1/index.php - MCP endpoint → API authentication: authenticates requests
api/v1/mcp.php - MCP endpoint → MCP tools: dispatches tools
api/v1/mcp.php - Application bootstrap → Tenant context: initializes
bootstrap.php - Application bootstrap → Workspace branding: loads
bootstrap.php - Application bootstrap → Currency engine: loads
bootstrap.php - Application bootstrap → Security utilities: loads
bootstrap.php - Application bootstrap → Payment gateways: loads
bootstrap.php - Application bootstrap → Email delivery: loads
bootstrap.php - Application bootstrap → Plugin engine: initializes
bootstrap.php - Workspace branding → Tenant context: resolves workspace
Core/Branding.php - Workspace branding → Cache: invalidates
Core/Branding.php - API authentication → Tenant context: checks workspace
Core/ApiAuthenticator.php - Email delivery → Cryptography: uses
Services/Mailer.php - Email delivery → Security utilities: uses
Services/Mailer.php - Payment gateways → Currency engine: uses
Services/PaymentGatewayService.php - Payment gateways → Cryptography: uses
Services/PaymentGatewayService.php - General ledger → Tenant context: scopes entries
Services/AccountingService.php - Plugin engine → Security utilities: uses
Services/PluginEngine.php - MCP tools → Email delivery: uses
Services/McpService.php - Financial reports → Commission calculations: uses calculations
- Workspace interface → Automation engine: offers automation
- Workspace interface → WhatsApp service: offers messaging