Architecture العربية

Qwizin — Consolidated Requirements Baseline

Status: Draft v0.1 · Date: 2026-07-20 · Tech Lead: Amir Haroun Purpose: Single distilled source of architectural truth extracted from the twelve source documents. Every downstream architecture document traces back to an identifier defined here.


1. Source Document Inventory#

ID Document Authority Role in this baseline
SRC-BRD Qwizin BRD V1.pdf (+ Arabic V1) Normative Primary scope, actors, roles matrix, constraints
SRC-MOM Minutes of meeting V01.0.pdf Normative BA analysis, MoSCoW, NFRs, RTM (REQ-01…06), risks
SRC-UFC Qwizin User Flow Chart.pdf Normative End-to-end actor journey
SRC-DECK HPHQWIZIN APP-1.pdf Directional Business model, Phase-2 roadmap, investor commitments
SRC-TRN Qwizin Training Portal.pdf Directional Training taxonomy and dashboard expectations
SRC-CNT Example SOP, Food Safety, HACCP Simplified, 3× audit .xlsx, corrective action form Reference Content specimens — the template library payload, not system specs

Architectural note on SRC-CNT: these six files are frequently mistaken for requirements. They are not. They are representative assets of the Templates module. Their structure matters for one reason only: the audit workbooks are structured, row-per-control checklists with compliance-status and responsible-person columns. That shape is a strong signal that "downloadable template" is a transitional MVP form of what will later become an interactive digital audit instrument. See SEAM-03.


2. Actors#

Six actor types. Note that SRC-BRD §7.1 and §11 enumerate six, while SRC-MOM §6 says "3 main account types (individuals, companies, service providers)". The BRD's six-actor model is taken as normative; the MoM's three is a simplification that omits Employee (a sub-type of Company), Consultant, and Admin.

ID Actor Self-registers? Approval-gated? Notes
ACT-IND Individual Yes No Immediate access on verification
ACT-CO Company (admin user) Yes Yes Legal documents → admin review
ACT-EMP Employee No — created by ACT-CO Inherits company state Cannot purchase, cannot see company financials
ACT-CON Consultant Yes Yes Sets pricing + availability
ACT-SP Service Provider Yes Yes Subscription-gated directory visibility
ACT-ADM Platform Administrator No N/A Multi-role admin (SRC-BRD §7.1)

ACT-EMP lifecycle dependency: an employee account cannot exist outside an approved company (SRC-BRD §12 constraint 10). This makes company suspension/rejection a cascading state change across all its employees, their in-flight assessments, and their issued certificates. This is a non-trivial state machine and is under-specified in all source documents → OQ-07.


3. Functional Capability Map#

Grouped into candidate modules. The MOD- identifiers become the building-block decomposition in the arc42 building block view.

Module Capabilities Source
MOD-IAM Registration (email / phone / Google), login, profile, role & permission model, session/token lifecycle BRD §7.1, MOM FR-5
MOD-ONB Legal document upload, admin review queue, approve / reject / resubmit workflow, account activation BRD §7.1, MOM FR-6 / REQ-02, UFC
MOD-CONS Consultant directory & profiles, specialties, pricing config, availability, booking, appointment state machine BRD §7.1/§10.4, MOM FR-1/FR-2
MOD-VID In-app video session lifecycle, join tokens, session events, (optional) recording MOM FR-1 / REQ-03
MOD-TPL Template catalogue, categories, free download, custom template request intake & fulfilment BRD §7.1, MOM FR-3 / REQ-04
MOD-LRN Learning content, company→employee assignment, progress tracking BRD §7.1, TRN
MOD-ASMT MCQ assessment delivery, auto-grading, configurable passing score, attempt history BRD §7.1, MOM FR-4 / REQ-05
MOD-CERT Automatic certificate generation, download, history, verification BRD §7.1, MOM REQ-05
MOD-MKT Supplier & service-provider directory, search/filter, featured listing ranking BRD §7.1, MOM REQ-06
MOD-PAY Consultation payment, custom-request payment, provider subscriptions, featured-listing purchase, payouts BRD §7.1/§9.3
MOD-ADM Approvals, content management, provider/consultant management, payment monitoring, reports, dashboard BRD §7.1, UFC
MOD-NOTIF Email, SMS, push notifications; appointment reminders BRD §13 deps 8/12/13, MOM "Could Have"

4. Explicitly Out of Scope (MVP)#

From SRC-BRD §7.2 and SRC-MOM §6/§14. Recorded because architecture must not foreclose these, and because §5 below shows two of them are contradicted elsewhere.

  • Full LMS: learning paths, virtual classrooms, homework, learning analytics
  • Video-based e-learning (explicitly deferred on cost grounds; MoM §11 constraint)
  • Inventory management, procurement, purchase orders, supplier contracts
  • ERP / accounting / CRM integration
  • Departments within companies (BRD §10.2 — "future enhancement")

5. ⚠ Contradictions and Defects in the Source Documents#

These require the architect's or sponsor's ruling. Each is a genuine blocker or risk, not a documentation nitpick.

CONF-01 — Training scope: BRD vs Training Portal deck#

SRC-BRD §7.2 and SRC-MOM §14 ("Won't Have") exclude video-based e-learning, learning paths, and learning analytics. SRC-TRN specifies videos as a learning method (p.12), practical assessments (p.4), a branch comparison dashboard, and overdue-course tracking (p.13). Impact: High. Video learning content changes storage, CDN, and transcoding architecture materially. Practical assessment implies a human-graded workflow that MCQ auto-grading does not cover. "Branch comparison" implies a company→branch hierarchy that the data model does not currently have (and BRD defers departments). Ruling needed: Is SRC-TRN MVP scope, Phase-2 vision, or aspirational content-team planning?

CONF-02 — Payment precedes consultant acceptance#

SRC-BRD §10.4 appointment workflow: (1) customer books → (2) customer pays → (3) consultant receives request → (4) consultant approves → (5) system confirms. Impact: High. Money is captured before the service is agreed. This mandates: authorization-hold-then-capture (or full escrow), automatic refund on consultant rejection, a booking-expiry timer for consultant non-response, and a dispute path. None of this appears in any source document. Ruling needed: Confirm hold-then-capture, define the consultant response SLA, and define refund policy. Interacts with OQ-01 (gateway must support holds and refunds).

CONF-03 — Roles & permissions matrix is internally inconsistent#

SRC-BRD §11 grants ACT-ADM "Book Consultation" and "Manage Availability", and grants ACT-SP "Access Learning", "Take Assessments", "Download Certificates". It also shows ACT-CON with "Upload Legal Documents" but the Employee column blank for profile management ("Limited"). Assessment: This reads as a column-alignment artifact from the PDF table rather than deliberate intent — the "Service Provider" and "Admin" columns appear merged in extraction. Impact: Critical — this table is the authoritative input to the authorization model. Building to a misaligned matrix produces real privilege bugs. Ruling needed: Re-issue §11 as a machine-checkable permission matrix. The architecture will define authorization from a corrected matrix; do not implement from the PDF as-is.

CONF-04 — Phase-2 commitments far exceed MVP#

SRC-DECK p.12 competitor matrix marks Qwizin "YES" on: reservations/table management, CRM & guest database, loyalty & vouchers, labour scheduling & payroll, inventory & procurement, POS/PMS integration, sentiment analytics, B2B supplier communication, omnichannel ordering, digital menu, and government integration. Impact: These are investor-facing commitments. They are not MVP, but they define where the architecture must leave extraction seams. Designing the MVP as though they do not exist is the single most likely cause of a Phase-2 rewrite. Ruling needed: None immediately — but this is why the modular-monolith boundaries in MOD-* are drawn where they are.

CONF-05 — Date inconsistencies#

SRC-BRD is dated 18/7/2026 and SRC-MOM 14/07/2026 (both consistent with today, 2026-07-20). SRC-DECK is dated July 2025 and shows an action plan of "Build & Test Sep 2025 → Launch April 2026 → Gov Jan 2027 → Phase 2 2028". Impact: Low architecturally, high for planning. The deck's timeline has already lapsed; the BRD/MoM represent the current programme. Treat SRC-DECK as business intent, not schedule.


6. Open Questions#

OQ-01OQ-03 were raised in SRC-MOM §15 and remain unanswered. OQ-04+ are raised by this analysis.

ID Question Source Blocking?
OQ-01 Which payment gateway? Must support mada, holds/captures, refunds, and marketplace payouts MOM §15 Yes — blocks MOD-PAY
OQ-02 Exact legal-document list for company/provider verification — CR only, or also municipal licence + food-safety certificate? MOM §15 Yes — blocks MOD-ONB data model
OQ-03 Do consultants self-manage availability dynamically in-app? MOM §15 Yes — blocks MOD-CONS scheduling design
OQ-04 Ruling on CONF-01 (training scope) This analysis Yes
OQ-05 Ruling on CONF-02 (payment/approval ordering + refund policy) This analysis Yes
OQ-06 Corrected roles & permissions matrix (CONF-03) This analysis Yes
OQ-07 Company suspension/rejection cascade: what happens to employees' in-flight assessments and already-issued certificates? This analysis Yes
OQ-08 Are consultations recorded? Drives storage, cost, consent, and PDPL obligations This analysis Yes — blocks MOD-VID sizing
OQ-09 Do certificates require third-party verifiability (QR → public verification endpoint)? They assert food-safety competence, which carries real-world weight This analysis Yes — blocks MOD-CERT
OQ-10 Does Qwizin hold funds and disburse to consultants/providers? If so, SAMA payment-institution licensing may be triggered This analysis Yes — potential legal blocker
OQ-11 Is ZATCA e-invoicing integration required for platform-issued invoices? This analysis Yes
OQ-12 Bilingual scope: is all content dual Arabic/English, or Arabic-primary with English fallback? This analysis Yes — affects data model + search
OQ-13 Company→branch hierarchy needed (implied by SRC-TRN branch comparison)? This analysis Medium

7. Architectural Seams (Phase-2 Extraction Points)#

Derived from CONF-04. These are the boundaries the MVP must respect so Phase 2 is additive rather than a rewrite.

ID Seam Rationale
SEAM-01 MOD-PAY isolated behind a payment port Gateway undecided (OQ-01); payouts may require licensing (OQ-10); billing complexity grows with subscriptions + marketplace
SEAM-02 MOD-VID isolated behind a provider port Vendor decision deferred by design; media is the most likely component to be replaced
SEAM-03 MOD-TPL documents modelled as structured entities, not opaque files Audit workbooks (SRC-CNT) are row-per-control data; the interactive-audit product is the obvious Phase-2 evolution
SEAM-04 MOD-LRN + MOD-ASMT separated LMS is the loudest deferred capability; if it grows, it grows fast
SEAM-05 MOD-MKT catalogue/search separated from directory CRUD Phase-2 adds B2B supplier communication, procurement, digital menu — all catalogue-adjacent
SEAM-06 Company/branch/employee hierarchy modelled with a level of indirection Departments deferred (BRD §10.2), branches implied (SRC-TRN); retrofitting hierarchy into a flat model is expensive
SEAM-07 Outbound integration adapter layer Phase-2 promises POS/PMS, government (SFDA/municipality), ERP/CRM — all external-system integrations

8. Constraints (Normative)#

ID Constraint Source
CON-01 Low-cost implementation; budget-sensitive BRD §12.1
CON-02 Prefer open-source technologies BRD §12.2, MOM NFR-3
CON-03 No full LMS in MVP BRD §12.3
CON-04 Approval required before Company / Consultant / Provider activation BRD §12.5
CON-05 Paid features depend on successful payment processing BRD §12.6
CON-06 Initial deployment targets Saudi Arabia only BRD §12.7
CON-07 Subscription packages configurable via Admin Panel BRD §12.8
CON-08 Assessment passing score configurable by Administrator BRD §12.9
CON-09 Employee accounts only under an approved Company BRD §12.10
CON-10 Uploaded legal documents must be secured MOM NFR-1
CON-11 Minimal UI steps for custom template requests (bounce-rate concern) MOM NFR-2
CON-12 Architecture must support GCC expansion without significant redesign BRD §3.7, §5.5

Architect-imposed constraints (this engagement)#

ID Constraint Rationale
CON-13 Data residency inside KSA PDPL posture + government-contract ambition (SRC-DECK)
CON-14 Laravel modular monolith + extracted sidecars Team size and budget vs CON-01; see ADR-0002
CON-15 Kubernetes as orchestration target Architect decision; see ADR-0003
CON-16 API-first backend, mobile-first client Product is app-led (SRC-DECK)

9. Traceability to the BA's RTM#

SRC-MOM defines six requirement IDs. Mapping to this baseline:

MoM REQ Description Priority Maps to
REQ-01 3 account types with type-specific fields at registration Must MOD-IAM, ACT-*
REQ-02 Provider verification-document upload; no directory listing until CR + tax card approved Must MOD-ONB, CON-04
REQ-03 In-app video calls, stable start-to-finish Must MOD-VID, SEAM-02
REQ-04 Free template download + simple customisation request Must MOD-TPL, CON-11
REQ-05 MCQ auto-grading + automatic downloadable PDF certificate Must MOD-ASMT, MOD-CERT
REQ-06 Supplier directory with advanced filters; Featured subscribers ranked top Should MOD-MKT

10. Success Metrics (from SRC-MOM §13)#

Recorded because they imply reporting/analytics data requirements on the architecture:

  • Monthly consultations booked and completed
  • Free templates downloaded and customised
  • % of employees passing assessments and receiving certificates
  • MRR from provider subscriptions and featured-listing packages

These four metrics are the minimum viable analytics surface. They require event capture in MOD-CONS, MOD-TPL, MOD-ASMT/MOD-CERT, and MOD-PAY respectively. Designing them in from the start is far cheaper than reconstructing them from transactional tables later.


Next Documents#

  1. 01-quality-attribute-scenarios.md — turns the NFRs above into measurable, architecture-driving scenarios
  2. arc42/ — the architecture description proper
  3. adr/ — decision records for every choice made here and downstream
Tech Lead · Amir Haroun Draft v0.1 · research & design only