613
613parts · docs
in development
Documentation Index

Everything for the 613parts bot, apps, and operations

Five spec docs, a 48-second walkthrough video, sample bot conversations, deploy runbooks, and architectural references. Start with the demo hub if you're new.

22 documents · last updated 2026-05-02
§01Start here
4 pages
Featured · main entry point
Demo Hub
The polished landing page. 48-second walkthrough video, three feature cards (bot · driver · dispatch), stats, architecture diagram. Send this URL to anyone.
Video· 48 sec
48-second walkthrough
Six cinematic scenes auto-advancing with native voiceover. Hook, Messenger search, auto-pickup cron, driver tablet, dispatch dashboard, outro.
Conversation
Sample bot chat: F-150 brake job
Full Messenger conversation walkthrough — customer asks for brake pads, bot finds 3 matches, customer pays via Stripe, dispatch ships same-day.
Reference
Cheat sheet
One-page quick reference. Endpoints, environment variables, R2 paths, KV keys, common commands.
§02Live app previews
2 apps
Interactive
Driver tablet PWA preview
Click through the offline-first delivery app: login, today's route, tap-to-call, mark delivered, exception flow. Self-contained, no backend.
Interactive
Dispatch dashboard preview
Click through the live map dashboard with two truck pins, exception inbox, reroute UI, end-of-day report. Includes branch-unknown banner demo.
§03Contracts & integration specs
3 docs
v0.2· LOCKED
IN3812R → R2 delivery contract
AS400 export ↔ Worker contract. Branch codes (61=BEL, 62=KGN), SHIPVIA pickup convention, returns handling, exclude rules. Locked 2026-05-01.
v1.0
ManyChat flow wiring guide
Click-by-click setup: 25 Custom Fields, 4 keyword triggers, 5 flows + postback dispatcher. ~90 min build time.
v0.1
CSV format spec (legacy)
Original CSV column schema before the IN3812D pivot. Kept for historical reference; current contract is v0.2 above.
§04Architecture specs
7 docs
Bot
Messenger bot architecture
End-to-end bot design: ManyChat flows, Worker endpoints, Stripe pay-link checkout, fulfillment lanes, escalation patterns.
Backend
Cloudflare Worker spec
Endpoints, R2/KV bindings, cron schedules, auth model, error handling. The brain of the operation.
PWA
Driver app architecture
Offline-first PWA design. IndexedDB persistence, background sync, JWT auth, screen-by-screen UX.
SPA
Dispatch dashboard spec
Live map, exception inbox, reroute UI, end-of-day report. Leaflet + OpenStreetMap, no Google Maps.
Cron
Catalog generator spec
Nightly DAI rims × AS400 stock × fitment join. Two-tier caching (in-memory + KV). Output: catalog-search-latest.json.
Cron
Invoice auto-pickup cron
04:00 EST cron reads AS400 IN3812D from R2, geocodes, splits Belleville/Kingston, writes driver routes by 08:00 EST.
GPS
PosiTrace integration
Live truck GPS via PosiTrace Pro tier. 30-second cache, drop-in replacement for phone GPS, graceful fallback if missing.
§05Operations & testing
5 docs
v2 · interactive
Production deploy runbook
Click-by-click. Persistent checkboxes (localStorage), inline rollback notes, copy buttons on commands. ~2 hr end-to-end.
v1 · simple
Deploy runbook (v1, simpler layout)
Original 12-step runbook without the interactive checkboxes. Same content, simpler render.
GitHub Actions
CI workflow spec
Sticky PR comment with test results. Jobs: worker-unit, worker-tests, driver-app-tests, dispatch-app-tests, comment-pr.
Vitest
Test suite architecture
110+ tests across worker, driver app, dispatch app. Fixtures, fake-timers, IndexedDB stubs, parity tests.
Driver app
Driver app test spec
19 unit tests covering IndexedDB persistence + sync queue drainer. Happy path + network failure + idempotency.