Skip to content

olaolatunbos/StatementSmart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statement Smart

Overview

StatementSmart is a web application that parses Lloyds Bank statement PDFs, converts them to structured Excel sheets and automatically categorises transactions using machine learning

Screenshot 2025-07-12 at 11 15 09

🏛️ Architecture Diagram

ss drawio

🚀 Quick Start

# Get OPENAI_API_KEY from https://platform.openai.com/playground/prompts and add to .env file.
OPENAI_API_KEY='Your API key'

python3 -m venv venv
source venv/bin/activate

pip install -r requirements.txt

python app.py

🐳 Container Setup

docker build -t statement-smart .
docker run --env-file .env -p 3000:3000 statement-smart 

Project Structure

.
├── .github
│   └── workflows
│       ├── deploy-app.yml
│       ├── terraform-destroy.yml
│       └── terraform-plan-and-apply.yml
├── .gitignore
├── README.md
├── app
│   ├── Dockerfile
│   ├── app.py
│   ├── name.py
│   ├── requirements.txt
│   ├── static
│   │   └── style.css
│   ├── templates
│   │   └── index.html
└── terraform
    ├── .terraform
    │   ├── modules
    │   ├── providers
    │   └── terraform.tfstate
    ├── main.tf
    ├── modules
    │   ├── container_app
    │   ├── container_app_environment
    │   ├── container_registry
    │   ├── dns_zone
    │   ├── front_door
    │   ├── log_analytics
    │   └── storage_account
    ├── terraform.tf
    └── variables.tf

🔧 Pipelines

deploy-app.yml

  • Builds a Docker image from the Flask app, scans it with Trivy for vulnerabilities, pushes it to Azure Container Registry (ACR), and deploys it to Azure Container Apps.

terraform-plan-and-apply.yml

  • Runs a Checkov security scan, formats and validates Terraform code, and posts the Terraform plan to the pull request as a comment. On manual trigger, it applies the approvedTerraform plan to provision Azure infrastructure.

terraform-destroy.yml

  • Manually triggered workflow that initializes the Terraform backend and destroys all previously provisioned infrastructure in Azure.
Screenshot 2025-07-12 at 11 02 58 Screenshot 2025-07-12 at 11 01 46

🟣 Terraform

The terraform/ directory provisions all necessary Azure infrastructure to support deployment and delivery of the application to end users.

Provisioned Resources:

  • Azure Container Apps: Hosts the application in a fully managed, serverless container environment with built-in scaling and HTTPS support.
  • Azure Container Registry (ACR): Stores and manages private Docker container images used for deployments.
  • Azure DNS: Manages custom domain names and DNS records for routing traffic to application endpoints.
  • Azure Front Door: Acts as a global entry point, providing load balancing, SSL termination, and fast content delivery through Microsoft's edge network.

About

StatementSmart is a web application that parses bank statement PDFs, converts them to structured Excel sheets and automatically categorises transactions using machine learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors