WFDASH-WEBAPP/docs/django-nextjs-parity-backlog.md
SJCoetz fd1571e294 Add PocketBase collections, APIs & migration docs
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).
2026-05-25 18:39:33 +02:00

2 KiB

Django to Next.js Parity Backlog

Target Scope

Only these legacy areas are being rebuilt in Next.js/PocketBase:

  • wfdash basics: customers, companies, suppliers
  • quotes
  • orders
  • driver_list, combined with collection_pool
  • delivery_notes
  • repairs
  • stock flow, combined into order_items first and later separated into a dedicated stock collection

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_pool foundation
  • Delivery notes: not migrated
  • Stock management: intentionally folded into order_items workflow for now
  • Repairs: not migrated

Mandatory parity recheck order

  1. Customers
  2. Companies
  3. Quotes
  4. Orders
  5. Driver list / collection pool
  6. Delivery notes
  7. Repairs
  8. 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

  1. Customer: duplicate handling and merge strategy (replace legacy management commands)
  2. Company: details/address consistency and relation integrity checks
  3. Quotes: explicit quote-to-order action + safeguards against duplicate conversions
  4. Orders: status board + drv/collection states reflected in UI
  5. Collection pool: assignment UI and filtered work queue
  6. Delivery notes: generate delivery records from delivered/loaded order items
  7. Repairs: rebuild only the useful repair request/order flow

Out of Scope

  • stock_orders
  • customer_portal
  • rep_portal
  • internal_stock as a separate module
  • pos
  • ai_orders inside the app
  • system_monitor inside the app

AI/email/system monitoring moves to n8n and should integrate through API/webhook endpoints only.