Skip to main content

finance_core/
lib.rs

1//! Shared library for the Paperfoot accounting suite.
2//!
3//! Every finance-* CLI (invoice, receipt, expense, bank, recon, ledger, tax)
4//! depends on this crate. It owns:
5//!
6//! - [`money`]: precise numeric handling (minor units + rust_decimal math)
7//! - [`tax`]: jurisdiction tax profiles (SG GST, UK VAT, EU VAT, US, custom)
8//! - [`entity`]: the `Issuer` primitive (companies you transact as)
9//! - [`error`]: shared `CoreError` with thiserror variants
10//! - [`paths`]: canonical suite paths (`~/.../com.paperfoot.accounting/`)
11//! - [`settings`]: the shared `config.toml` reader/writer
12//! - [`db`]: the shared SQLite connection + refinery migration runner
13//!
14//! The intent is that every new CLI in the suite starts by calling
15//! `let paths = Paths::resolve()?; let conn = db::open(&paths)?;` and gets a
16//! fully-migrated database ready to use.
17
18pub mod db;
19pub mod entity;
20pub mod error;
21pub mod money;
22pub mod paths;
23pub mod settings;
24pub mod tax;