application tier

application-ledger

Forge ledger module — double-entry accounting: accounts, journal entries, transactions. Wraps domain-ledger. Foundation for application-billing, application-fulfillment, and any ERP-shape consumer.

Forge ledger module — double-entry accounting: accounts, journal entries, transactions. Wraps domain-ledger. Foundation for application-billing, application-fulfillment, and any ERP-shape consumer.

Tierapplication
Roleunclassified (baselined)
Pathcrates/application/ledger
Edition2024
Targetsapplication_ledger, pg_forge_ledger
Public items7 across 0 modules
Tests2

What it is for

application-ledger — double-entry accounting for the Forge framework.

Wraps domain-ledger. Consumers compose this when they need bookkeeping library crates: chart of accounts, journal entries, debit/credit transactions with referential integrity. Migrations are owned by domain-ledger; this module reports them via migrations() so application-engine's ledger picks them up.

Capabilities

LedgerModule

application-ledger — double-entry accounting for the Forge framework.

Item
pub struct LedgerModule
LedgerModule :: fn new() -> Self
LedgerModule :: fn name(& self) -> & 'static str
LedgerModule :: fn version(& self) -> & 'static str
LedgerModule :: fn migrations(& self) -> Vec <MigrationSet>
LedgerModule :: async fn migrate_pending(& self, pool : & PgPool) -> std::result::Result <u32, MigrationError>
LedgerModule :: fn permission_codes(& self) -> Vec <String>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct LedgerModule
LedgerModule :: fn new() -> Self
LedgerModule :: fn name(& self) -> & 'static str
LedgerModule :: fn version(& self) -> & 'static str
LedgerModule :: fn migrations(& self) -> Vec <MigrationSet>
LedgerModule :: async fn migrate_pending(& self, pool : & PgPool) -> std::result::Result <u32, MigrationError>
LedgerModule :: fn permission_codes(& self) -> Vec <String>Kept in sync by hand with application-ledger-accounts/-entries/-reports' own PERM_* constants (sprint 3.65, Gate 1.5 Q1) -- this list is declarative only (LedgerModule mounts no router of its own and nothing calls this for seeding), but a stale entry here is exactly the kind of policy fiction that misleads the next reader.

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into domain.

Shares tier application with 120 other crates: application-agreements, application-ai, application-analytics, application-approvals, application-assessments, application-audit-log, application-auth, application-billing, … (120 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)application
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/application/ledger
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_application["application"] --> n_domain["domain"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`application-core`applicationnoalways
`application-money`applicationnoalways
`domain-ledger`domainnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1fullnoalways

Build. None.

Depended on by. 2 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_billing["application-billing"] -->|uses| SELF
  n_tools_corpus["tools-corpus"] -->|uses| SELF
  SELF["application-ledger"]
  SELF -->|runtime| n_application_core["application-core"]
  SELF -->|runtime| n_application_money["application-money"]
  SELF -->|runtime| n_domain_ledger["domain-ledger"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libapplication_ledger`src/lib.rs`
testpg_forge_ledger`tests/pg_forge_ledger.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
CARGO_PKG_VERSIONsrc/lib.rs

2 workspace crates depend on this one: application-billing, tools-corpus.

Verification

KindCount
Unit tests1
Integration tests1
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root101

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc17
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 1
    "No rustdoc detected" : 6

Metrics

MetricValue
Rust source files1
Source lines100
Code lines69
Public API items7
Public modules0
Tests2
Examples0
Cargo features0
Direct runtime dependencies5
Workspace reverse dependencies2
pie showData
    title Public API by kind
    "method" : 6
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 69
    "Blank or comment" : 31

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All application · Manual