Introduce PocketBase workflow support, migration tooling, server APIs and documentation. Adds a set of PocketBase collection JSONs (order_items, order_items_v2, collection_pool, delivery_notes, delivery_note_items, repairs) and a large import manifest for workflow collections; includes docs describing MCP/API layer, migration audit, order-item schema and rollout plans. Adds server-side agent/MCP endpoints and services (api/mcp, api/v1/orders, collection-pool, order-items status, health) plus helper modules (pocketbase-admin, orders-service, order-item-status, agent-auth) and a migration script to create order_items_v2/collection_pool. UI: new pages for collection-pool, delivery-notes, repairs and several updates to orders/quotes pages, sidebar, tooltip and pb helpers/types. Also updates package.json (migration script and related changes) and global styles. Required env vars and suggested migration command are documented (e.g. NEXT_PUBLIC_POCKETBASE_URL, PB_ADMIN_EMAIL, PB_ADMIN_PASSWORD, ORDER_ITEMS_COLLECTION; run npm run pb:migrate:orders-v2).
2 KiB
2 KiB
Django to Next.js Parity Backlog
Target Scope
Only these legacy areas are being rebuilt in Next.js/PocketBase:
wfdashbasics: customers, companies, suppliersquotesordersdriver_list, combined withcollection_pooldelivery_notesrepairs- stock flow, combined into
order_itemsfirst and later separated into a dedicatedstockcollection
Current Next.js migration status
Core CRM
- Customers: partial/live
- Companies: partial/live
- Suppliers: partial/live
- Quotes: partial/live
- Orders: partial/live
Not migrated / minimal
- Driver list workflows: partially started through new
collection_poolfoundation - Delivery notes: not migrated
- Stock management: intentionally folded into
order_itemsworkflow for now - Repairs: not migrated
Mandatory parity recheck order
- Customers
- Companies
- Quotes
- Orders
- Driver list / collection pool
- Delivery notes
- Repairs
- Future stock collection
For each module, parity definition
- Data model parity: required fields + relations
- Workflow parity: statuses and transitions
- UI parity: list/detail/edit actions available
- Automation parity: n8n or API hooks in place
- Reporting parity: exports/reports needed
Immediate next build tasks
- Customer: duplicate handling and merge strategy (replace legacy management commands)
- Company: details/address consistency and relation integrity checks
- Quotes: explicit quote-to-order action + safeguards against duplicate conversions
- Orders: status board + drv/collection states reflected in UI
- Collection pool: assignment UI and filtered work queue
- Delivery notes: generate delivery records from delivered/loaded order items
- Repairs: rebuild only the useful repair request/order flow
Out of Scope
stock_orderscustomer_portalrep_portalinternal_stockas a separate moduleposai_ordersinside the appsystem_monitorinside the app
AI/email/system monitoring moves to n8n and should integrate through API/webhook endpoints only.