- Auth section described a hardcoded admin/password stub; it's now real
JWT + bcrypt on /api/v1/* (verified against the actual route handlers).
- Known Limitations listed the pending-queue and non-transactional item
writes as still-open bugs; both were fixed 2026-07-08 - marked resolved.
- Corrected the poll-loop timing (2s x 130 retries = ~4.3min, not "2 min").
- Noted the confirmation-gate step now in the PUT flow, and that Product
Scan classification is DINOv2-primary (YOLO fallback), single-pass at
upload time - not the separate LAN-dependent call it used to be.
- Linked screenshots/v2/WORKFLOW.md + the new slide deck as the visual
app walkthrough reference.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JSgYVUWJTGMk7SZqqHH8xy
Captures the full DO Scan and Product Scan flows end-to-end against the live
backend (real OCR extraction, real DINOv2 product classification, a genuine
network-timeout failure, and a live validation-gap finding) for use in
presentations. WORKFLOW.md documents every screen/button/algorithm, and
Prima-Mart-Scanner-Workflow.pptx turns it into a 23-slide deck.
Also updates AppConfig's hardcoded LAN IP (192.168.70.4 -> 192.168.100.20)
to match the current dev machine's address, discovered while reproducing the
upload flow against the real backend.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JSgYVUWJTGMk7SZqqHH8xy
Fixes reported from APK field testing: DO/Product scan mode was inconsistent
between the camera drawer and documents screen (now one shared provider,
with an orange/green color cue); unconfirmed scans leaked into history with
placeholder data before the user tapped confirm (backend now gates
GET /documents on a new `confirmed` column, flipped only by PUT); and
Product Scan ran the GPU classifier twice, once at upload and again on
review (now a single pass at upload, persisted and read directly by the
editor). Also removes the unused "Hubungkan ke PO" field and fabricated
PO/SO/DO placeholder values from the Product Scan flow, closes out the
per-document-polling and save-recovery tasks (6.1/6.3), and splits several
touched files to stay under the repo's 256-line guideline.
Full detail in docs/iteration-log.md and backend/docs/iteration-log.md.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Backend (app-pfm-ocr-v2/backend):
- Product/SKU scan feature complete: trained DINOv2 index (118 reference
photos, 16 SKU classes) and YOLO classifier (83.3% top-1 val accuracy),
fixed scripts/install-pipeline.sh (was missing ultralytics/torch), fully
browser-verified end-to-end on /scan-pfm. Mobile m-scan-pfm page cancelled
(Flutter app handles mobile; web UI is desktop-only for pipeline testing).
- Fixed a real data-loss bug: Save Ground Truth (scan-pfm and the DO-flow's
manual-label) was silently writing into the pfm-web-app container's
ephemeral filesystem instead of the host, because /sources wasn't
bind-mounted in docker-compose.yml. Added the mount, recovered an
orphaned entry.
- accounts.password is now bcrypt-hashed (bcryptjs, idempotent migration
in db/init.ts) instead of plaintext; login route compares hashes.
- /api/v1/documents/* (list, PUT, upload) now enforces real 401 auth,
matching what the Flutter client already sends. The "classic" routes
deliberately stay open — they're dev-only web UI with no login flow and
won't exist in production.
- OCR accuracy investigated end-to-end: real baseline is 95.10% overall
(target met; accuracy_report.md was stale at 75.04%, now flagged). Fixed
one genuine parser.ts bug (SO/DO field duplication in the global fallback
regex); remaining gaps are OCR/layout-model limitations, not parser bugs.
- Adopted a standalone copy of the fhanyuh/agents-settings e/n workflow
scoped to backend/ (AGENTS.md Part A/B split, SKILLS.md, plans/, docs/),
independent of the root copy which now covers Flutter only.
- next-implementation.md deleted; content folded into
backend/plans/next-enhancements.md for traceability.
Root:
- Adopted fhanyuh/agents-settings kit (AGENTS.md, SKILLS.md, plans/,
docs/feature-list.md), scoped to the Flutter app only.
- Pending documents queue now persists to Hive (lib/core/storage) instead
of memory-only, surviving an app kill mid-upload.
Removed backend_backup/ (stale Express/Prisma prototype, superseded by
pfm-web-app) and the completed plans/next-enhancement-plan.md checklist.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Documents the 89.4% overall accuracy (up from 82.2% baseline, 95% target),
grounded in the actual logged run in accuracy_history.jsonl rather than a
vague claim, plus which fields the sanitize/triple-check layer rescues over
raw regex. Notes that current gaps are partly a photo-capture SOP floor
(DO paper photographed on top of other documents confuses auto-deskew),
not just a parsing/OCR ceiling.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eRAsLqN9Sg1b9YPz22Lxz
Replaces stale setup instructions (single hardcoded API URL, old migration
story) with the dual-mode ngrok/LAN config, the demo/production compose
override, and a "what to consider" section grounded in real issues hit this
session: the duplicate backend/docker-compose.yml project-name collision,
store_master shipping unseeded, and the debug-signed APK.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eRAsLqN9Sg1b9YPz22Lxz
Reliability/PoC hardening: dedupe uploads by file_hash, surface editor sync
failures instead of a false success SnackBar with a retry-without-re-OCR path,
bound the OCR pipeline fetches with timeouts, share a single ApiClient/Dio
instance app-wide, tune capture JPEG quality, and add an opt-in
docker-compose.demo.yml for a production-mode run ahead of client demos.
Translate all Flutter-side user-facing text (screens, validators, SnackBars,
the printed delivery receipt, and shared API error messages) to Bahasa
Indonesia.
Also includes in-progress OCR parser/accuracy-tuning work from the same
session: table column/unit normalization fixes, store/customer master data,
accuracy history log, and test-image renaming/cleanup.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eRAsLqN9Sg1b9YPz22Lxz