Cases

AI‑Powered Accounting Platform

A multi‑tenant accounting platform with AI‑driven document extraction, intelligent transaction matching, and automated financial reporting.

Context

The client is a UAE‑based professional services firm that supports entrepreneurs with company formation, bookkeeping, accounting and reporting, VAT compliance, and visa services. Their clients are small and medium‑sized businesses operating across multiple currencies (AED, USD, EUR) and regulated by the UAE Federal Tax Authority.

Before the platform was built, the firm's accountants processed bank statements, supplier invoices, and payment confirmations entirely by hand. Each document required manual extraction of dates, amounts, VAT, and counterparty TRNs, with every line mapped to a Chart of Accounts entry. Every client required an isolated workspace with its own CoA, dimensions, and team access. Matching payments to invoices was a manual reconciliation task performed repeatedly for each client, month after month. And reporting — P&L, Balance Sheet, VAT Return, Trial Balance — had to be produced per client, per period, on both cash and accrual bases.

This was not a process that could scale.

Risks

Manual data entry from PDFs and scanned invoices created a constant stream of transcription errors, misposted VAT, and incorrectly matched counterparties. Without a single source of truth, each accountant interpreted the same Chart of Accounts differently. Reconciliation consumed the majority of monthly closing time, delaying reports and eroding client trust. Scaling the practice meant hiring more accountants linearly — an unsustainable model. And with UAE VAT compliance being strict, any error in VAT extraction or TRN matching carried real regulatory consequences.

The firm needed a systematic approach, not more manual effort.

Solution

We designed and built a production‑grade multi‑tenant accounting platform with the following core components:

1. Multi‑tenant workspace model

Each client is an isolated Account with its own Chart of Accounts, analytic dimensions, team memberships, and role‑based access (owner, accountant, admin). Superusers retain cross‑account oversight without compromising data isolation.

2. AI document extraction pipeline

Bank statements and invoices (PDF or image) are processed by a multimodal Qwen model. The pipeline extracts dates, reference numbers, amounts, currencies, VAT amounts, counterparty names and TRNs, and suggests a CoA entry with parent category and type (Income, Expense, Asset, Liability).

3. Analytic dimensions

Extracted metadata — customer, contract, property ID, PO number — is stored as structured tags, enabling dimensional reporting without schema changes.

4. Intelligent matching engine

Invoices and payments are matched automatically with configurable tolerance (amount ±2%, date within 30 days). Each match produces a confidence level and feeds is_paid and matched_to state transitions.

5. Dual‑basis reporting

P&L, Balance Sheet, VAT Return, and Trial Balance are generated from the same transaction graph, switchable between cash and accrual basis per report.

6. Approval workflows

Transactions move through draft → posted → reconciled states with explicit approval gates.

7. CoA templates

Reusable Chart of Accounts templates can be cloned across client workspaces, ensuring classification consistency.

8. Security and compliance

JWT in HttpOnly cookies, session auth for admin, RBAC, CORS restricted to frontend domains, CSRF enabled, and document files served via an internal Nginx directive (not publicly accessible).

Impact

  • Review‑oriented closing cycle. The monthly closing cycle shifted from manual extraction and reconciliation to a review‑oriented workflow. Accountants now validate AI suggestions instead of typing data.
  • Systematic VAT compliance. VAT extraction and TRN matching became systematic rather than interpretive, reducing compliance risk.
  • Scalable client onboarding. The same platform serves multiple client accounts without code changes — new clients are onboarded by cloning a CoA template and inviting team members.
  • On‑demand reporting. Reporting is generated on demand for any period, in either basis, from a single transaction source. No parallel spreadsheets. No manual consolidation.
  • Linear scaling without linear headcount growth. The firm can now scale its client base without scaling its accounting headcount linearly.

Stack

  • Backend: Django, Django REST Framework, Celery, Redis
  • Database: PostgreSQL
  • Frontend: Next.js
  • AI/ML: Qwen (multimodal + text), PaddleOCR
  • Document Processing: pdfminer.six, pdf2image
  • Infrastructure: Nginx, Docker Compose
AI‑Powered Accounting Platform