No description
  • Nix 74.2%
  • JavaScript 25.8%
Find a file
2026-10-20 11:13:32 +02:00
.forgejo/workflows initial commit 2026-10-20 09:59:05 +02:00
docs/architecture docs: add missing state machine graphs 2026-10-20 10:30:12 +02:00
openapi docs: nixify command examples to use the dev shell 2026-10-20 11:13:32 +02:00
pkgs initial commit 2026-10-20 09:59:05 +02:00
.envrc initial commit 2026-10-20 09:59:05 +02:00
.gitignore initial commit 2026-10-20 09:59:05 +02:00
AGENTS.md docs: nixify command examples to use the dev shell 2026-10-20 11:13:32 +02:00
flake.lock initial commit 2026-10-20 09:59:05 +02:00
flake.nix initial commit 2026-10-20 09:59:05 +02:00
README.md docs: nixify command examples to use the dev shell 2026-10-20 11:13:32 +02:00

PSP

Status: draft for legal, finance, and engineering review. Key structural decisions (true-sale structure, funding basis, collections, fees, settlement) are Provisional pending the DCA term sheet, German counsel, and tax advice (see the decision log in the spec, §16).

Start here

If you want... Read
The full specification (business model, money flow, data model, ledger, compliance, glossary) docs/architecture/README.md, following its reading guide in §0
To author, lint, or preview the API openapi/README.md
Rules for AI-assisted work, open-decisions status, and next tasks AGENTS.md

The written specification wins over diagrams when they conflict. .mmd files win over rendered .png files.

Repository layout

├── AGENTS.md                  # AI-agent entry point: rules, navigation, status
├── docs/architecture/         # Canonical specification + Mermaid diagrams (.mmd and rendered .png)
├── openapi/                   # Multi-file OpenAPI 3.1 document, examples, lint scripts
├── pkgs/                      # Nix packages (Prism and Spectral CLI wrappers)
├── flake.nix                  # Dev shell, apps (lint, bundle, mock), checks
├── .envrc                     # Activates the dev shell via direnv
└── .forgejo/                  # CI: nix fmt --check and nix flake check

Development environment

Requires a Nix installation with flakes enabled. For the OpenAPI tooling, Node.js is provided by the dev shell. If you cannot use Nix, see the requirements note in openapi/README.md.

With direnv installed the environment activates automatically (.envrc runs use flake). Otherwise enter it manually:

nix develop

The shell provides: node, redocly, spectral, prism, openapi-generator-cli, mmdc, magick (ImageMagick), yq, jq, curl, git.

Prefer working inside the dev shell. All the bare tools used in the docs and command examples (redocly, spectral, prism, openapi-generator-cli, node, mmdc, magick, yq, jq, curl) come from the shell, so there is no need to call their package manager (npx, npm) directly. The nix run .#* apps below are thin wrappers that work even outside the shell.

Common commands

Task Command
Lint OpenAPI + custom checks (money, idempotency, nullability) nix run .#lint
Spectral lint nix run .#lint-spectral
Regenerate openapi/bundled.yaml nix run .#bundle
Start a Prism mock server nix run .#mock (extra args pass to Prism, e.g. --port 4010)
Preview API documentation in the dev shell: cd openapi && redocly preview-docs openapi.yaml
Re-render all diagrams docs/architecture/render-all.sh (dev shell; needs mmdc and magick)
Check formatting nix fmt -- --check
Run flake checks nix flake check --impure --keep-going --all-systems

After changing any YAML under openapi/, re-run lint, custom checks, and bundling, and commit the regenerated bundled.yaml — the full sequence is in the Regenerating section of openapi/README.md.

Diagrams

Every diagram in docs/architecture/ has a Mermaid source (.mmd) and a rendered PNG. Edit only the .mmd, then re-render with docs/architecture/render-all.sh and commit both files. Never hand-edit a PNG or commit a PNG without its .mmd source.

Making changes

Changes to the model must stay in sync across specification, diagrams, data dictionary, and API; every design change also gets a row in the change log (spec §19). The full change protocol, including which open decisions may not be silently resolved, is in AGENTS.md.

Continuous integration

The Forgejo workflow (.forgejo/workflows/) runs on pull requests:

  1. nix fmt -- --check — formatting (nixfmt, prettier, shfmt, yamllint, ...)
  2. nix flake check --impure --keep-going --all-systems — builds and checks