#suite #point #transaction #tx-cat

bin+lib tktax

Main entry point for the tktax financial suite

3 releases

0.2.4 Feb 1, 2025
0.2.3 Feb 1, 2025
0.2.2 Feb 1, 2025

#50 in #financial

Download history 275/week @ 2025-01-28 50/week @ 2025-02-04 3/week @ 2025-02-11

328 downloads per month

MIT license

360KB
3.5K SLoC

This crate is the main entrypoint of the tktax accounting suite.

tktax currently contains the following crates:

tktax-3p -- Third party deps for the tktax financial suite

tktax-account -- Robust account analysis and transaction categorization for the tktax financial suite.

tktax-amazon -- High-performance crate for parsing, fusing, and exporting Amazon transaction data for financial recordkeeping.

tktax-analysis -- A robust Rust crate for financial account analysis, histogram generation, donation processing, and more.

tktax-budgeting -- Budget planning and comparison utilities for tktax-based financial applications.

tktax-burst -- A Rust library for identifying and printing heavy bursts of financial transactions in a sliding date window.

tktax-check -- A Rust library for identifying and handling treasury or check transactions in the TKTAX system.

tktax-config -- Configuration handling for tktax, integrating environment- and file-based settings.

tktax-date -- Serialization/Deserialization of Chrono NaiveDate with flexible US-centric formats.

tktax-donations -- A robust library for donation transaction handling, including inflationary adjustments, depreciation, and fair-market valuations.

tktax-expense -- Business expense categorization and line-item abstractions for the tktax ecosystem.

tktax-histogram -- A Rust crate that provides robust monthly histogram utilities for financial transactions, using specialized types from the TKTAX ecosystem.

tktax-in-and-out-of-range -- Run analysis inside and outside of a given set of date ranges

tktax-io -- A library providing text preprocessing, tokenization, and formatted header printing utilities for the TKTAX project.

tktax-line-item -- Provides a trait and associated functionality for transaction line items in the TKTAX ecosystem.

tktax-medical -- Medical and insurance expenditure line-item generation for tktax.

tktax-money -- Statistical and algebraic operations on monetary amounts for the tktax project

tktax-monthly -- Library for monthly transaction summaries and average calculations in tax/accounting contexts.

tktax-quarterly -- Quarterly summarization tools for financial transactions in the TKTAX ecosystem.

tktax-serde -- Serde utilities for parsing check or serial number fields with optional u64 values

tktax-stats -- transaction summary stats for the tktax system

tktax-transaction -- A Rust library for ingesting, parsing, and categorizing transaction data from CSV files. Part of the tktax project.

tktax-transaction-category -- A Rust library for categorizing financial transactions using Porter stemming, CSV-driven classification, and advanced trait-based extensibility.

tktax-vendor -- A vendor data preprocessing component for the TKTAX system

tktax-year -- A library for enumerating and managing tracked fiscal years.

tktax-year-comparison -- Cross-year tax accounting analysis for the TKTAX suite, enabling multi-year aggregation and differential comparisons.

tktax-year-to-date -- A Rust crate for computing year-to-date transaction data in the tktax ecosystem.

tktax-before-and-after-mark -- Run analysis before and after a given mark

Each year, we expect upgrades and improvements to this system.

Feature requests are welcome! If this software is helpful to you, we would love to hear about it.

Here is an example main function:

// ---------------- [ File: tktax/src/main.rs ]
use tktax::*;
use tktax_3p::*;
use tktax_transaction_category::*;

type TxCat = MockTransactionCategory;

fn example_main() -> Result<(),AccountError> {

    tracing_subscriber::fmt()
        .with_env_filter(EnvFilter::new("info"))
        .init();

    let donation_hooks = DonationsHooksBuilder::default()
        .create_donation_builder_fn(DonationBuilder::new)
        .create_amazon_item_map_fn(create_amazon_item_map)
        .create_donations_fn(mock_example_donations)
        .build()
        .unwrap();

    let analysis_hooks = AccountAnalysisHooksBuilder::default()
        .program_config(ProgramConfig::default())
        .create_amazon_biz_expenses_fn(Some(mock_example_amazon_business_expenses))
        .create_amazon_med_expenses_fn(Some(mock_example_amazon_med_expenses))
        .donations_hooks(Some(donation_hooks))
        .build()
        .unwrap();

    let donation_config = DonationConfigBuilder::default()
        .donation_date(NaiveDate::from_ymd(2023,01,01))
        .donation_location(DonationLocation::Goodwill { name: "downtown" })
        .max_item_age(NaiveDate::from_ymd(2015,01,01))
        .build()
        .unwrap();

    analysis_hooks.run_analysis::<TxCat>(
        TrackedYear::Twenty23,
        vec![
            AccountKind::Credit, 
            AccountKind::Checking
        ],
        Some(&donation_config)
    )?;

    Ok(())
}

fn main() -> Result<(),AccountError> {
    example_main()?;
    Ok(())
}

Happy accounting!

Dependencies

~28–38MB
~650K SLoC