Upload source code (part 2)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- web/README.md +44 -0
- web/public/data/receipts.json +0 -0
- web/public/data/receipts/42.webp +0 -0
- web/public/data/receipts/43.webp +0 -0
- web/public/data/receipts/44.webp +0 -0
- web/public/data/receipts/45.webp +0 -0
- web/public/data/receipts/46.webp +0 -0
- web/public/data/receipts/47.webp +0 -0
- web/public/data/receipts/48.webp +0 -0
- web/public/data/receipts/49.webp +0 -0
- web/public/data/receipts/5.webp +0 -0
- web/public/data/receipts/50.webp +0 -0
- web/public/data/receipts/51.webp +0 -0
- web/public/data/receipts/52.webp +0 -0
- web/public/data/receipts/53.webp +0 -0
- web/public/data/receipts/54.webp +0 -0
- web/public/data/receipts/55.webp +0 -0
- web/public/data/receipts/56.webp +0 -0
- web/public/data/receipts/57.webp +0 -0
- web/public/data/receipts/58.webp +0 -0
- web/public/data/receipts/59.webp +0 -0
- web/public/data/receipts/6.webp +0 -0
- web/public/data/receipts/60.webp +0 -0
- web/public/data/receipts/61.webp +0 -0
- web/public/data/receipts/62.webp +0 -0
- web/public/data/receipts/63.webp +0 -0
- web/public/data/receipts/64.webp +0 -0
- web/public/data/receipts/65.webp +0 -0
- web/public/data/receipts/66.webp +0 -0
- web/public/data/receipts/67.webp +0 -0
- web/public/data/receipts/68.webp +0 -0
- web/public/data/receipts/69.webp +0 -0
- web/public/data/receipts/7.webp +0 -0
- web/public/data/receipts/70.webp +0 -0
- web/public/data/receipts/71.webp +0 -0
- web/public/data/receipts/72.webp +0 -0
- web/public/data/receipts/73.webp +0 -0
- web/public/data/receipts/74.webp +0 -0
- web/public/data/receipts/75.webp +0 -0
- web/public/data/receipts/76.webp +0 -0
- web/public/data/receipts/77.webp +0 -0
- web/public/data/receipts/78.webp +0 -0
- web/public/data/receipts/79.webp +0 -0
- web/public/data/receipts/8.webp +0 -0
- web/public/data/receipts/80.webp +0 -0
- web/public/data/receipts/81.webp +0 -0
- web/public/data/receipts/82.webp +0 -0
- web/public/data/receipts/83.webp +0 -0
- web/public/data/receipts/84.webp +0 -0
- web/public/data/receipts/85.webp +0 -0
web/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SumProof web interface
|
| 2 |
+
|
| 3 |
+
Next.js 15 + TypeScript + Tailwind CSS, deployable for free on Vercel as a static site.
|
| 4 |
+
|
| 5 |
+
**App** (for everyday users)
|
| 6 |
+
|
| 7 |
+
| Screen | What it does |
|
| 8 |
+
|---|---|
|
| 9 |
+
| Scan receipt (`/`) | Upload a photo (needs the live reader) or pick a sample; plain-language result, editable fields, live checks, save / flag / CSV |
|
| 10 |
+
| Receipt inbox (`/queue/`) | The 100 sample receipts with status, filters and CSV export |
|
| 11 |
+
| Filing search (`/search/`) | 150 FinanceBench questions: top evidence pages and a page viewer with highlights |
|
| 12 |
+
|
| 13 |
+
**Under the hood** (for technical readers)
|
| 14 |
+
|
| 15 |
+
| Screen | What it does |
|
| 16 |
+
|---|---|
|
| 17 |
+
| Model results (`/results/`) | Headline results, retrieval ladder, training curve, vector-store benchmark |
|
| 18 |
+
| Before vs after (`/receipts/`) | Each test receipt: fine-tuned vs before fine-tuning vs human label, and how the checker picked its reading |
|
| 19 |
+
| Compare search methods (`/compare/`) | The same question under BM25, dense, hybrid, routing and reranking, side by side |
|
| 20 |
+
|
| 21 |
+
**Live reading.** The scan page calls the FastAPI reader (`python -m sumproof.api`, see `scripts/serve.sh`) when the site runs on localhost, or at `NEXT_PUBLIC_SUMPROOF_API` when that is set at build time. Without it, the page offers the samples only, so the public site never contacts a visitor's machine.
|
| 22 |
+
|
| 23 |
+
The accounting checker runs in the browser (`src/lib/consistency.ts`), a port of the Python checker; `node scripts/parity.ts` confirms they agree on all 277 rule results of the test set.
|
| 24 |
+
|
| 25 |
+
## Data
|
| 26 |
+
|
| 27 |
+
`public/data/` is generated from the evaluation outputs, never edited by hand:
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
python -m sumproof.export_web # from the repository root
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## Run
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
npm install
|
| 37 |
+
npm run dev # http://localhost:3000
|
| 38 |
+
npm run build # static site in out/
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Deploy on Vercel
|
| 42 |
+
|
| 43 |
+
Import the GitHub repository, set **Root Directory** to `web`, keep the Next.js preset, and deploy. The site is fully static (`output: "export"`), so the free Hobby plan is enough.
|
| 44 |
+
|
web/public/data/receipts.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
web/public/data/receipts/42.webp
ADDED
|
web/public/data/receipts/43.webp
ADDED
|
web/public/data/receipts/44.webp
ADDED
|
web/public/data/receipts/45.webp
ADDED
|
web/public/data/receipts/46.webp
ADDED
|
web/public/data/receipts/47.webp
ADDED
|
web/public/data/receipts/48.webp
ADDED
|
web/public/data/receipts/49.webp
ADDED
|
web/public/data/receipts/5.webp
ADDED
|
web/public/data/receipts/50.webp
ADDED
|
web/public/data/receipts/51.webp
ADDED
|
web/public/data/receipts/52.webp
ADDED
|
web/public/data/receipts/53.webp
ADDED
|
web/public/data/receipts/54.webp
ADDED
|
web/public/data/receipts/55.webp
ADDED
|
web/public/data/receipts/56.webp
ADDED
|
web/public/data/receipts/57.webp
ADDED
|
web/public/data/receipts/58.webp
ADDED
|
web/public/data/receipts/59.webp
ADDED
|
web/public/data/receipts/6.webp
ADDED
|
web/public/data/receipts/60.webp
ADDED
|
web/public/data/receipts/61.webp
ADDED
|
web/public/data/receipts/62.webp
ADDED
|
web/public/data/receipts/63.webp
ADDED
|
web/public/data/receipts/64.webp
ADDED
|
web/public/data/receipts/65.webp
ADDED
|
web/public/data/receipts/66.webp
ADDED
|
web/public/data/receipts/67.webp
ADDED
|
web/public/data/receipts/68.webp
ADDED
|
web/public/data/receipts/69.webp
ADDED
|
web/public/data/receipts/7.webp
ADDED
|
web/public/data/receipts/70.webp
ADDED
|
web/public/data/receipts/71.webp
ADDED
|
web/public/data/receipts/72.webp
ADDED
|
web/public/data/receipts/73.webp
ADDED
|
web/public/data/receipts/74.webp
ADDED
|
web/public/data/receipts/75.webp
ADDED
|
web/public/data/receipts/76.webp
ADDED
|
web/public/data/receipts/77.webp
ADDED
|
web/public/data/receipts/78.webp
ADDED
|
web/public/data/receipts/79.webp
ADDED
|
web/public/data/receipts/8.webp
ADDED
|
web/public/data/receipts/80.webp
ADDED
|
web/public/data/receipts/81.webp
ADDED
|
web/public/data/receipts/82.webp
ADDED
|
web/public/data/receipts/83.webp
ADDED
|
web/public/data/receipts/84.webp
ADDED
|
web/public/data/receipts/85.webp
ADDED
|