Skip to content

genepix/ce-dashboard-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ce-dashboard-stats

A very very dirty parser for Bank PDF account statements, providing analytics and dashboards on your account balance and expenses over time.

Initially, I just wanted to show the evolution of my accounts, because apps such as Bankin can't retrieve more than x months of data.

Note: All data provided in this project is entirely fake and anonymized. It does not reflect any real information.

TODO

  • Export results as JSON
  • Support PDF input from S3
  • Add more statistics and analytics
  • Add tests

Features

  • Automatic extraction of data from PDF statements
  • Aggregation of balances and expenses by period
  • Multiple output modes:
    • S3: Generate HTML reports and upload them to an S3 bucket (with presigned URL support)
    • stdout: Print generated HTML directly to the console
    • interactive: Interactive terminal dashboard using blessed-contrib

Requirements

  • Node.js >= 16
  • Your PDF statements
  • (Optional) An S3 bucket if you want to use the S3 output

Interactive view

Interactive dashboard demo

Installation

git clone https://github.com/genepix/ce-dashboard-stats.git
cd ce-dashboard-stats
npm install

Usage

Node

Example:

For interactive dashboard (terminal):

OUTPUT_TYPE="interactive" PDF_FOLDER='./sample/pdf/' node index.js

Docker

You can build and test the project using Docker. A sample test run with example PDFs:

docker build -t dashboard-stats:latest .
docker run -v ./sample/pdf/:/tmp/pdf/ -e PDF_FOLDER=/tmp/pdf/ -e OUTPUT_TYPE=interactive --rm -it dashboard-stats:latest

This will mount your local ./sample/pdf/ folder into the container at /tmp/pdf/.

  1. Place your PDF statements in a folder (e.g. ./pdf/).
  2. Set the required environment variables:
    • PDF_FOLDER: path to the folder containing your PDFs
    • OUTPUT_TYPE: s3, stdout or interactive
    • BUCKET_NAME: (if using S3 output) your S3 bucket name

Output

  • S3: HTML files are uploaded to S3 and accessible via a presigned URL
  • stdout: HTML files are printed to the console
  • interactive: An interactive dashboard is displayed in your terminal

Main dependencies

  • mustache: for HTML template rendering
  • pino: for logging
  • blessed-contrib: for interactive terminal dashboard
  • aws-sdk: for S3 uploads

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors