# DeliverUs Feature Completion Matrix

**Assessment date:** 2026-07-28  
**Scope:** Backend API and web frontends only.

**Status values used:**
- **Confirmed complete** — UI, API, backend, and authorization evidence align; no known gaps in code
- **Partially implemented** — Core exists but gaps, placeholders, or known issues remain
- **Present but unverified** — Code exists; end-to-end behavior not confirmed without runtime testing
- **Missing** — Not found in assessed scope
- **Requires runtime testing** — Cannot confirm from static inspection alone

---

| Area | Feature | Backend | Admin Frontend | Store Frontend | Landing Frontend | Tests | Status | Evidence | Notes |
|------|---------|---------|----------------|----------------|------------------|-------|--------|----------|-------|
| Auth | Admin email/password login | Yes | Yes | — | — | No | Present but unverified | `authentication` module; admin `login-form.tsx` `role: ADMIN` | Requires runtime testing |
| Auth | Vendor login + OTP | Yes | — | Yes | — | No | Present but unverified | Store `login-form.tsx`; OTP page `otp/[storeId]` | OTP redirect on 412 |
| Auth | Customer OTP login | Yes | — | — | — | Partial | Present but unverified | `otp.authentication.controller.ts`; e2e spec uses OTP 1234 | E2E requires live server |
| Auth | Password reset | Yes | Yes | Yes | — | No | Present but unverified | `/authentication/forget-password`, reset flows | — |
| Auth | Registration (store) | Yes | — | — | Yes | No | Present but unverified | Landing `RegisterStoreFormSection.tsx` POST `/store` | Creates real backend record |
| Auth | Registration (delivery) | Yes | — | — | Yes | No | Present but unverified | Landing `DliveryForm.tsx` POST `/delivery` | — |
| Users | Customer management | Yes | Yes | — | — | No | Partially implemented | Admin `users/customer/*` routes; `customer.controller.ts` | Full CRUD present; runtime unverified |
| Users | Delivery management | Yes | Yes | — | — | No | Partially implemented | Admin `users/delivery/*`; `delivery.controller.ts` | — |
| Users | Employee management | Yes | Yes | Yes | — | No | Partially implemented | Admin + store employee routes | — |
| Roles | Roles and permissions | Yes | Yes | Yes | — | No | Partially implemented | `authorization` module; sidebars filter by permissions | Store has commented permission bypass in `canUserAccessModule.ts` line 13 |
| Stores | Store CRUD | Yes | Yes | Yes | — | No | Partially implemented | `store.controller.ts`; admin module routes | — |
| Stores | Store approval / verification | Yes | Partial | — | Yes | No | Partially implemented | Landing OTP verify; `store/verify` | Admin approval flow present but unverified |
| Branches | Branch management | Yes | Partial | Yes | — | No | Partially implemented | `branch.controller.ts`; store `/branch` route | Branches are `Store` rows with `mainStoreId` |
| Branches | Order from branch (not main store) | Yes | — | — | — | No | Partially implemented | `order.helper.service.ts` product/store validation | Main-store order bug documented in `STAGING.md` |
| Categories | Category management | Yes | Yes | Yes | — | No | Partially implemented | `category.controller.ts`; admin/store category routes | — |
| Products | Product CRUD | Yes | Yes | Yes | — | No | Partially implemented | `product.controller.ts`; extensive UI routes | — |
| Products | Variants / addons | Yes | Yes | Yes | — | No | Partially implemented | `variation.controller.ts`, `addons.controller.ts` | Addons stored as text IDs on product in schema |
| Inventory | Stock tracking | Partial | Partial | Partial | — | No | Partially implemented | Product availability flags in schema | No dedicated inventory ledger found |
| Cart | Shopping cart | Yes | — | — | — | No | Present but unverified | `cart.controller.ts`, `Cart` model | No web cart UI in assessed frontends |
| Orders | Order creation | Yes | — | Yes | — | Partial | Partially implemented | `order.controller.ts` POST `/`; store order pages | E2E test exists but environment-dependent |
| Orders | Order status updates | Yes | Yes | Yes | — | No | Partially implemented | `order.controller.ts` PATCH; store order detail | Multi-role status machine |
| Orders | Shipping calculation | Yes | — | Partial | — | No | Present but unverified | POST `/order/calculate-shipping` | — |
| Orders | Cancellation | Yes | Yes | Yes | — | No | Partially implemented | PATCH `/:id/cancel`; cancel reasons submodule | — |
| Orders | Refunds | Yes | Partial | — | — | No | Partially implemented | `refund.controller.ts`; refund reasons | Full refund execution **Requires runtime testing** |
| Coupons | Coupon management | Yes | Yes | Yes | — | No | Partially implemented | `coupon.controller.ts`; marketing routes | Backend validates coupons on order create |
| Promotions | Campaigns / banners / cashback | Yes | Yes | Yes | — | No | Partially implemented | `promotion` submodules; admin/store routes | Some admin nav items commented out |
| Payments | Moyasar payment confirmation | Yes | — | — | Yes | No | Partially implemented | `order.controller.ts` POST `/:id/payment`; landing callback | Stripe in package.json unused |
| Payments | Store subscription payment (landing) | Yes | — | — | Yes | No | Present but unverified | `store-payment/callback` → `/store/{id}/payment` | Moyasar SDK in landing |
| Refunds | Refund processing | Partial | Partial | — | — | No | Requires runtime testing | Refund reasons CRUD; wallet refund settings | End-to-end refund flow not verified |
| Wallets | Customer wallet | Yes | Yes | — | — | No | Partially implemented | `wallet.controller.ts`; admin wallet reports | **Critical:** unauthenticated add-fund endpoint |
| Wallets | Store / delivery wallet | Yes | Yes | Yes | — | No | Partially implemented | `order/service/wallet.service.ts`; store wallet pages | Commission logic on order completion |
| Withdrawals | Withdrawal requests | Yes | Yes | Yes | — | No | Partially implemented | `withdraw.controller.ts`; store `/withdraw` | Approval triggers Moyasar payout |
| Drivers | Driver management | Yes | Yes | — | — | No | Partially implemented | `delivery.controller.ts`; admin delivery routes | — |
| Delivery | Order assignment | Yes | Yes | Partial | — | No | Partially implemented | POST `/order/assign`; admin dispatch | Appears manual assignment |
| Delivery | Location tracking | Yes | Partial | — | — | No | Present but unverified | `location.gateway.ts`; admin `deliveryMap` | WebSocket auth via JWT |
| Notifications | Push / email / SMS | Yes | Partial | Partial | — | No | Partially implemented | `channel.service.ts`, Firebase, email, SMS services | Unauthenticated push endpoint risk |
| Chat | Realtime chat | Yes | Yes | Yes | — | No | Present but unverified | `chat.gatway.ts`, `/chat` REST; chat pages | In-memory connections |
| Reviews | Product/store reviews | Yes | Yes | Yes | — | No | Partially implemented | `review.controller.ts`; review routes | Schema lacks product FK on Review |
| Reports | Admin reports | Yes | Yes | — | — | No | Partially implemented | Wise reports, transaction reports, statistics endpoints | — |
| Reports | Store reports | Yes | — | Yes | — | No | Partially implemented | Store expense/disbursement routes | Dashboard yearly stats commented out |
| Settings | Business settings | Yes | Yes | Partial | — | No | Partially implemented | `settings.controller.ts`; admin settings routes | Extensive settings keys in config |
| Registration | Public store registration | Yes | — | — | Yes | No | Present but unverified | Landing register-store flow | — |
| Onboarding | Store payment + prefix selection | Yes | — | — | Yes | No | Present but unverified | `prefix`, `store-payment` routes | — |
| Localization | i18n | Yes | Yes (ar/en/pl) | Yes (ar/en) | Yes (ar/en) | No | Confirmed complete | next-intl middleware; nestjs-i18n backend | Locales differ per app |
| POS | Point of sale | Partial | Missing UI | Missing UI | — | No | Missing | Admin/store POS pages empty or placeholder | Backend may have POS paths in PlanGuard |
| Flash sales | Flash sales module | Unknown | Missing UI | — | — | No | Missing | Admin `flash-sales/page.tsx` empty div | — |
| Store dashboard (additional app) | Merchant dashboard | — | — | — | — | No | Missing | `base-dashboard` mock data only | Abandoned scaffold |

---

## Summary by Status

| Status | Count (approx.) |
|--------|-----------------|
| Confirmed complete | 1 (localization infrastructure) |
| Partially implemented | Majority of business features |
| Present but unverified | Auth flows, payments, chat, delivery tracking |
| Missing | POS UI, flash sales UI, web cart UI, functional store dashboard app |
| Requires runtime testing | Refunds, payouts, webhooks, full order lifecycle |

---

## Key Gaps

1. **Financial endpoints** have critical security gaps despite otherwise complete-looking wallet/withdraw modules.
2. **Web cart** exists in backend but no assessed web frontend implements customer ordering.
3. **POS and flash sales** appear in navigation or guards but UI is not built.
4. **Store dashboard** (`base-dashboard`) should not be counted as a deliverable merchant application.
5. **Customer-facing ordering** may depend on mobile apps (out of scope) — web scope alone is incomplete for end-customer commerce.
