Skip to main content

💲 leggen

A self hosted Open Banking Dashboard, API and CLI for managing bank connections and transactions.

Having your bank data accessible through both CLI and REST API gives you the power to backup, analyze, create reports, and integrate with other applications.

Leggen demo

🛠️ Technologies

Frontend

  • React: Modern web interface with TypeScript
  • Vite: Fast build tool and development server
  • Tailwind CSS: Utility-first CSS framework
  • shadcn/ui: Modern component system built on Radix UI
  • TanStack Query: Powerful data synchronization for React

🔌 API & Backend

  • FastAPI: High-performance async API backend (integrated into leggen server)
  • EnableBanking: Open Banking data access for connecting to banks
  • APScheduler: Background job scheduling with configurable cron

📦 Storage

  • SQLite: for storing transactions, simple and easy to use

✨ Features

🎯 Core Banking Features

  • Connect to banks using EnableBanking (30+ EU countries)
  • List all connected banks and their connection statuses
  • View balances of all connected accounts
  • List and filter transactions across all accounts

🏷️ Categorization & Analytics

  • Categorize transactions with custom categories
  • Keyword-based learning: automatically categorizes future transactions matching the same description
  • Bulk categorization and removal by transaction description
  • Filter transactions by category (including uncategorized)
  • Analytics dashboard with spending-by-category breakdown
  • exclude_from_stats flag for categories like inter-account transfers

🔄 Data Management

  • Sync all transactions with SQLite database
  • Background sync scheduling with configurable cron expressions
  • Automatic database backups to S3-compatible storage, with restore via API

🔐 Authentication

  • Single-user authentication with JWT tokens
  • API key support for programmatic access

📡 API & Integration

  • REST API: Complete FastAPI backend with comprehensive endpoints
  • CLI Interface: Enhanced command-line tools with new options

🔔 Notifications & Monitoring

  • Discord and Telegram notifications for filtered transactions
  • Configurable transaction filters (case-sensitive/insensitive)
  • Account expiry notifications and pre-expiry warnings
  • Comprehensive logging and error handling

🚀 Quick Start

Prerequisites

  1. Create an Enable Banking account at https://enablebanking.com/
  2. Create an application in the Enable Banking Customer Portal as the image below. The redirect URL must use HTTPS and must end with /bank-connected. Enable Banking does not support HTTP.
  3. Set up your bank accounts following the Enable Banking Setup Guide

Enable Banking new application

Installation

Docker Compose

# Clone the repository
git clone https://github.com/elisiariocouto/leggen.git
cd leggen

# Create your configuration
mkdir -p data && cp config.example.toml data/config.toml
# Edit data/config.toml with your EnableBanking credentials

# Generate the [auth] section for your config
docker compose run --rm leggen-server /app/.venv/bin/leggen generate-auth-config
# Copy the output into data/config.toml

# Start all services
docker compose up -d

Configuration

Create a configuration file at ./data/config.toml:

# Required: Authentication
# Generate with: leggen generate-auth-config
# Docker Compose: docker compose run --rm leggen-server /app/.venv/bin/leggen generate-auth-config
[auth]
username = "admin"
password_hash = "YOUR_BCRYPT_HASH"
api_key = "YOUR_API_KEY"
jwt_secret = "YOUR_JWT_SECRET"
jwt_expiry_minutes = 60

[enablebanking]
application_id = "your-application-id"
key_path = "/path/to/private-key.pem"
# url = "https://api.enablebanking.com"

# Optional: Background sync scheduling
[scheduler.sync]
enabled = true
hour = 3      # 3 AM
minute = 0
# cron = "0 3 * * *"  # Alternative: use cron expression

# Optional: Discord notifications
[notifications.discord]
webhook = "https://discord.com/api/webhooks/..."
enabled = true

# Optional: Telegram notifications
[notifications.telegram]
token = "your-bot-token"
chat_id = 12345
enabled = true

# Optional: Transaction filters for notifications
[filters]
case_insensitive = ["salary", "utility"]
case_sensitive = ["SpecificStore"]

📖 Usage

Web Interface

Access the React web interface at http://localhost:3000 after starting the services.

API Service

Visit http://localhost:3000/api/v1/docs for interactive API documentation.

CLI Commands

leggen status              # Check connection status
leggen bank add            # Connect to a new bank
leggen balances            # View account balances
leggen transactions        # List transactions
leggen sync                # Trigger accounts sync

For more options, run leggen --help or leggen <command> --help.

⚠️ Notes

  • This project is in active development

Release files for leggen 2026.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leggen 2026.9.0
File Size Uploaded
leggen-2026.9.0.tar.gz 85.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for leggen 2026.9.0
File Interpreter ABI Platform
leggen-2026.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 194.1 kB

Release files / leggen-2026.9.0.tar.gz

Download URL leggen-2026.9.0.tar.gz
Size 85.0 kB
Tags Source
SHA-256 checksum
How to use checksums
92454ae7415c5a615b29e3b95e94c08359d02bb2edc251657876a4bae5ccb498
BLAKE2b-256 checksum
How to use checksums
02eddca6c9996a803a83e5528f4ce1930d3678b12f8c17f7948614db259ec8e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / leggen-2026.9.0-py3-none-any.whl

Download URL leggen-2026.9.0-py3-none-any.whl
Size 109.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c9a7862ce70e009adb94cc9121051a94d3972dba5912d5cf820ba2fa30b127b
BLAKE2b-256 checksum
How to use checksums
b9f58716ac1fb1dd4b5dbad01712949aecfa81e8621ed552055cfb8408e7ad80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

2026.9.0 This release

2 release files

0.6.11

2 release files

0.6.10

2 release files

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page