How sathvik2005/tax-doc-classifier works
tax-doc-classifier is a text-based IRS form and page-kind classifier, with a web UI for uploading PDFs and reviewing per-page results. The main workflow runs from PDF upload through page text extraction (with UI-side OCR fallback), Jev classification, confidence gating, and streamed results. The classifier also exposes form identifiers and evaluation scoring; the UI includes catalog, evaluation, and settings views. Relationships are limited to README statements and shown source references; several UI and evaluation details are unsampled.
Main entry points: index.ts Upload and stream server · App.tsx Web UI · classify.ts Page classifier · backend.ts Jev backend
Components 19
Classification core
- Page classifier
src/classify.ts - Jev backend
src/backend.ts - Evaluation runner
eval/run.ts - Evaluation scoring
src/score.ts
Web application
- Web UI
ui/src/App.tsx - Classify view
ui/src/pages/ClassifyPage.tsx - Catalog view
ui/src/pages/CatalogPage.tsx - Evaluation view
ui/src/pages/EvaluationPage.tsx - Settings view
ui/src/pages/SettingsPage.tsx - Upload and stream server
ui/server/index.ts - OCR fallback
ui/server/index.ts - Evaluation results
ui/server/index.ts
Classification support
- PDF page text
src/state.ts - Page state
src/state.ts - Form criteria
data/criteria.json - Form identifiers
src/ids.ts
Other components
- Tax preparer
- Tax PDF
- TypeSafe Jev
Connections 19
- Tax preparer → Web UI: uses
README.md - Web UI → Classify view: renders
ui/src/App.tsx - Web UI → Catalog view: renders
ui/src/App.tsx - Web UI → Evaluation view: renders
ui/src/App.tsx - Web UI → Settings view: renders
ui/src/App.tsx - Classify view → Upload and stream server: uploads and streams
ui/src/pages/ClassifyPage.tsx - Tax PDF → Upload and stream server: uploads
README.md - Upload and stream server → PDF page text: extracts page text
ui/server/index.ts - Upload and stream server → OCR fallback: requests OCR
ui/server/index.ts - Upload and stream server → Page classifier: classifies pages
ui/server/index.ts - Upload and stream server → Jev backend: configures backend
ui/server/index.ts - Page classifier → Page state: builds state
src/classify.ts - Page classifier → Jev backend: asks questions
src/classify.ts - Jev backend → TypeSafe Jev: sends request
src/backend.ts - Page classifier → Form criteria: uses criteria
README.md - Upload and stream server → Evaluation results: reads results
ui/server/index.ts - Evaluation view → Upload and stream server: requests runs
ui/src/pages/EvaluationPage.tsx - Evaluation runner → Evaluation scoring: scores runs
- Evaluation runner → Page classifier: evaluates classifier