Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Python-based solution for managing and synchronizing financial data between Kresus, Firefly III and local excel

License

Notifications You must be signed in to change notification settings

AlanJumeaucourt/firefly-synchro

Repository files navigation

Firefly - Kresus Monorepo

Introduction

This monorepo contains a set of microservices designed to bridge the Kresus personal finance manager with the Firefly III financial management tool. Kresus, which leverages woob to sync bank transactions, acts as the source of truth. The application notifies users of missing transactions in Firefly and offers synchronization capabilities.

Though arguably overengineered for an everyday tool, this project serves as an excellent sandbox for microservices architecture and event-driven design in Python.

image

Features

  • Detects missing transactions in Firefly that are present in Kresus.
  • Offers an interface for syncing transactions between the two services.
  • Uses an event-driven microservices architecture.

Microservices

  • Checker: Monitors for missing transactions.
  • Notifier (TODO): Handles user notifications.
  • Synchronizer: Syncs transactions between services.
  • Discord Bot: Provides a user interface on Discord.

Getting Started

Requirements

  • Docker and Docker Compose for local deployment.
  • Access to a Kubernetes cluster for k8s deployment.

Installation

Kubernetes

  1. Set up a Kubernetes cluster (Minikube or k3d for local development).

  2. Rename and configure kubernetes/02-secrets.yaml.template to kubernetes/02-secrets.yaml.

  3. Apply the Kubernetes manifests:

    kubectl apply -f kubernetes/

This is not magic, check the files to understand what is happening.

Docker-compose

  1. Rename .env.template to .env and populate it with your values

  2. Start the application stack:

    docker-compose up

Development

in root directory, you can run the following command to start developing in locally.

docker build --pull --rm -t fireflysynchro-checker:latest . -f common/checker.Dockerfile
docker run -v ${PWD}/services/checker/src/:/app fireflysynchro-checker:latest
docker build --pull --rm -t fireflysynchro-discord:latest . -f common/discord.Dockerfile
docker run -v ${PWD}/services/discord/src/:/app fireflysynchro-discord:latest
docker build --pull --rm -t fireflysynchro-synchronizer:latest . -f common/synchronizer.Dockerfile
docker run -v ${PWD}/services/synchronizer/src/:/app fireflysynchro-synchronizer:latest

Build and push all images to docker hub

Bash commands to build and push all images to docker hub by hand. (CI/CD do it automatically)

docker build -t alanjumeaucourt/firefly-synchro-discord -f common/discord.Dockerfile .
docker push alanjumeaucourt/firefly-synchro-discord

docker build -t alanjumeaucourt/firefly-synchro-checker -f common/checker.Dockerfile .
docker push alanjumeaucourt/firefly-synchro-checker

docker build -t alanjumeaucourt/firefly-synchro-synchronizer -f common/synchronizer.Dockerfile .
docker push alanjumeaucourt/firefly-synchro-synchronizer

About

Python-based solution for managing and synchronizing financial data between Kresus, Firefly III and local excel

Topics

Resources

License

Stars

Watchers

Forks