Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A self-hosted alternative to [Spiir](https://spiir.dk), built on [Actual Budget](https://actualbudget.org/) with bank sync via [Lunch Flow](https://www.lunchflow.app/).

Spiir is shutting down. spirex (Spiir Exit) helps you migrate your data and set up a self-hosted replacement with ongoing bank sync for Danish (and other EU) banks. I have tested it for Lån og Spar so far, and it works.
Spiir is shutting down. spirex (Spiir Exit) helps you migrate your data and set up a self-hosted replacement with ongoing bank sync for Danish (and other EU) banks. I have tested it for Lån og Spar so far, and it works.

## What you get

Expand Down Expand Up @@ -67,7 +67,7 @@ The converter will:
4. Import all transactions with deduplication (safe to run multiple times)
5. Import transfers between accounts

## 2a. (Optional) Create rules based on transactions
## 3. (Optional) Create rules based on transactions

There's an optional command in the cli that can extract rules based on the given data.
The rule creation algorithm is very simple:
Expand Down Expand Up @@ -96,7 +96,7 @@ When the rules have been inferred, you have the option to either accept all rule

Once accepted the rules are imported into Actual Budget.

## 3. Set up bank sync with Lunch Flow
## 4. Set up bank sync with Lunch Flow

[Lunch Flow](https://www.lunchflow.app/) connects your bank to Actual Budget via open banking. It supports Danish banks (Danske Bank, Nordea, Jyske Bank, etc.) and 2400+ institutions globally.

Expand All @@ -107,6 +107,38 @@ Once accepted the rules are imported into Actual Budget.
3. Go to **Destinations** → **Add Destination** → select **API**
4. Copy your API token

### Setup merchant normalization

To have the new transactions look more like the ones we expect from Spiir, we can create a normalization function in Lunch Flow for both the Merchant and Description fields.

1. On lunchflow.app go to **Connections**
1. For each account open **settings**
1. Go into the Merchant tab, and **enable Advanced Mode**.
1. Insert the following into the template field

```js
(it.remittanceInformationUnstructuredArray ?? [])
.join(" ")
.replace(
/^(kontaktløs\s+)?(Dankort(-køb)?|MobilePay køb|Betalingsservice|Visa\/Dankort)\s+/i,
"",
)
.replace(/\s+(Nota|Notanr|Aftalenr\.|Trans\.nr\.)\s+\S+$/i, "")
.replace(/\s+Nota\s+nr\.\s+\S+$/i, "")
.replace(/^[A-Z]{3}\s+[\d,.]+\s+Kurs\s+[\d,.]+\s+Nota\s+nr\.\s+\d+\s*/i, "")
.replace(/\s*[-]\s*\d+$/, "")
.replace(/\s+\d+$/, "")
.replace(/\.+$/, "")
.replace(/\s+/g, " ")
.trim() ||
it.creditorName ||
"Unknown";
```

This will normalize the bank text and put it into the Merchant field.

Repeat for the Description tab, using the same template.

### Get your Actual Budget Sync ID

In Actual Budget: **Settings** → **Show advanced settings** → copy the **Sync ID**.
Expand All @@ -126,12 +158,12 @@ The interactive setup will ask for:

### Configure account mappings

On first run, select **Configure account mappings** to map each Lunch Flow bank account to the corresponding Actual Budget account. This ensures transactions from your bank land in the right account. This is also where you choose which date to start syncing from, so don't skip this step.
On first run, select **Configure account mappings** to map each Lunch Flow bank account to the corresponding Actual Budget account. This ensures transactions from your bank land in the right account. This is also where you choose which date to start syncing from, so don't skip this step.

If you imported from Spiir first, your Actual accounts will already exist, just match them up by name.

> [!NOTE]
> The Lunch Time account names are probably pretty meaningless to you. They are by default just the account types (at least from Lån & Spar), so creating the account mappings becomes a lot easier if you rename the accounts in the Lunch Flow web-UI before configuring the account mappings.
> The Lunch Flow account names are probably pretty meaningless to you. They are by default just the account types (at least from Lån & Spar), so creating the account mappings becomes a lot easier if you rename the accounts in the Lunch Flow web-UI before configuring the account mappings.

### Automate with cron

Expand Down
Loading