askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
dbbasic-package.json · 4.9 KB · 90 lines
| 1 | { |
| 2 | "id": "app-intake", |
| 3 | "name": "Document Intake", |
| 4 | "version": "0.3.0", |
| 5 | "description": "Snap it, confirm it, post it. Paperwork sprawl is the reason small-business books rot: entries are tedious, so they do not get made, and by the time anybody looks the receipts are in a coat pocket. This package is the ENTRY path -- ingest is fast and dumb (store the bytes, return, read it later) because capture has to happen at the moment the paper exists; a reading pass produces a structured GUESS; and a human confirms it into a draft expense stamped generated_from scans/{id}. Nothing an engine reads is ever posted. That boundary (docs/logic-decisions.md #6, #8) is what lets this ship with no AI at all: the default extractor is regex over OCR text -- free, no key, no per-page cost -- and it degrades to 'found nothing, here is your image, type the total' rather than to wrong numbers in the ledger. An AI vision engine plugs into the same shape and simply guesses better, on the owner's own key, which is the only path with a real marginal cost. The image itself is the audit evidence auditors actually want, and it stays attached to the expense, the journal and the invoice line that follow from it. Pairs with bank reconciliation: the bank line says money left, the scan says why. Ships an attention provider: a scan at `extracted` is the pipeline's honest stopping point, where a machine declined to turn somebody's money into an expense on its own, and system_scan_processor has been returning a key literally named `needing_a_human` that no surface ever read. Now it is a number on the home page. No nav entry: app-intake still ships no door of its own, so the count files under Money and clicks through to the scans list. 0.3.0 gives the count a page to land on. The manifest has been claiming since 0.2.0 that the receipts queue \"clicks through to the scans list\", and there was no scans list: the attention path pointed at /scans?status=extracted, which no route answered, so the most valuable number on the home page was a dead link -- a notification rather than a workflow. The fix is a seeded `views` record over the generic `list` block plus a site_routes row to site_view_render, the same zero-page-code shape /products, /invoices and /accounts already use, and the nav entry that was previously declared absent. The list has no Add button on purpose: a scan is bytes plus a hash, raised by action_scan_ingest from whatever took the photograph, and a form that let somebody type a filename would create a row with no document behind it for the processor to choke on. Rows do not link either -- there is no /scans/{id} permalink in this slice, and a row that navigates to a 404 is worse than a row that does not navigate. The path is now the UNFILTERED index, deliberately: the generic list renderer builds its filter bar from the schema's views.filter_fields and takes no preselection from the query string, so ?status=extracted would have been a link that silently landed on the whole collection while claiming to be a queue. An honest broader list with `status` one click away in the filter bar beats a filter that does nothing.", |
| 6 | "compatibility": { |
| 7 | "dbbasic_object_server": ">=0.1.0" |
| 8 | }, |
| 9 | "dependencies": [ |
| 10 | "app-views" |
| 11 | ], |
| 12 | "objects": [ |
| 13 | { |
| 14 | "id": "action_scan_ingest", |
| 15 | "path": "objects/action/scan_ingest.py" |
| 16 | }, |
| 17 | { |
| 18 | "id": "hook_scans", |
| 19 | "path": "objects/hook/scans.py" |
| 20 | }, |
| 21 | { |
| 22 | "id": "system_scan_processor", |
| 23 | "path": "objects/system/scan_processor.py" |
| 24 | }, |
| 25 | { |
| 26 | "id": "action_confirm_scan", |
| 27 | "path": "objects/action/confirm_scan.py" |
| 28 | }, |
| 29 | { |
| 30 | "id": "system_scan_attention", |
| 31 | "path": "objects/system/scan_attention.py" |
| 32 | } |
| 33 | ], |
| 34 | "schemas": [ |
| 35 | { |
| 36 | "collection": "scans", |
| 37 | "path": "schemas/scans.json" |
| 38 | } |
| 39 | ], |
| 40 | "permissions": [ |
| 41 | { |
| 42 | "path": "permissions/rules.json" |
| 43 | } |
| 44 | ], |
| 45 | "seed": [ |
| 46 | { |
| 47 | "collection": "scans", |
| 48 | "path": "seed/scans.tsv" |
| 49 | }, |
| 50 | { |
| 51 | "collection": "views", |
| 52 | "path": "seed/views.tsv" |
| 53 | }, |
| 54 | { |
| 55 | "collection": "site_routes", |
| 56 | "path": "seed/site_routes.tsv" |
| 57 | } |
| 58 | ], |
| 59 | "migrations": [], |
| 60 | "schedules": [ |
| 61 | { |
| 62 | "id": "scan_processor_hourly", |
| 63 | "object_id": "system_scan_processor", |
| 64 | "schedule": "5 * * * *", |
| 65 | "description": "Read pending scans and produce confirmable suggestions. Hourly rather than daily because somebody who just photographed a receipt expects to see it read, and nothing here posts anything." |
| 66 | } |
| 67 | ], |
| 68 | "nav": [ |
| 69 | { |
| 70 | "id": "scans", |
| 71 | "label": "Scans", |
| 72 | "path": "/scans", |
| 73 | "blurb": "Paperwork photographed in, waiting to be read and confirmed", |
| 74 | "surface": "member", |
| 75 | "group": "Money", |
| 76 | "order": 380 |
| 77 | } |
| 78 | ], |
| 79 | "attention": [ |
| 80 | { |
| 81 | "id": "scans_to_confirm", |
| 82 | "object_id": "system_scan_attention", |
| 83 | "label": "Receipts to confirm", |
| 84 | "path": "/scans", |
| 85 | "group": "Money", |
| 86 | "severity": "normal", |
| 87 | "nav_id": "scans" |
| 88 | } |
| 89 | ] |
| 90 | } |