Skip to main content
Version: Latest

15. References

Source Discovery Record (Shumoul.Saas.Api)

This documentation summarizes the following architecture record, located at docs/ARCHITECTURE/EINVOICING_DISCOVERY/ in the Shumoul.Saas.Api repository:

DocumentCovers
01-Framework-Overview.mdWhat the framework is, where it lives, key numbers
02-Architecture.mdLayer model, DI wiring, ApplicationPart mounting
03-Runtime-Flows.mdMermaid diagrams for every ZATCA lifecycle stage
04-Packages.mdProject/package inventory, dependencies, third-party libraries
05-Controllers.mdFull API surface — 3 controllers, 12 endpoints
06-Services.mdEvery service class, by responsibility
07-Background-Jobs.mdConfirmed: none exist
08-Notifications.mdConfirmed: none exist
09-Configuration.mdPlatform/tenant/secrets/certificates/env vars/feature flags
10-Security.mdPrivate key handling, signing chain, storage-at-rest, duplication
11-Dependencies.mdExternal subsystem coupling
12-Technical-Debt.mdDead code, duplication, packaging hygiene, architecture drift
13-Boundary-Analysis.mdFramework vs. ERP vs. Shared vs. Integration classification
14-Repository-Assessment.mdIs this a repo split candidate?
15-Recommendations.mdOptions for a future phase — not decided
16-Phase0.1-Security-Verification.mdIndependent verification of the ZATCA-auth and secrets-handling findings

All dated 2026-07-06.

  • Notification Framework — the platform's first Golden Reference module; referenced here for its retry-pipeline pattern (see Chapter 12 — Known Limitations).
  • Background Jobs Framework — the platform's second Golden Reference module; referenced here for its recurring-job runtime pattern, which E-Invoicing does not currently use.
  • WhatsApp Integration — referenced throughout this documentation as the comparison point for what an ERP-owned business integration layer and a formal ADR boundary decision look like (ADR-001), both of which E-Invoicing currently lacks.

External Standard

The framework implements ZATCA (Zakat, Tax and Customs Authority, Saudi Arabia) Fatoora Phase 2 electronic invoicing requirements: UBL 2.1 XML generation, XAdES/XML-DSig signing with ECDSA secp256k1, QR/TLV encoding, OTP-based Compliance/Production CSID onboarding, and clearance (B2B)/reporting (B2C) submission. No specific external URL is captured in the source discovery record for this documentation to cite; consult ZATCA's own published developer documentation directly for the authoritative specification.

Change History for This Framework

PhaseDateWhat happened
Phase 02026-07-06Read-only architecture discovery — no code changed
Phase 0.12026-07-06Independent verification of the ZATCA-authentication and secrets-handling findings — no code changed
Phase 0.22026-07-06Critical-fix pass: RestClient authentication attachment, secret-logging redaction, OTP-endpoint redaction, file-download path-traversal fix — package version bumped to 1.0.48
Developer Portal publication2026-07-06This documentation — no new discovery, architecture decision, or code change