Nostro/README.md
2026-11-22 13:24:39 +00:00

131 lines
8 KiB
Markdown

## Nostro
A big problem linux phones have is that they don't have banking apps, Nostro tries to change that.
By making a open source app that interfaces with bank APIs.
## How Nostro runs
Nostro keeps your bank connections out of reach of the programs you run. Its daemon, nostrod, runs as a system user of its own and holds them for every user of the machine. The Nostro app and the `nostro` command ask nostrod over the system bus, and nostrod asks polkit whether you may:
- Looking at accounts, payments, requests and cards needs nothing more in your desktop session.
- Everything else asks for your password every time: whatever pays, and whatever changes something at your bank or in your bank connections.
Your desktop draws the password dialog, and it says what it is for: the amount, who is paid, and from which account. Nothing secret goes on the command line: Nostro asks for an API key at a prompt. The app holds none of your keys either: one you type into it goes to nostrod and is forgotten.
## The app
A window for a phone or a desktop, in your desktop's light or dark look. It does everything the `nostro` command does.
On a phone, in the dark look:
| Accounts | An account | Pay |
|---|---|---|
| ![Your accounts on a phone: each with its IBAN and its balance, with Pay and Request above them](docs/screenshots/phone-accounts.png) | ![An account on a phone: its balance, and its payments by day](docs/screenshots/phone-account.png) | ![The pay form on a phone, filled in](docs/screenshots/phone-pay.png) |
In a desktop window, in the light look and in the dark one:
![An account in a desktop window: the app's places and your accounts down the side, the account's payments beside them](docs/screenshots/desktop-account.png)
![A payment's details in a desktop window, in the dark look](docs/screenshots/desktop-payment-dark.png)
The accounts and the people in these pictures are made up.
- The Pay and Request forms send on their button, and your system's password dialog is where you confirm it: read what it says. Closing the dialog pays nothing.
- A connection that its bank lets pay between your own accounts only, as bunq does one made through OAuth, is marked Limited. A payment from it to anyone else is saved as a draft, to approve in your bank's app.
- A `payto://iban/…` link opens the Pay form filled in, see Pay links.
- Press a line of a payment's, a request's or a card's details to copy it.
- With a keyboard: Tab moves, Enter presses, Escape goes back, F5 reads the screen again and Ctrl+F searches.
## Installing
nostrod and the `nostro` command come as a Flatpak, `net.catcrafts.Nostrod`, installed for the whole system. A Flatpak cannot install a few system files Nostro needs: nostrod's user, its D-Bus and polkit policies, its systemd unit, and the `nostro` command. Install both as root:
```
flatpak remote-add --system --if-not-exists catcrafts https://flatpak.catcrafts.net/catcrafts.flatpakrepo
flatpak install --system catcrafts net.catcrafts.Nostrod # the Flatpak
packaging/system/install.sh # the system files
```
The app is a Flatpak of its own, `net.catcrafts.Nostro`, which each user can install for themselves; `install.sh --app` installs it for every user instead:
```
flatpak remote-add --user --if-not-exists catcrafts https://flatpak.catcrafts.net/catcrafts.flatpakrepo
flatpak install --user catcrafts net.catcrafts.Nostro
```
`packaging/system/uninstall.sh` removes everything again. Your bank connections stay in `/var/lib/nostro` until you give it `--purge`.
## CLI
```
nostro connectors # connectors, numbered, and whether they work
nostro connectors add bunq [allowed ips, default *] # asks for the API key; a sandbox key starts with sandbox_
nostro connectors add bunq-oauth {client id} {redirect uri} [--sandbox] # asks for the client secret
nostro connectors remove {name or number} # logs out and deletes its stored transactions
nostro accounts # all accounts of all connectors
nostro transactions {account} [--search text] [--amount n] [--from date] [--to date] [--limit n]
nostro send {account} {to} {name} {amount} {description, optional}
nostro request {account} {from} {name} {amount} {description, optional}
nostro requests {account} [revoke {id}] # requests for money you sent
nostro incoming {account} [accept|reject {id}] # requests for money you received
nostro schedule {account} {to} {name} {amount} {start date} {once|daily|weekly|monthly|yearly} {description, optional} [--every n] [--until date]
nostro scheduled {account} [cancel {id}]
nostro draft {account} {to} {name} {amount} {description, optional}
nostro drafts {account} [accept|reject {id}]
nostro cards [freeze|unfreeze|lost|stolen {card id}]
nostro checkout account [{account}] # the account a pay link's form starts from in the app
```
- `{account}` is an account's name or its IBAN. `{to}` and `{from}` are an IBAN, an e-mail address, or a phone number starting with `+`.
- Amounts are in the smallest unit of your currency, so for EUR `1250` is €12.50.
- Dates are `YYYY-MM-DD` or `"YYYY-MM-DD hh:mm"`, in local time.
## Supported banks
[Bunq](https://doc.bunq.com/api-reference/start-here)
## Pay links
A website or an app can offer a `payto://` link ([RFC 8905](https://www.rfc-editor.org/rfc/rfc8905)) that pays an IBAN, and Nostro opens it on its Pay form, filled in:
```
payto://iban/NL91ABNA0417164300?amount=EUR:12.50&receiver-name=Shop%20BV&message=Order%201234
```
Nostro reads `amount` (in EUR), `receiver-name` and `message`, and refuses a link it cannot read. A link only fills in the form: nothing is paid until you press Pay and confirm it with your password. Whoever offered the link hears nothing back, and sees the payment arrive at their own bank.
## Contributing
Nostro gladly accepts contributions to add more banks!
Please add a connector for the bank you want to add and git send-email the patch to jorijnvdgraaf@catcrafts.net
Please add thorough testing coverage for te bank you are submitting.
For 100% certainity blind submissions for connectors are not accepted, they must be tested against either the live or sandbox API.
## Security
Please report security vuneribilities to jorijnvdgraaf@catcrafts.net before publishing them.
What Nostro protects you from, and what it does not:
- Programs you run cannot read your bank connections, and cannot pay or change anything at your bank without your password. They can look: in your desktop session any of them can read your accounts, payments, requests and cards.
- The app is one of those programs. It holds no key, and its Flatpak has no network and none of your files.
- The password dialog is your desktop's. A program could draw one that looks the same, so type your password only for something you asked for, and read what the dialog says.
- A link only fills in the Pay form, but what it fills in is its writer's choice: read who is paid and how much. A link is passed to the app as a program argument, and other users of the computer can read those.
- Over SSH, or in any session without a polkit agent, nothing can ask for your password, so whatever needs it is refused.
- The bank connections are not encrypted on disk: use full-disk encryption.
- An administrator can change what asks for a password, with polkit rules for the actions in [the policy](packaging/system/net.catcrafts.Nostro1.policy). A rule cannot tell Nostro from any other program you run, and one that lets `Pay` or `Change` pass makes one press on a form a payment or a draft.
## License
The library, nostrod and the `nostro` command are LGPL-3.0-only, see [LICENSE](LICENSE). The app is GPL-3.0-only, see [LICENSE.GPL](LICENSE.GPL): the modules `Nostro.Ui`, `Nostro.App` and `Nostro.Ui.Shell`, and `nostro-app`.
The app is set in Noto Sans, under the SIL Open Font License ([assets/OFL.txt](assets/OFL.txt)); [packaging/licenses/NOTICE](packaging/licenses/NOTICE) lists what else the Flatpaks carry.
## Copyright
Copyright (C) 2026 Catcrafts®
catcrafts.net