# Navagoo demo (dev @ 42dc101) ↔ Yii2 portal — parity & implementation backlog

This is the consolidated, adversarially-verified parity report between the dev demo and our Yii2 portal. Each area was independently re-audited against both codebases; analyst scores were corrected where claims were inflated.

**How to read this:** the scorecard is sorted worst-first by verified parity %, so the top rows are where we are furthest behind. "Overclaims" are analyst "done"/"partial" rows that verification downgraded. Drill into any area via `docs/parity/<key>/` for the full logic/ui/business/parity breakdown.

## Scorecard

| Area | Verified % | Partial | Missing | Overclaims | Headline gap |
|---|---:|---:|---:|---:|---|
| Shop · GROUP bookings (NEW) | 3 | 4 | 30 | 1 | Entire party-booking feature (M2) absent — no `groupBookingId`/`guestLabel`, no group CRUD/lifecycle, only reusable solo substrate |
| Admin · Geography | 6 | 1 | 7 | 3 | No demo-parity geography; existing CRUD over-grants to `shopOwner` via app-level catch-all, no granular gate |
| Shop · Dashboard | 15 | 3 | 14 | 2 | No finance domain (Subscription/Charge/Settlement); no Net-Available KPI, costs donut, settlement badges, action cards |
| Admin · Settings | 16 | 1 | 8 | 1 | No admin-editable booking-workflow FSM; no live color-theming editor; no versioned policy docs |
| Admin · Dashboard | 25 | 4 | 7 | 2 | No GMV / Earnings / Transfer / Refund KPIs; no settlement queue or subscription watch (no backing models) |
| Admin · Finance (NEW) | 34 | 4 | 13 | 3 | No ShopBalances ledger, no charges table, no carry-forward/auto-billing, no settle-with-invoice flow |
| Shop · Services catalogue | 36 | 10 | 9 | 2 | No routines/add-ons/bundles as catalogue items; no active/hidden lifecycle; no variants; full-page (not modal) CRUD |
| Admin · Catalogue | 39 | 4 | 8 | 3 | Category tree is strictly flat — no group/child (`parentId`) nesting, no cascade-delete/uncategorise |
| Admin · People | 40 | 5 | 6 | 2 | 3 separate grids vs unified 4-tab page; no classification override, no wage-type/role vocabulary |
| Shop · Packages / bundles | 42 | 6 | 11 | 2 | No `SubscriptionPackage` entity (sessions/validity/autoRenew); no distinct `hidden` flag; no bundle freebies |
| Finance · Earnings + wallet | 42 | 4 | 12 | 1 | No immutable charges ledger; no processing fee, refund-zone engine, carry-forward, or reconciling per-booking views |
| Shop · Customers + freeze | 46 | 1 | 11 | 1 | No classification/attribution engine; no Classifications tab, grace-window banner, invite, or booking-link card |
| Shop · Booking detail | 46 | 4 | 10 | 3 | No collect-to-complete gate, cancel/refund modal, no-show grace, configurable workflow, or finance timeline |
| Shop · Team / specialists | 46 | 6 | 9 | 3 | Shift/wage gaps vs demo team model |
| Logic · data model + selectors | 46 | 18 | 10 | 2 | No charges ledger / Invoice / TransferRequest entities; no transition FSM, classification, group, or freebies types |
| Admin · Marketing | 50 | 4 | 4 | 3 | No unified tabbed hub; no ad-campaign concept (placement/impressions/CTR), no push metrics |
| Admin · Shops | 51 | 8 | 14 | 2 | No 4-tab IA; no subscription-plans mgmt, subscription dashboard, grace window, deep link, or per-shop fee rate |
| Shop · Reschedule/reassign | 55 | 2 | 7 | 2 | No configurable `rescheduleStatuses` gate; no earliest/next-available scan, book-now pill, or group reschedule |
| Customer · Discover | 75 | 4 | 3 | 3 | No structured "Deals for you" feed (discountType/usageCap/expiry); no platform-wide deals |
| Shop · Bookings calendar | 76 | 8 | 2 | 9 | No customer notification on move; no group visuals; no business-day/overnight session folding; coarser drag/zoom UX |
| Admin · Bookings | 81 | 4 | 0 | 3 | No `in_progress` first-class status surfaced; no group/finance fields on list model |
| Shop · Time-off | 82 | 3 | 4 | 2 | No submit-disabled validity gate; no overnight `+1d` hint; no business-day remap; hard-reload vs optimistic insert |
| Shop · Marketing (deals/promo) | 83 | 2 | 1 | 3 | No usage progress bar / illustrated empty state; no platform-wide deals on shop portal |
| Onboarding / Auth | 60 | 7 | 3 | 2 | No single `nextOnboardingScreen()` router; no owner set-password / activate-pending states / strength meter |
| Logic · scheduling/availability | 61 | 2 | 2 | 6 | No business-day/overnight coordinate model; duration not derived from services; **cancelled bookings not excluded (bug)** |

## New in the dev demo (not in ours)

The dev demo ships an entire **finance and settlement domain** plus a **group-booking system** that have no counterpart on our side. Two stand out:

- **Group Bookings (Shop, M2) — flagged prominently.** A party = N child bookings sharing one `GRP-` `groupBookingId`, organiser as customer-of-record, per-child `guestLabel`. Includes `createGroupBooking` (atomic all-or-nothing validation, distinct specialist per guest, per-guest placement check), whole-party lifecycle (`rescheduleGroupBooking`, `cancelGroupBooking`, `collectGroupPayment`, `completeGroupBooking` with collect-to-complete gate), group selectors (`groupsForShop`, `summariseGroup` with partySize/value/outstanding/mixed status), a `NewGroupBookingModal` UI, a `GroupExpanded` drawer + action bar, and a unified Bookings table rendering solo + party rows with stacked avatars. Finance invariance contract: a group child derives identical charges to an equivalent standalone booking; a single card tip attaches to the first guest with a balance only. **Zero hits on our tree** — genuinely 0% implemented.

- **Admin · Finance — flagged prominently (NEW area).** A `ShopBalances` screen with a per-shop running-balance ledger (collectable earnings, outstanding fees, signed running balance); a typed append-only **charges ledger** (`net_from_settlement`, paid/unpaid/pending, chargeAmount+vatAmount) underpinning balances; carry-forward credit limit per-shop/global with auto-billing at threshold (`reconcileBilling`); held-earnings netting into invoice amount-due; a settle modal with FormulaStrip fee breakdown gated on both invoice + bank-confirmation document uploads, which auto-generates a `transfer_settlement` invoice and flips charges to paid.

Other notable new-in-demo items by area:

- **Finance · Earnings/wallet:** immutable charges ledger with rates stamped at creation; payment-processing/gateway fee (collected×rate%+fixed, VAT on top, non-refundable); customer-classification-gated marketing fee with minimum floor + grace waiver; refund-zone engine (`refundZoneFor`) + customerRefund rules; marketing-fee reversal as negative ledger rows; no-show CEO rule; carry-forward / negative running balance (shop can owe Navagoo); four reconciling per-booking views (revenue/feesIncurred/netEarnings/navagooPayout); SMS/WhatsApp + subscription charge types; FormulaStrip UI.
- **Logic · data model:** single typed charges ledger with reversal rows; Invoice + TransferRequest as first-class settlement entities; admin-editable booking-transition FSM (`allowedNextStatuses`/`canRescheduleStatus`/`canMarkNoShow`); `CustomerClassification` (navagoo_sourced vs shop_owned) gating marketing-fee scope; off-rail in-store cash/card collection; specialist card-tip liability; freebies + `ServiceBundle` catalogue types; shop-scope (closed-day) time-off.
- **Logic · scheduling:** business-day/overnight coordinate model (`businessDayOf` + `toBusinessMinutes`/`fromBusinessMinutes`) so overnight appointments plot on the prior session; booking duration derived from sum of service durations (end-time never stored); can-perform treats a service with no linked specialists as performable by anyone.
- **Shop · Settings:** unified 5-tab page; read-only Commercials tab (plan/status/billing, fee rates, VAT flag, min withdrawal, settlement hold); walk-in per-method payment toggles; notifications tab with per-message fee descriptions; per-shop 12h/24h time-format toggle.
- **Shop · Booking detail:** complete-with-outstanding-balance hard gate forcing in-store collect; cancel modal with cancelled-by selector + live refund preview + marketing-fee reversal; no-show grace window; admin-configurable workflow read from `GlobalConfig.bookingTransitions`; timeline nodes with real timestamps + finance sub-lines; collection/settlement chips; sourced-vs-owned + new/returning badges; per-row actions menu; payment detail rows.
- **Shop · Customers:** classification/attribution engine (priority walk-in > deep_link > freeze_list > app_first_booking) persisted immutably on first booking; Classifications tab; marketing-fee link to navagoo_sourced; admin override with audit; grace-window banner; booking-link card with QR + copy; invite (SMS/WhatsApp); segmented view switcher.
- **Shop · Services / Packages:** routines + free add-ons + bundles as first-class catalogue items; `SubscriptionPackage` (sessions/validityDays/per-session price/autoRenew/billingPeriod); active/hidden lifecycle distinct from archive; variants; live discount feedback; bilingual descriptions; modal-based CRUD.
- **Shop · Dashboard:** Net-Available withdrawable-balance KPI; costs-to-date donut (VAT-inclusive by Subscription/Marketing/Processing/Notifications); subscription banner with trial countdown + card last-4; per-booking SettlementBadge; deepLinkUrl with copy; header quick-actions + action cards.
- **Shop · Calendar:** customer notification fired on reschedule/reassign; rich reschedule+reassign confirm dialog; live cursor hover-slot + drag-preview snapping; per-status count cards doubling as legend; smooth zoom slider; group-booking visuals; true overnight session ownership.
- **Admin · Shops:** 4-tab IA; subscription-plans management (auto 10%/20% discount on 6mo/12mo); subscription dashboard; grace window blocking activate toggle; deep link + shopToken on create; per-shop marketingFeeRatePct + carryForwardThreshold; dedicated Requests queue.
- **Admin · Catalogue:** one-level group/child nesting (`parentId`); cascade-delete with services→uncategorised fallback; inline service + shop counts.
- **Admin · People:** unified 4-tab page; live bookings/shops counts; classification override with mandatory reason → auto re-derives marketing-fee charges; wage-type/title columns; owner/manager/admin/support role vocabulary.
- **Admin · Dashboard / Marketing / Settings / Support:** GMV/Earnings/Transfer/Refund KPIs + settlement queue + subscription watch; unified marketing hub with ad-campaign concept + push metrics; admin-editable workflow FSM + live color-theming editor + versioned policies; unified Support & content page with FAQ accordion + contact-channel cards.
- **Onboarding/Auth:** single `nextOnboardingScreen()` router; owner set-password screen; `activated_pending_auth` state + faux activation email; pending-review panel; rejected state; password-strength meter.
- **Customer · Discover:** structured "Deals for you" feed (discountType/value/cap/expiry); platform-wide deals (null shopId); shop summary aggregating service count + "from {minPrice}"; ready-made Women/Men/Unisex label.

## Implementation backlog (ordered)

Sorted by impact × proximity — foundational data-model work first (it unblocks the most downstream areas), then the highest-leverage surfaces.

1. **Finance — charges ledger + VAT/refund engine (foundation).** Build the immutable charges ledger (rates stamped at creation, reversal rows), processing-fee + marketing-fee + VAT math, refund-zone engine, and the four reconciling per-booking views. This is the substrate for admin-finance, shop-dashboard, and settlement. Read `docs/parity/finance-earnings-wallet/` and `docs/parity/logic-data-model/`.
2. **Logic — booking-transition FSM + customer classification.** Admin-editable `allowedNextStatuses`/`canRescheduleStatus`/`canMarkNoShow`, and the `CustomerClassification` engine (navagoo_sourced vs shop_owned) that gates the marketing fee. Unblocks booking-detail, reschedule, customers, admin-people. Read `docs/parity/logic-data-model/`.
3. **Logic — scheduling: cancelled-booking exclusion bug (fix first).** `statusesFilter()` includes CANCELED(5) and CANCELED_BY_SHOP(7), so cancelled rows still occupy the calendar and block placement. Correct the active-status set. Then add the business-day/overnight coordinate model and service-derived durations. Read `docs/parity/logic-schedule/`.
4. **Shop · Group bookings (M2).** Add `group_booking_id`/`guest_label` columns + migration; `createGroupBooking` with atomic validation; whole-party lifecycle (reschedule/cancel/collect/complete with collect-gate); group selectors; modal + drawer + unified table. Depends on the charges ledger (finance invariance contract). Read `docs/parity/shop-group-bookings/`.
5. **Admin · Finance (new area).** ShopBalances ledger screen, carry-forward/auto-billing, held-earnings netting, settle modal gated on document uploads that emits a `transfer_settlement` invoice. Depends on the charges ledger. Read `docs/parity/admin-finance/`.
6. **Shop · Booking detail + actions.** Collect-to-complete hard gate, cancel/refund modal with cancelled-by + refund preview, no-show grace window, finance-aware timeline, sourced/returning badges, per-row actions menu. Depends on FSM + finance. Read `docs/parity/shop-booking-detail/`.
7. **Shop · Dashboard finance surfaces.** Net-Available KPI, costs-to-date donut, subscription banner, per-booking SettlementBadge, deep-link card, action cards. Depends on finance + subscription models. Read `docs/parity/shop-dashboard/`.
8. **Shop · Customers directory upgrade.** Classifications tab, grace-window banner, booking-link/QR card, invite (SMS/WhatsApp), segmented switcher, admin override with audit. Depends on classification engine. Read `docs/parity/shop-customers/`.
9. **Shop · Services + Packages catalogue.** Routines/add-ons/bundles as first-class items, `SubscriptionPackage` entity, active/hidden lifecycle, variants, live discount feedback, bilingual descriptions. Read `docs/parity/shop-services/` and `docs/parity/shop-packages/`.
10. **Admin · Shops 4-tab IA + subscriptions.** Subscription-plans management, subscription dashboard, grace window, deep link/shopToken, per-shop fee-rate + carry-forward override, Requests queue. Read `docs/parity/admin-shops/`.
11. **Admin · Catalogue category tree.** Add `parent_id` (one-level group/child nesting), cascade-delete with services→uncategorised fallback, inline service/shop counts. Read `docs/parity/admin-catalogue/`.
12. **Shop · Calendar move-notification + reschedule scan.** Fire customer notification on reschedule/reassign, add confirm dialog; add earliest/next-available 56-day slot scan + book-now pill; configurable `rescheduleStatuses` gate. Read `docs/parity/shop-bookings-calendar/` and `docs/parity/shop-reschedule-slots/`.

## Area docs

| Area | Logic | UI | Business | Parity |
|---|---|---|---|---|
| Shop · GROUP bookings | [logic](shop-group-bookings/logic.md) | [ui](shop-group-bookings/ui.md) | [business](shop-group-bookings/business.md) | [parity](shop-group-bookings/parity.md) |
| Admin · Geography | [logic](admin-geography/logic.md) | [ui](admin-geography/ui.md) | [business](admin-geography/business.md) | [parity](admin-geography/parity.md) |
| Shop · Dashboard | [logic](shop-dashboard/logic.md) | [ui](shop-dashboard/ui.md) | [business](shop-dashboard/business.md) | [parity](shop-dashboard/parity.md) |
| Admin · Settings | [logic](admin-settings/logic.md) | [ui](admin-settings/ui.md) | [business](admin-settings/business.md) | [parity](admin-settings/parity.md) |
| Admin · Dashboard | [logic](admin-dashboard/logic.md) | [ui](admin-dashboard/ui.md) | [business](admin-dashboard/business.md) | [parity](admin-dashboard/parity.md) |
| Admin · Finance | [logic](admin-finance/logic.md) | [ui](admin-finance/ui.md) | [business](admin-finance/business.md) | [parity](admin-finance/parity.md) |
| Shop · Services catalogue | [logic](shop-services/logic.md) | [ui](shop-services/ui.md) | [business](shop-services/business.md) | [parity](shop-services/parity.md) |
| Admin · Catalogue | [logic](admin-catalogue/logic.md) | [ui](admin-catalogue/ui.md) | [business](admin-catalogue/business.md) | [parity](admin-catalogue/parity.md) |
| Admin · People | [logic](admin-people/logic.md) | [ui](admin-people/ui.md) | [business](admin-people/business.md) | [parity](admin-people/parity.md) |
| Shop · Packages / bundles | [logic](shop-packages/logic.md) | [ui](shop-packages/ui.md) | [business](shop-packages/business.md) | [parity](shop-packages/parity.md) |
| Finance · Earnings + wallet | [logic](finance-earnings-wallet/logic.md) | [ui](finance-earnings-wallet/ui.md) | [business](finance-earnings-wallet/business.md) | [parity](finance-earnings-wallet/parity.md) |
| Shop · Customers + freeze | [logic](shop-customers/logic.md) | [ui](shop-customers/ui.md) | [business](shop-customers/business.md) | [parity](shop-customers/parity.md) |
| Shop · Booking detail | [logic](shop-booking-detail/logic.md) | [ui](shop-booking-detail/ui.md) | [business](shop-booking-detail/business.md) | [parity](shop-booking-detail/parity.md) |
| Shop · Team / specialists | [logic](shop-team/logic.md) | [ui](shop-team/ui.md) | [business](shop-team/business.md) | [parity](shop-team/parity.md) |
| Logic · data model + selectors | [logic](logic-data-model/logic.md) | [ui](logic-data-model/ui.md) | [business](logic-data-model/business.md) | [parity](logic-data-model/parity.md) |
| Admin · Marketing | [logic](admin-marketing/logic.md) | [ui](admin-marketing/ui.md) | [business](admin-marketing/business.md) | [parity](admin-marketing/parity.md) |
| Admin · Shops | [logic](admin-shops/logic.md) | [ui](admin-shops/ui.md) | [business](admin-shops/business.md) | [parity](admin-shops/parity.md) |
| Shop · Reschedule/reassign | [logic](shop-reschedule-slots/logic.md) | [ui](shop-reschedule-slots/ui.md) | [business](shop-reschedule-slots/business.md) | [parity](shop-reschedule-slots/parity.md) |
| Customer · Discover | [logic](customer-discover/logic.md) | [ui](customer-discover/ui.md) | [business](customer-discover/business.md) | [parity](customer-discover/parity.md) |
| Shop · Bookings calendar | [logic](shop-bookings-calendar/logic.md) | [ui](shop-bookings-calendar/ui.md) | [business](shop-bookings-calendar/business.md) | [parity](shop-bookings-calendar/parity.md) |
| Admin · Bookings | [logic](admin-bookings/logic.md) | [ui](admin-bookings/ui.md) | [business](admin-bookings/business.md) | [parity](admin-bookings/parity.md) |
| Shop · Time-off | [logic](shop-time-off/logic.md) | [ui](shop-time-off/ui.md) | [business](shop-time-off/business.md) | [parity](shop-time-off/parity.md) |
| Shop · Marketing (deals/promo) | [logic](shop-marketing-promo/logic.md) | [ui](shop-marketing-promo/ui.md) | [business](shop-marketing-promo/business.md) | [parity](shop-marketing-promo/parity.md) |
| Onboarding / Auth | [logic](onboarding-auth/logic.md) | [ui](onboarding-auth/ui.md) | [business](onboarding-auth/business.md) | [parity](onboarding-auth/parity.md) |
| Logic · scheduling/availability | [logic](logic-schedule/logic.md) | [ui](logic-schedule/ui.md) | [business](logic-schedule/business.md) | [parity](logic-schedule/parity.md) |
