feat(app): add the Nostro app, a window for phones and desktops
Linux phones have no banking apps, and a command line is no answer on a phone. The app does everything the nostro command does and, like it, only talks to nostrod: it holds no key and no token. - Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens; Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics; nostro-app; and Nostro.DebugCommands for the --debug-api build. - Client: every method also in an asynchronous form for an sd-event loop, with DaemonMissing and OutcomeUnknown. - nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both Flatpaks cross-built for aarch64, and the licence texts they carry. - nostro-fake-system, a made-up bus and bank with a real nostrod on them, to look at the app against. The README's screenshots are taken on it. - The nostro command: an API key's environment is the key's own to say, so --sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL. The published contract changes in three places, before any release (design rule 10): - Transactions' query takes `stored`: answered from what nostrod has stored, without asking the bank. The app searches with it; before, every search was a call to bunq. - AddBunq's `environment` no longer chooses over what the key says of itself: a key of the other environment is refused. - SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one as DEACTIVATED however well it pays, and leaves it as it is when asked, without an error. The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved from one to the other (design rule 13). Transaction's schema is unchanged. Verified: the 17 tests pass with every line, function and region of what they link run, and the five lint runs are clean. Every screen was looked at on the made-up system, at a phone's and a desktop's sizes in the light and the dark look, on Plasma under Wayland. What is said of bunq's cards comes from its sandbox, with throwaway users, and from one real virtual card. Known to have been used against production: connecting, and reading accounts, payments and cards. Not known to have been tried: a payment from the app against bunq, OAuth against bunq, and anything on a phone. Building the app takes --graphics=, a Crafter.Graphics checkout on its branch claude/nostro-app, until that branch is merged and pinned here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
1ea50c50bc
commit
5b4037955b
106 changed files with 17804 additions and 289 deletions
|
|
@ -1,63 +0,0 @@
|
|||
# SPDX-License-Identifier: LGPL-3.0-only
|
||||
# SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
#
|
||||
# nostro as a Flatpak: the CLI, which is the command, and nostrod, which systemd runs from it as the system user nostro
|
||||
# (packaging/system/nostrod.service). Install it system-wide, with the system files packaging/system/install.sh or
|
||||
# packaging/arch/PKGBUILD put in place; a Flatpak cannot install those itself.
|
||||
#
|
||||
# Built with crafter-build's own Flatpak as the base app, for its clang 23 and libc++, then stripped back to the two
|
||||
# binaries and the three C++ runtime libraries they link. libssl, libcrypto and libsystemd come from the Platform.
|
||||
app-id: net.catcrafts.Nostro
|
||||
runtime: org.freedesktop.Platform
|
||||
runtime-version: '26.08'
|
||||
sdk: org.freedesktop.Sdk
|
||||
base: net.catcrafts.CrafterBuild
|
||||
base-version: stable
|
||||
branch: stable
|
||||
command: nostro
|
||||
finish-args:
|
||||
# nostrod talks to the bank, and to the bus, logind and polkit on the system bus; the CLI talks to nostrod there.
|
||||
# Nothing else: no files, no session bus. nostrod keeps its state in the service's home, which is its own.
|
||||
- --share=network
|
||||
- --socket=system-bus
|
||||
modules:
|
||||
- name: nostro
|
||||
buildsystem: simple
|
||||
build-options:
|
||||
# crafter-build fetches Crafter.Network, Crafter.Thread, Crafter.DB and Crafter.LintRules from git, unpinned (see
|
||||
# AGENTS.md).
|
||||
build-args:
|
||||
- --share=network
|
||||
# A baseline CPU: crafter-build builds for the building machine's own (-march=native) unless told otherwise.
|
||||
env:
|
||||
NOSTRO_MARCH: x86-64-v2
|
||||
arch:
|
||||
aarch64:
|
||||
env:
|
||||
NOSTRO_MARCH: armv8-a
|
||||
build-commands:
|
||||
- HOME="$PWD/.home" crafter-build --banks=bunq --march=$NOSTRO_MARCH --mtune=generic
|
||||
- HOME="$PWD/.home" crafter-build --banks=bunq --product=daemon --march=$NOSTRO_MARCH --mtune=generic
|
||||
- install -Dm755 "$(ls -t bin/nostro-*/nostro | head -n1)" /app/bin/nostro
|
||||
- install -Dm755 "$(ls -t bin/nostrod-*/nostrod | head -n1)" /app/bin/nostrod
|
||||
- install -Dm644 packaging/flatpak/net.catcrafts.Nostro.metainfo.xml -t /app/share/metainfo/
|
||||
sources:
|
||||
- type: dir
|
||||
path: ../..
|
||||
skip:
|
||||
- .git
|
||||
- .home
|
||||
- bin
|
||||
- build
|
||||
cleanup-commands:
|
||||
# The base app's toolchain is in /app too: keep what nostro needs at run time, its metainfo, and the licenses of what
|
||||
# it ships: its own, which flatpak-builder recorded, and LLVM's, for libc++, libc++abi and libunwind.
|
||||
- mkdir -p /var/tmp/keep/bin /var/tmp/keep/lib /var/tmp/keep/share/metainfo /var/tmp/keep/share/licenses
|
||||
- cp -a /app/bin/nostro /app/bin/nostrod /var/tmp/keep/bin/
|
||||
- cp -a /app/lib/libc++.so.1* /app/lib/libc++abi.so.1* /app/lib/libunwind.so.1* /var/tmp/keep/lib/
|
||||
- cp -a /app/share/metainfo/net.catcrafts.Nostro.metainfo.xml /var/tmp/keep/share/metainfo/
|
||||
- cp -a /app/share/licenses/net.catcrafts.Nostro /var/tmp/keep/share/licenses/
|
||||
- install -Dm644 /app/share/licenses/net.catcrafts.CrafterBuild/llvm/LICENSE.TXT /var/tmp/keep/share/licenses/net.catcrafts.Nostro/llvm/LICENSE.TXT
|
||||
- find /app -mindepth 1 -maxdepth 1 -exec rm -rf {} +
|
||||
- cp -a /var/tmp/keep/. /app/
|
||||
- rm -rf /var/tmp/keep
|
||||
Loading…
Reference in a new issue