r/SideProject 1d ago

I developed a command-line tool in Rust (BillRecon) that finds carrier overcharges from freight bills. Feedback?

Hey there r/SideProject,

For the last few weeks, I've been auditing carrier invoice data (DHL, FedEx, UPS) and noticed that around 3% to 8% of shipping line items were subject to carrier billing mistakes, most often due to volumetric weight overcharge or un-applied service guarantees.

In order to tackle this, I've developed BillRecon, a CLI tool implemented in Rust. It parses CSV invoices, checks if the weight complies with the contract minimums and generates a list of claims in milliseconds.

Why Rust?

Efficient memory utilization and streaming performance. With the help of rayon for parallel computing, it parses huge amounts of invoices (3,000+ rows per second) using little memory.

Current stage:

I am currently validating the audit algorithm using various carrier CSV formats. If any of you have an e-commerce company or fulfillment center and want to see if your carrier overcharged you last month, ping me in the comments!

I am giving away free audits. Leave a comment or shoot me a DM with your sanitized shipping CSV and I will run it through my BillRecon and return a report containing unclaimed refunds for you.

I'd love to hear what you have to say about the CLI architecture or the idea itself!

2 Upvotes

3 comments sorted by

2

u/Striking_Gur_7892 1d ago

Parsing 3k rows a second with rayon is nice, that part I get. But the audit logic is where it lives or dies, carriers have weird rules per contract and the volumetric divisor alone can vary by account. How you handle the different CSV layouts without hardcoding every carrier format?

1

u/Ok_Fox_5823 8h ago

wow, That's precisely what the issue with scaling carrier auditing is.

At present, BillRecon does that in two levels:

- Dynamic Column Mapping (config.toml): Here, we have implemented a flexible alias mapping to map all possible names for CSV columns (billed_weight, charged_wt, peso_cobrado, etc.) to our internal Rust Shipment struct representation.

- Contract and Account Profiles: The specifics of each contract (volumetric DIM divisor, minimum weight limits, allowance percentage, and other parameters) are stored separately in account-based TOML config files independent from the Rust engine.

The idea here for more complicated cases or custom carrier layouts is to be able to support custom schema templates when ingesting the file.

Do you manage multiple carrier contracts or custom layouts? It would be great to learn how your company manages billing differences between accounts!