Tackler Accounting Engine

repository·main·Indexed 41 days ago

https://github.com/tackler-ng/tackler

A high-reliability accounting system designed for trustworthy operations with a fail-fast journal mechanism. It features native Git SCM and filesystem storage support, a structural account hierarchy, and a robust data model for immutable transactions. The system includes tools for report configuration, commodity price data (Mark-to-Market) via PriceDB, and a dedicated API for HMI representation.

Tokens
25.2K
Snippets
83
Records
145
Agent score
50%

What's inside Tackler

  1. Overview of Tackler CLI usage

    main

    Tackler-NG is a CLI application used for processing data from various input sources (Git repositories, file systems, or single files) and generating reports. The CLI allows you to specify input parameters, audit modes, and API filters to refine the data processing and reporting output.

    cargo run -- --help
  2. Overview of Tackler-NG: Rusty Services

    main
    The tackler-rs package contains various auxiliary services written in Rust that are required for the operation of the Tackler ecosystem. These services handle specialized tasks that fall outside the primary domain of plain text accounting but are necessary for the overall functionality of the Tackler system.
  3. Overview of Tackler Test Vectors ("the Suite")

    main
    The Tackler Test Vectors, also known as "the Suite", is a collection of test vectors specifically designed for tackler. For general information regarding these tests and their purpose, refer to the Tackler Test Tracking Database (T3DB) repository.
  4. Overview of Tackler features

    main

    Tackler is a high-performance bookkeeping engine written in Rust. Key capabilities include:

    • Storage Types: Filesystem-based journals and native Git SCM-based journals.
    • Reporting: Balance Reports (flat/tree view), Balance Group Reports, and Register Reports.
    • Exports: Equity, Accounts, and Identity exports.
    • Commodities: Support for currencies, shares, and market value valuations (Current, Historic, and Variable Market Value).
    • Precision: Nanosecond resolution timestamps with timezone support.
    • Advanced Filtering: Transaction filters and GIS (Geo Location) filters.
    • Auditing: Verification of historic accounting data.
  5. Identify the correct Tackler-NG component for your needs

    main

    Tackler-NG is a bookkeeping tool with native GIT SCM support for plain text accounting, written in Rust. Depending on your integration requirements, you should use one of the following components available on Crates.io:

    • tackler: The standalone CLI application.
    • tackler-api: The Client API for interacting with Tackler services.
    • tackler-core: The Server API for building or extending Tackler server-side logic.
    • tackler-rs: Rusty Services for specialized service implementations.
  6. Understand Tackler performance benchmarks

    main

    Tackler undergoes performance testing to validate algorithm sanity and system performance. The results provided in the documentation are ballpark figures intended to help users validate selected algorithms and monitor memory usage as workloads increase.

    Tests are conducted using transaction sets of 1E3, 1E4, 1E5, and 1E6. The benchmarking covers:

    • All report types.
    • Runs with and without filtering.
    • Filesystem-based storage.
    • Git-based storage.
  7. Use the kind attribute for account balance sides

    main

    The kind attribute in a [[account]] block specifies the account's natural balance side.

    • Allowed values: "debit" or "credit".
    • Inheritance: The kind attribute cascades down the account tree. Subaccounts inherit the kind of their nearest declared ancestor unless they declare their own.
    • Constraint: If you use multiple [[account]] blocks for the same account name (to represent different periods), the kind must be identical across all blocks.

    Note: This is distinct from a 5-type taxonomy (Asset, Liability, etc.); it specifically refers to the debit/credit nature.

  8. Use External Reference IDs (ext-id) to connect transaction data

    main

    The ext-id (External Reference ID) is a metadata field for transactions used to link transaction data to external sources (e.g., CSV records or external system IDs). It can also be used to enforce uniqueness across a transaction set to prevent duplicate imports.

    Constraints:

    • Must be non-empty.
    • Must consist of Unicode characters (no control characters).
    • In journal files, it is a single line, newline-terminated, and trimmed string.
  9. Use Commodity Price data in reports

    main

    Tackler supports commodity price data (Mark-to-Market) via PriceDB. It supports several models:

    • Current Market Value
    • Historic Market Value
    • Variable Market Value

    This allows for more accurate valuation in reports. This feature was introduced in version 25.04.1.

  10. Understand Tackler's number type representations

    main

    Tackler uses two distinct types for decimal representation depending on the context:

    1. TacklerReal: Modeled after Scala's BigDecimal. It uses unlimited MathContext with HALF_UP rounding mode.
    2. rust_decimal::Decimal: A 128-bit fixed-precision decimal representation. Values are of the form $m / 10^e$, where $m$ is an integer ($-2^{96} < m < 2^{96}$) and $e$ is an integer between $0$ and $28$ inclusive.
  11. Understand Transactions and Postings

    main

    Tackler operates on a stream of immutable transactions.

    Transaction (Txn)

    An isolated, self-contained accounting activity.

    • It must contain two or more postings to accounts.
    • It includes metadata such as dates, codes, and descriptions.
    • Constraint: The sum of all postings within a single transaction must be zero.
    • Sorting: To ensure a stable, deterministic sort order (especially in distributed systems), transactions should include a uuid. If multiple transactions have the same timestamp, Tackler sorts them by timestamp -> code -> description -> uuid.

    Posting (post)

    An activity on a single account (either a debit or a credit).

    • Debit/Credit: Handled via positive or negative numbers.
    • Constraint: Postings with zero amounts are not allowed.
    • Last Posting: If a posting is the last one in a transaction, the amount may be left empty.

    Posting Types

    • Posting: The internal representation of the original parsed transaction posting.
    • AccumulatorPosting: Used by the Accumulator for reporting; contains calculated running totals for an account.
    • RegisterPosting: Used by the API interface for Register reports.
  12. Understand Equity export posting and warnings

    main

    The Equity export process includes several logic enhancements to ensure data integrity:

    • Explicit Posting Values: Equity target account postings now use explicit values (the actual amount) rather than implicit values. These postings use the full available scale, meaning scale settings do not affect equity exports.
    • Zero-Sum Warnings: If an equity transaction is processed where the sum of postings is zero (without an equity posting), a warning is inserted into the generated transaction. This warning may also be displayed on the Register report.
    • Formatting: Equity transactions are now indented with 3 spaces to match the indentation used in identity exports.