Files
boundhq/inbound/MODULE_DEPENDENCY_MAP.md
T

55 lines
4.3 KiB
Markdown

# Module Dependency Map
This map shows the intended module connections for Stage 1 SaaS and identifies current, missing, broken, or duplicate links.
## Core Workflow
```mermaid
flowchart LR
Email["Email Intake"] --> Enquiry["Enquiry"]
Customer["Customer / Contact"] --> Enquiry
Enquiry --> Quote["Quote"]
Pricelist["Pricelist"] --> Quote
Quote --> Project["Project"]
Quote --> Invoice["Deposit Invoice"]
Project --> Job["Job"]
Job --> InvoiceFinal["Final Invoice"]
Invoice --> Xero["Xero"]
InvoiceFinal --> Xero
Project --> Files["Files / Drawings"]
```
## Dependency Table
| Flow | Current links | Missing links | Broken/risky links | Required fixes |
|---|---|---|---|---|
| Email Intake -> Enquiries / Customers / Projects / Attachments | Routes can create enquiries, link logs, apply project updates | Customer setup wizard for mailbox and trusted senders | OpenAI key pending; tenant privacy needs proof | Stage 1.5 setup guide and isolation test |
| Enquiry -> Customer -> Quote | CRM and enquiries exist; quotes link contacts/customers | Confirm one-click enquiry-to-quote/project path | Dev Centre seed notes missing convert button | Verify and document onboarding flow |
| Quote -> Project -> Job | Projects/jobs/quotes link through `project_id`; acceptance creates downstream records | Confirm all created records carry business scope | PDF compliance defaults risk | Run E2E quote acceptance smoke test |
| Quote -> Invoice -> Xero | Invoice creation and Xero push exist | Scopes enabled; per-tenant OAuth setup | Xero route status blocked | Treat Xero setup as Stage 1 launch gate or managed manual step |
| Pricelist -> Quotes / Invoices / Purchase Orders / Inventory | Quote pricelist items and procurement fields exist | Guided starter pack for new customers | UOM/GST import mistakes possible | Build customer-facing import template after audit |
| Tradify Importer -> Customers / Jobs / Quotes / Invoices / Projects | Upload, preview, confirm, rollback exist | Plain customer instructions and sample export checklist | Bad CSV mapping could pollute tenant | Use throwaway tenant import rehearsal |
| Production Planner -> Jobs / Projects / Schedule / Capacity | Production routes and board exist | Staff leave/capacity integration, CNC estimates | Staging only | Stage 2 unless required by customer |
| Inventory -> Purchase Orders -> Stock | Stock/PO tables exist; procurement foundation links fields | Receiving-to-stock must be verified | Dev Centre historical bug says unlink existed | Test before promoting as Stage 1.5 |
| Customer Portal -> Quotes / Jobs / Invoices | Portal auth/admin routes exist | Job progress and file access incomplete | Customer scoping high-risk | Stage 2 |
| PDF Templates -> Quotes / Invoices / Compliance | Template routes/services exist | State default terms deployed and verified | Route map missing/unknown; legal blocker | Fix before first paid quote/invoice |
| Settings -> Business setup / branding / numbering / users | Settings tabs and routes exist | Onboarding wizard; DIFM checklist | No single first-run flow | Create onboarding blueprint and manual checklist |
| Dev Centre -> Launch readiness | Planning and module status exist | North Star, blockers, test status, stage classification | Manual percentages misleading | Add North Star dashboard spec |
## Duplicate Workflows
| Duplicate | Problem | Recommendation |
|---|---|---|
| Scheduler/Dispatch and Production Planner | Two scheduling concepts with overlapping job movement | Park Scheduler for Stage 1; use Jobs board and simple project/job dates |
| Cabinet Builder, Estimator, Mozaik Library | Multiple estimating/BOM paths | Use Pricelist + Quotes for Stage 1; keep advanced manufacturing tools Stage 2+ |
| Dev Centre completion vs route promotion map | Two sources imply readiness differently | Route map + readiness audit should drive launch status |
| Customer Portal vs public quote portal | Public quote acceptance works; full portal incomplete | Use public quote portal for Stage 1; full portal Stage 2 |
## Stage 1 Required Dependency Path
Shortest required path:
Customer setup -> Settings -> Pricelist -> Customer -> Quote -> PDF -> Accept -> Project/Job -> Invoice -> Xero/manual accounting -> Support.
Anything outside that path is Stage 1.5 or later unless the first customer explicitly needs it.