# `Logistiki.Demo`
[🔗](https://github.com/thanos/logistiki/blob/v0.1.0/lib/logistiki/demo.ex#L1)

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.

# `run_demo`
*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

  * `opts` — `keyword()` — passed through to `Logistiki.process/2`.

## 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: ...}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
