Skip to content

chf3198/tsv-ledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

208 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

tsv-ledger

Tests Release PolyForm Noncommercial Live Demo

Live Demo · Features · Quick Start · Documentation · Contributing


tsv-ledger is a browser-based expense allocation tool for sole proprietors and self-employed workers. It imports Amazon Order History (CSV/ZIP) and Bank of America statements (DAT), lets you split each transaction between Business and Personal using intuitive sliders, and exports a categorized CSV ready for tax prep or accounting software. Built with Alpine.js, Pico CSS, noUiSlider, and Cloudflare Pages/Workers/D1 — zero frontend build step.


Features

Feature Description
Smart Import Drag-and-drop Amazon Order History (CSV/ZIP) and Bank of America statements (DAT). Automatic parsing and transaction categorization.
Expense Allocation Slider-based percentage split (0–100%) per transaction. Designed for tax categorization of mixed-use business/personal items.
Dual-Column Board Visual Business vs. Personal columns. Split items appear proportionally in both.
OAuth Authentication Sign in with Google or GitHub via Cloudflare Workers. Optional cloud sync across devices.
Local-First Works fully offline with localStorage. Data stays on your device by default — no account required.
CSV Export Download categorized expenses as CSV for accounting software or tax preparation.

Quick Start

git clone https://github.com/chf3198/tsv-ledger.git
cd tsv-ledger
npm install
npm start
# Open http://localhost:8080

Or try the Live Demo — no installation required.


Testing

npm test          # Run all 40 Playwright E2E tests
npm run lint      # Check file sizes (≤100 lines per file)
npm run test:ui   # Interactive Playwright test runner

Tech Stack

Layer Technology Purpose
UI Alpine.js (15 kB) Reactive state management
Styling Pico CSS (10 kB) Classless semantic styling
Sliders noUiSlider (12 kB) Expense allocation interface
Testing Playwright 40 E2E browser tests
Hosting Cloudflare Pages Static hosting + preview deploys
API Cloudflare Workers OAuth + session management
Database Cloudflare D1 SQLite-backed optional cloud sync

Zero frontend build step — no bundler, no transpiler. Just HTML, CSS, and JavaScript.


Project Structure

tsv-ledger/
├── index.html           # Alpine.js SPA entry point
├── css/
│   ├── shell.css        # App shell layout
│   └── app.css          # Component styles
├── js/
│   ├── app.js           # Alpine state machine
│   ├── amazon-parser.js # Amazon Order History parser
│   ├── boa-parser.js    # Bank of America statement parser
│   ├── auth.js          # OAuth client
│   └── storage.js       # localStorage CRUD
├── worker/              # Cloudflare Worker API
│   └── src/
│       ├── index.js     # API routes
│       ├── oauth.js     # OAuth handlers
│       └── session.js   # Session management
├── tests/               # Playwright E2E specs
└── docs/
    ├── DESIGN.md        # Architecture and data model
    └── adr/             # Architecture Decision Records

Documentation

Document Description
DESIGN.md Architecture, data model, and design decisions
ADRs Architecture Decision Records
CONTRIBUTING.md How to contribute
CHANGELOG.md Version history
SECURITY.md Security policy

Contributing

Contributions are welcome! See CONTRIBUTING.md to get started.


License

PolyForm Noncommercial 1.0.0 — free for personal, educational, and non-commercial use. Commercial use requires a paid license. See COMMERCIAL-LICENSE.md or contact curtisfranks@gmail.com.

© 2026 Curtis Franks