aboutsummaryrefslogtreecommitdiff

bokf

Self-hosted bookkeeping for Swedish organizations. One C daemon, one SQLite file, one JSON API shared by the CLI, the ncurses UI and LLM agents.

Status: 0.1.0-dev — walking skeleton. Not production ready. See docs/COMPLIANCE.md §9.

Build

Requirements: Linux, a C11 compiler, GNU make, and libncursesw for the TUI. No other system libraries — SQLite, yyjson, SHA-256 and Argon2 are vendored.

sh make -j$(nproc) make test

make test runs the server/protocol suite, the TUI unit tests and a docs/code consistency check. Extra targets: make test-asan / make test-ubsan (sanitizers) and make test-pty (drives the real TUI over a pty against a throwaway /tmp daemon and asserts on screen text).

Produces build/bokfd (daemon), build/bokfctl (CLI) and build/bokftui (ncurses UI). Builds on x86_64 and arm64 (Armbian, Raspberry Pi, …).

Run

```sh ./build/bokfd init –db /var/lib/bokfd/bokfd.db –user admin BOKFD_PASSWORD=secret ./build/bokfd init … # non-interactive

./build/bokfd –db /var/lib/bokfd/bokfd.db –socket /run/bokfd/bokfd.sock ```

In another shell, the terminal UI (or script with bokfctl):

```sh BOKFD_SOCKET=/run/bokfd/bokfd.sock BOKFD_USER=admin BOKFD_PASSWORD=secret \ ./build/bokftui

BOKFD_USER=admin BOKFD_PASSWORD=secret \ ./build/bokfctl –socket /run/bokfd/bokfd.sock org.create ‘{“name”:“AB Ett”,“org_nr”:“5560123456”}’ ```

Documentation

  • docs/PROTOCOL.md — transport, auth, command reference
  • docs/SCHEMA.md — database schema, invariants, hash chains
  • docs/COMPLIANCE.md — BFL/BFNAR mapping and operator duties

License

GPL-3.0-or-later. Vendored components have their own compatible licenses; see THIRD_PARTY_NOTICES.md.