AI-Powered Lease Accounting Intelligence Platform — Integrated Business & Technical Narrative
AI Tool Basics for CA

AI-Powered Lease Accounting Intelligence Platform — Integrated Business & Technical Narrative

Author : CA Soumya Anurag Choudhury

Watch on Youtube

1. Executive Overview

Lease accounting under Ind AS 116 is one of the most technically complex, operationally intensive, and judgment-driven areas within enterprise finance. Organizations managing lease portfolios often struggle with fragmented documentation, manual interpretation of legal contracts, spreadsheet-based amortisation models, repetitive journal entries, audit memo preparation, and inconsistent accounting treatment.

The AI-Powered Lease Accounting Intelligence Platform addresses this challenge by transforming unstructured lease agreements into audit-ready accounting intelligence through a hybrid architecture combining Artificial Intelligence, cloud-native engineering, deterministic accounting computation, and policy-grounded technical reasoning.

The platform is designed not merely as a document extraction tool, but as an enterprise finance intelligence orchestration layer.

Its purpose is to reduce operational inefficiency, improve accounting consistency, strengthen governance, and accelerate financial reporting.


2. Problem Statement

Traditional lease accounting workflows present multiple business and technical pain points.

Business ChallengeOperational Impact

Manual contract reviewSignificant time consumption
Interpretation dependencyInconsistent accounting conclusions
Spreadsheet amortisation modelsFormula and control risk
Manual journal preparationRepetitive operational effort
Audit memo draftingHigh senior resource dependency
Fragmented document storageGovernance and retrieval risk

Lease agreements are legal documents, not structured accounting datasets.

Finance teams must manually interpret clauses, determine exemption applicability, assess lease terms, identify discounting requirements, compute lease liabilities, and document accounting conclusions.

This introduces:

  1. delayed financial close cycles
  2. inconsistent accounting interpretation
  3. dependence on technical specialists
  4. spreadsheet governance risk
  5. weak audit traceability
  6. poor scalability for growing lease portfolios

The central problem becomes:

How can unstructured lease contracts be transformed into technically grounded, deterministic, scalable, audit-ready accounting outputs?


3. Solution Architecture Vision

The application solves this through a hybrid intelligence model.

Rather than relying solely on OCR, generic AI, or spreadsheet automation, the platform separates responsibilities across specialized architecture layers.

CapabilityTechnology Role

Document understandingGoogle Document AI
Accounting reasoningGemini LLM + Knowledge Grounding
Financial computationPython deterministic engine
Workflow orchestrationNode.js / Express / TypeScript
User interactionReact Frontend
Data persistenceFirestore + GCS

Core design philosophy:

AI interprets ambiguity. Knowledge grounding enforces accounting policy. Deterministic engines perform auditable computation.


4. End-to-End Workflow Narrative

Step 1 — Secure User Authentication

The application begins with Firebase Authentication integrated with Google OAuth.

Users authenticate securely without the platform handling raw credentials.

Technical controls:

  1. UID-based tenant isolation
  2. Firebase identity tokens
  3. Firestore access governance

Business outcome:

Secure user segregation and enterprise access control.


Step 2 — Document Upload Architecture

Lease contracts are often 20–100+ page scanned PDFs.

Uploading these through conventional backend APIs would create bottlenecks.

The application therefore uses a signed upload architecture.

Workflow:

  1. React frontend requests upload authorization.
  2. Node backend generates temporary signed V4 upload URL.
  3. Browser uploads directly to Google Cloud Storage.
  4. Backend never relays the file.

Benefits:

  1. lower backend memory pressure
  2. faster uploads
  3. reduced timeout risk
  4. scalable file ingestion
  5. stronger security

Technical principle:

Direct-to-object-storage upload architecture.


Step 3 — Document Storage Architecture

The platform intentionally separates structured data from binary document storage.

Storage LayerPurpose

Google Cloud StorageOriginal PDFs, scanned contracts, binary files
FirestoreMetadata, extracted variables, accounting outputs, workflow states

This polyglot persistence model improves scalability and architectural clarity.

Simple analogy:

GCS = secure document vault

Firestore = application accounting ledger


5. Intelligent Document Processing

Once uploaded, documents enter the extraction pipeline.

Two processing modes are supported.

Fast Native AI Mode

Gemini multimodal directly interprets uploaded document binaries.

Use case:

Rapid extraction workflows.

Deep OCR Mode

Google Document AI performs:

  1. OCR extraction
  2. layout parsing
  3. table recognition
  4. structured text recovery
  5. entity identification

Engineering enhancement:

Large contracts are automatically chunked into 15-page segments using pdf-lib.

Backend sequentially processes chunks and stitches results.

Frontend receives NDJSON progress updates.

Business outcome:

Scalable handling of enterprise-scale scanned lease portfolios.


6. Artificial Intelligence Architecture

Role of the LLM

Gemini acts as the reasoning engine.

LLM responsibilities:

  1. contract semantic interpretation
  2. lease qualification analysis
  3. exemption assessment
  4. technical accounting reasoning
  5. audit memo generation
  6. conversational advisory support

Important boundary:

LLMs are probabilistic.

They are unsuitable for deterministic financial mathematics.

Hence, AI is intentionally isolated from accounting computation.


7. Knowledge Grounding & Context Injection

The application does not rely on generic LLM memory.

It uses context injection grounding.

Concept:

At runtime, Gemini receives:

  1. extracted lease contract context
  2. accounting framework documentation
  3. organizational accounting playbooks
  4. technical instructions

This improves reliability and reduces hallucination.

Example

If a lease says:

11-month office agreement

AI evaluates:

Does short-term lease exemption apply?

If contract includes refundable deposit:

AI evaluates:

Does Ind AS 109 discounting apply?

Thus the Knowledge Base participates before deterministic computation.

This is policy-aware accounting assumption resolution.


8. Technical Finance Computation Architecture

Once assumptions are resolved, deterministic finance processing begins.

leaseMath.ts

Role:

Commercial finance normalization.

Functions:

  1. escalation expansion
  2. rent-free adjustment logic
  3. payment schedule normalization
  4. frequency alignment
  5. date mathematics

Example:

Contract:

₹25 lakh monthly rent

5% annual escalation

61-day rent free

leaseMath converts this into structured economic schedules.


engine.ts

Role:

Workflow orchestration bridge.

Responsibilities:

  1. payload construction
  2. structured JSON handoff
  3. backend coordination
  4. Python invocation readiness


Python Accounting Engine

This is the deterministic finance core.

Computes:

  1. lease liability
  2. present value
  3. ROU asset
  4. amortisation schedules
  5. EIR unwinding
  6. depreciation
  7. journal entries

Architectural principle:

AI interprets. Python computes.

This ensures reproducibility, auditability, and accounting precision.


9. Technical Build & Engineering Design

Frontend Stack

  1. React 19
  2. TypeScript
  3. Tailwind CSS
  4. Vite
  5. Firebase SDK

Design principles:

  1. strongly typed architecture
  2. SPA responsiveness
  3. modular UI workflows
  4. reactive orchestration


Backend Stack

  1. Node.js
  2. Express.js
  3. TypeScript runtime
  4. child_process Python orchestration

Backend responsibilities:

  1. API routing
  2. signed URL generation
  3. OCR orchestration
  4. AI service invocation
  5. document retrieval
  6. progress streaming


API Layer

Representative services:

/api/upload-url

/api/start-ocr

/api/document

/api/lease/interpret

/api/generate-memo

/api/technical-assistant

This creates clean service abstraction.


Cloud Infrastructure

Cloud ServiceRole

Cloud RunBackend hosting
GCSdocument storage
Document AIOCR
GeminiAI reasoning
Firestorestructured data
Firebase Authidentity
IAMaccess governance
Cloud Loggingobservability

Architecture characteristics:

  1. serverless scalability
  2. managed infrastructure
  3. elastic compute
  4. low operational overhead


10. Memo Generation & Technical Advisory Layer

Accounting Memo Generation

Inputs:

  1. lease context
  2. computed outputs
  3. Knowledge Base

Gemini produces audit-ready accounting position papers.

This reduces manual technical drafting effort.


Technical Accounting Assistant

Provides conversational advisory support.

Uses:

  1. lease raw context
  2. extracted accounting variables
  3. grounded accounting reasoning

This improves explainability for finance teams.


11. Business Impact & Efficiency Gains

CapabilityImpact

AI extractionreduced manual review time
grounded reasoningconsistent accounting treatment
deterministic enginereduced spreadsheet risk
memo automationreduced senior dependency
cloud architecturescalable enterprise operations
assistant supportfaster technical resolution

Expected benefits:

  1. accelerated financial close
  2. improved governance
  3. stronger audit readiness
  4. lower operational effort
  5. scalable lease portfolio management


12. Scalability & Enterprise Readiness

Scalability features:

  1. serverless Cloud Run deployment
  2. direct GCS uploads
  3. chunked OCR processing
  4. Gemini model fallback orchestration
  5. modular service architecture
  6. secure tenant isolation

Enterprise readiness characteristics:

  1. audit traceability
  2. technical consistency
  3. resilient architecture
  4. cloud-native scalability
  5. controlled AI governance


13. Closing Perspective

This platform transforms lease accounting from a fragmented, manual, spreadsheet-driven workflow into a policy-aware finance intelligence architecture.

It combines:

  1. document intelligence
  2. grounded AI reasoning
  3. deterministic accounting computation
  4. audit documentation automation
  5. conversational technical support

Final architectural principle:

Document AI understands the contract. Knowledge grounding applies accounting policy. TypeScript structures finance economics. Python computes deterministically. AI explains the outcome.


Application Dashboard

ARUL KUMAR RENT AGREEMENT IS LESS THAN 12 MONTHS HENCE DOES NOT QUALIFY FOR LEASE UNDER 116. HENCE IN EXEMPT CATEGORY

ABC LLP (LESSOR) AND XYZ (LESSEE) : YEAR ON YEAR ROU AND LEASE LIABILITY OVERVIEW

YEAR ON YEAR AMORTIZATION SCHEDULE

PERIOD JOURNAL ENTRIES ALONG WITH INITIAL RECOGNITION

TECHNICAL ACCOUNTING ASSISTANT

KNOWLEDGE BASE