Master Product Brief (Lean PRD++)
Product: BayanCore ERP Document Owner: Product Team Status: Draft / Requesting Feedback
1. Market Requirements Document (MRD)
1.1. Market Landscape (The Saudi ERP Gap)
The Saudi Arabian SME and Mid-Market segments are undergoing massive digital transformation, driven by Vision 2030 and strict regulatory mandates (ZATCA Phase 2, PDPL, GOSI). However, the current ERP landscape is fractured. Businesses are forced to choose between legacy, clunky monolithic systems that require expensive consultants, or fragmented point-solutions that do not speak to each other. There is a distinct gap for a "Saudi-native business operating system" that offers enterprise-grade reliability with a consumer-grade, modern UX.
1.2. Competitor Analysis
- Tier 1 Legacy (SAP, Oracle): Extremely powerful, but overwhelmingly complex, prohibitively expensive for SMEs, and slow to implement.
- Global Modular ERPs (e.g., Odoo): Offers wide flexibility and modularity, but requires significant technical expertise, lengthy implementation timelines, and custom configuration for full Saudi compliance, often leading to budget overruns.
- Local/Regional Cloud ERPs (e.g., Daftra, Smash, HAL ERP): Good for basic retail/trading and out-of-the-box compliance, but often lack the deep customization required for complex or growing businesses.
- ERPNext Custom Dev Shops: Highly fragmented market. They deliver raw ERPNext with the default "Form-and-Table" UI, which suffers from poor UX and overwhelming navigation for the end-user.
1.3. Target Personas
Note: These personas represent users across all types of businesses and SMEs.
- The SME Owner / Founder: Needs high-level visibility (runway, cash flow, project margins) without getting bogged down in accounting jargon. Values speed and modern design.
- The Fractional CFO / Finance Lead: Needs a single source of truth for operations, strict GL control, and audit readiness.
- The Operations / Project Manager: Needs to track time, materials, and contracting milestones to ensure project profitability.
- The Accountant / HR Admin: Needs fast reconciliation workflows, automated GOSI payroll, and zero-friction ZATCA compliance.
1.4. Core Pain Points
- Compliance and Localization Complexity: Keeping up with ZATCA Phase 2 cryptographic stamping, WPS (Wage Protection System), and PDPL data residency is a massive operational burden. Furthermore, standard systems often struggle with native Arabic language support, Hijri calendar integration, and accurate Saudization tracking.
- Poor UX (Software Bloat): Users are overwhelmed by traditional ERP interfaces that expose hundreds of irrelevant sub-modules and links.
- Lack of Automation: Manual data entry for invoices, disconnected HR and Finance systems, and lack of proactive compliance alerts (e.g., expiring Iqamas/CRs).
2. Business Requirements Document (BRD)
2.1. Business Model
The BayanCore ERP product monetizes through a multi-tiered approach:
- SaaS Subscriptions: Tiered monthly/annual subscription plans (e.g., Basic, Pro, Enterprise) covering the core modules.
- Module Add-ons: Charging extra subscription or one-off fees for activating additional ERPNext modules beyond the necessary core scope.
- Implementation Fees: Upfront charges for system setup, data migration, and training.
2.2. ROI Hypothesis for Customers
By adopting BayanCore ERP, Saudi businesses will achieve "Zero-Touch Operations," drastically reducing administrative headcount costs. The platform guarantees strict ZATCA/GOSI compliance (eliminating regulatory fines) and accelerates the Accounts Receivable cycle for lumpy contracting milestones through automated follow-ups and unified project accounting.
2.3. Revenue & Go-To-Market (GTM) Strategy
- Target Market: Saudi SMEs scaling into mid-market, specifically those with diverse revenue streams (tech + services/contracting).
- GTM Approach: Position BayanCore as the only ERP that combines the power of Frappe/ERPNext with a proprietary, premium "Liquid Glass" frontend explicitly tailored for KSA regulations.
2.4. Success Metrics (Subject to Change - Pending North Star Definition)
- ZATCA Adoption Rate: % of clients successfully utilizing the automated Fatoora Phase 2 clearance.
- Time-to-Live: Reduction in average implementation time (Target: < 4 hours for basic compliant deployment via Docker).
- Daily Active Users (DAU): High user engagement driven by the simplified "Progressive Disclosure" UX.
3. Product Requirements Document (PRD)
3.1. MVP Scope
For the initial launch, we will focus exclusively on reskinning and optimizing the core modules that matter most to our target personas:
- Core Financials & Accounting: GL, Accounts Payable, Accounts Receivable, Bank Reconciliation.
- Sales & Invoicing (ZATCA): Quotations, Sales Orders, and ZATCA Phase 2 compliant e-invoicing.
- HRMS (Saudi Localized): Employee onboarding, Leave management, GOSI tracking, and WPS payroll generation.
3.2. Core Features & Differentiators
- The "Liquid Glass" UI: A modern headless frontend built with Next.js, shadcn/ui, and Tailwind CSS that connects to the ERPNext backend via API, replacing the default ERPNext Desk with a premium, translucent, interaction-driven workspace.
- Progressive Disclosure Workspaces: Role-Based Access Control (RBAC) that aggressively hides 80% of unused ERP modules, ensuring users only see the specific links they need for their jobs.
- Autonomic Compliance Engine & AI Workflows: To ensure compliance with Saudi PDPL, all AI processing relies on localized, strictly rule-based or private cloud models. Key AI-native features include:
- "Zero-Touch" Accounts Payable (AI OCR): Localized AI vision models automatically extract Vendor Name, VAT Number, Date, and Amount from uploaded PDF receipts, instantly auto-drafting Purchase Invoices.
- ZATCA Error Resolution Assistant: When the ZATCA API rejects an invoice due to formatting, the AI translates cryptic JSON errors into plain-English instructions (e.g., "Buyer's building number is missing").
- Predictive HR Compliance: The system tracks Iqama and contract expirations, autonomously drafting renewal paperwork and sending approval requests to HR 30 days in advance.
3.3. Core User Stories
1. "Zero-Touch" ZATCA Invoicing
- As an Accountant,
- I want to save a sales invoice and have it automatically cleared by ZATCA,
- So that I don't have to manually upload XML files to the portal and risk non-compliance penalties.
- Acceptance Criteria:
- Given I have filled out all mandatory invoice fields, When I click "Submit", Then the system generates the XML, retrieves a cryptographic stamp from ZATCA in the background, and attaches the cleared PDF to the invoice record.
- Given I am missing a required field (e.g., buyer's building number), When I click "Submit", Then the AI Error Resolution Assistant highlights the specific missing field in plain English so I can fix it immediately.
2. Automated Accounts Payable (AI OCR)
- As a Finance Manager,
- I want to upload a PDF receipt or vendor invoice into the system,
- So that it automatically extracts the data and drafts a Purchase Invoice, saving me hours of manual data entry.
- Acceptance Criteria:
- Given I upload a standard Arabic/English PDF vendor invoice, When the upload completes, Then the localized AI model populates the Vendor Name, VAT Number, Date, and Amount into a Draft Purchase Invoice within 10 seconds.
3. Automated HR Payroll & WPS
- As an HR Administrator,
- I want to run the monthly payroll with a single click,
- So that the system automatically calculates GOSI deductions and generates the required SIF file for the Wage Protection System (WPS).
- Acceptance Criteria:
- Given all employee attendance is logged for the month, When I click "Process Payroll", Then the system calculates salaries, deducts GOSI, accrues End of Service Benefits (EOSB), and produces a downloadable SIF file correctly formatted for Saudi banks.
3.4. Global Constraints & Non-Functional Requirements (NFRs)
Since feature-specific acceptance criteria are defined within the Core User Stories, the following represent the overarching technical and regulatory constraints for the MVP:
- Data Residency (PDPL): The system must be fully deployable on Oracle Cloud Infrastructure (OCI) in Jeddah/Riyadh, ensuring no financial or AI-processed data leaves the Kingdom.
- Localization: The UI must provide native, flawless RTL (Right-to-Left) Arabic support and Hijri calendar integration without breaking the Next.js/shadcn frontend.
- Architectural Boundary: No core
erpnextorfrappeframework files may be modified. All custom business logic and API endpoints must reside exclusively within the isolatedbayancore_erpFrappe app. - Compliance Certification: The system must successfully pass the relevant ZATCA Fatoora Phase 2 simulation portal tests before production release.