TorbatYar/docs/product-integration-audit.md
2026-07-28 20:39:10 +03:30

78 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Product Integration — Audit & Scope Lock
> Milestone: Product Completion / UX Completion / Enterprise Integration
> Date: 2026-07-27
> Source of truth: `docs/project-status.yaml`
> Constraint: **No new business services. No future roadmap phases** (QR, Short Link, Booking, Clinic foundation, Payment 14.6+, Experience FE-11.6 registry engines).
## In-scope services (IN_PROGRESS or COMPLETE + frontend incomplete)
| Service | Backend | Frontend | Integration focus |
| --- | --- | --- | --- |
| Identity | complete | partial | polish only |
| Accounting | in_progress (5.11) | partial | API consumers only |
| CRM | complete | partial | polish |
| Loyalty | in_progress (7.6) | **exists** (status stale at 0%) | connect to flows |
| Communication | complete | in_progress | SMS MVP usable |
| Sports Center | in_progress (9.7) | partial/hub | no 9.8+ |
| Delivery | in_progress (10.8) | in_progress | no 10.9+ |
| Experience | complete | complete (FE-11.5) | scaffold→real CRUD; stop before FE-11.6 |
| Hospitality | in_progress (12.8) | hub exists | no 12.9+ |
| Healthcare | complete | partial | polish |
| Beauty | complete | partial | polish |
| Payment | MVP 14.5 + FE complete | complete | no 14.6+ |
## Out of scope (future / planned)
Ecommerce, Marketplace, Clinic foundation, Hotel, Tourism, Link Shortener, QR, Digital Card, Booking, Notification foundation, Payment refunds/splits (14.6+), Experience Publish Registry FE-11.6+.
## Part 1 — Frontend audit (summary)
| Area | Finding | Action |
| --- | --- | --- |
| Experience list CRUD | Many scaffold `code/name/status` forms mismatched API | Patched workspace-bound creates; child lists → `readOnly` |
| Experience site-domains | Required `site_id` caused `[object Object]` | Fixed filters + error formatting |
| Home `torbatyar.ir` | App launcher only | Transformed to Business Onboarding assessment |
| Onboarding | Free-text business type | Intent select + recommended bundle preview |
| Loyalty FE status | project-status `frontend_percent: 0` stale | Corrected in status update |
| Hospitality/Delivery FE | Hubs exist; depth varies | Documented; no new phase APIs |
| Fake charts | Payment/Experience dashboards use live counts | Keep; no mock KPI invention |
## Part 2 — Cross-service integration (existing APIs)
| Link | Contract basis | Status |
| --- | --- | --- |
| Vertical → Payment | ADR-020/021 publish_id / payment intent refs | MVP APIs live; vertical connectors deferred (14.8) |
| Payment → Accounting | Settlement intents / no shared DB | Ledger in Payment; Accounting posting via provider pattern |
| Payment → Communication | Receipt SMS via Communication | Deferred until consumer wiring phase |
| Experience publish → others | ADR-022 `publish_id` | **Architecture only** until FE-11.6 / registry phase |
| Delivery → Accounting | Settlement refs | Implemented in Delivery 10.8 |
| Tenant isolation | ADR-003 | Enforced per service middleware |
| Bundle / feature toggles | ADR-017/021 three-layer | Per-service bundles exist; commercial catalog is FE recommendation layer |
## Part 3 — E2E business flows
| Flow | Executable today? | Gap |
| --- | --- | --- |
| Restaurant full (menu→publish→pay→dispatch→loyalty→SMS→accounting) | **Partial** | Publish registry, vertical payment connector, SMS trigger wiring incomplete |
| Doctor/clinic full | **Partial** | Clinic foundation + Booking future; Healthcare hub usable |
| Retail full (QR/short link) | **Blocked** | QR + Short Link + Ecommerce foundation not started |
Executable now: create tenant → pick intent → open recommended hubs → operate each services existing CRUD.
## Part 46 — Home / Bundles / Accounting
| Item | Delivered this milestone |
| --- | --- |
| Business Type Wizard (home) | Yes — intent picker |
| Needs assessment + recommended services | Yes — `business-bundles.ts` |
| Bundle builder / subscription invoice auto-create | **Catalog only** — no new Accounting mutation without dedicated phase |
| Generated permissions/licenses | Uses existing onboarding + per-service entitlements; no new Core entitlement engine |
## Quality gates
- No new TODO/placeholder pages introduced
- Experience scaffolds reduced; remaining secondary resources either workspace-bound or readOnly
- Home is onboarding-first, not app-store-first
- Future phases explicitly not implemented