Logistiki.Demo (logistiki v0.1.0)

Copy Markdown View Source

The end-to-end demo scenario for Logistiki v0.1.0 (project plan §35).

run_demo/0 loads the knowledge program, creates the demo entity and account trees, links entities to accounts, processes the demo business events, and prints the selected policies, generated journals, postings, balances, statements, and audit evidence.

The demo is runnable from a normal Elixir OTP application without Phoenix:

Logistiki.Demo.run_demo()

It uses the simulation backend by default. Switch backends with Logistiki.put_ledger_backend/1 before running.

Summary

Functions

Runs the full demo scenario and returns a summary map.

Functions

run_demo(opts \\ [])

(since 0.1.0)

Runs the full demo scenario and returns a summary map.

Seeds the demo entity and account trees, links entities to accounts, processes demo business events, and prints the selected policies, generated journals, postings, balances, statements, and audit evidence.

Arguments

Returns

  • map() — with :entities, :accounts, :deposit_result, :fee_result, and :reversal keys.

Examples

iex> Logistiki.Demo.run_demo()
=== Logistiki v0.1.0 demo ===
...
=== demo complete ===
%{entities: ..., accounts: ..., deposit_result: ...}