1040 Tax Classifier Service
๐ Project Overview
Repository Name:ย poc-autoextract-platform-1040-tax-classifier
Purpose:ย Automate classification and verification of tax-related PDF documents using Azure Document Intelligence, deployed on Azure Kubernetes Service (AKS) with Spacelift for GitOps-based CI/CD.
##ย ๐ฏย Objective Buildย andย deployย aย scalable,ย event-drivenย PDFย classificationย serviceย that:
- Follow the Framework V2 format for all components
- Listensย toย Azureย Serviceย Busย topicย
accepted-file - Classifiesย andย verifiesย taxย documentsย usingย Azureย Documentย Intelligence
- Publishesย resultsย toย theย
classified-fileย topic - Isย deployedย toย Azureย Kubernetesย Serviceย (AKS)ย usingย Spaceliftย forย ADOย automation
##ย ๐งฑย Systemย Architecture
๐ Workflow Summary
- Trigger: A new message is published to theย
accepted-fileย topic. - Listener: The Node.js service running in AKS receives the message.
- Processing:
- Downloads the PDF from Azure Blob Storage.
- Classifies and verifies it using Azure Document Intelligence.
- Splits and uploads the resulting PDFs.
- Output: Publishes a message to theย
classified-fileย topic. - CI/CD: Spacelift watches theย
poc-1040-tax-classifierย repo and deploys changes to AKS automatically.
๐งฉ Low-Level Design
๐ Project Structure
Component Responsibilities
๐ฌ Message Flow
Incoming Message:ย accepted-file
Outgoing Message:ย classified-file
๐งช Testing Strategy
- Unit Tests: Jest for all service modules
- Integration Tests: Mock Azure SDKs and Service Bus
- E2E Tests: Simulate full message flow in AKS dev cluster
๐ Deployment
- CI/CD: GitHub Actions โ Spacelift โ AKS
- Helm: Used for Kubernetes manifests
- Spacelift:
- Stack:ย
aks-stack.yaml - Modules:ย
azure-kubernetes/main.tf - Triggers: GitHub PRs and merges toย
main - Secrets: Managed via Spacelift + Azure Key Vault
- Stack:ย