State machine enforcement
9 states, 18 valid transitions. Invalid moves rejected at the API and at the database trigger.
Seven stages, durable in Temporal, locale-aware everywhere. The same workflow runs in Arabic for Riyadh, Persian for Tehran, and English for New York — without forking the code.
The onboarding context owns the application aggregate end-to-end. From the moment an advisor or client kicks off an application, a Temporal onboardingWorkflow takes ownership of state. The workflow waits for signals at each stage — KYC verified, suitability scored, documents uploaded, e-signature captured, compliance approved — and resumes exactly where it left off after restarts, deploys, or operator intervention.
Every transition writes an audit event. Every event is locale-aware: timestamps render in the actor’s calendar, names use the actor’s script, signatures are captured with the actor’s preferred numbering. The same application can be inspected by an English-speaking compliance officer and a Persian-speaking advisor without anything translating in flight.
The 9-state machine — started → collecting_info → kyc_in_progress → suitability → document_collection → awaiting_signature → compliance_review → approved/rejected/withdrawn — is enforced at the database level. Invalid transitions are not just rejected; they are impossible.
If your KYC vendor changes (Onfido today, Sumsub tomorrow), only the adapter changes. The workflow, the questionnaires, the audit chain, and the locale handling stay exactly the same.
9 states, 18 valid transitions. Invalid moves rejected at the API and at the database trigger.
Per-jurisdiction questionnaire JSON. SA, IR, US, GB, AE shipped. Add jurisdictions with a JSON file.
Adapter pattern. Onfido, Sumsub, Persona drop-ins planned. Local KYC providers welcome.
Carbone templates render in the client's locale; DocuSeal handles e-signature; envelopes are auditable.
OPA suitability and AML policies run automatically; cases open on red flags; supervisor approval required.
Every transition writes an audit event; every event is hash-chained; full timeline visible to advisor and compliance.
Individual, joint, corporate, trust, foundation. Beneficial-owner walks for entity types with PEP screening.
AI drafts a suitability narrative for compliance review. Always approval-gated. Human signs, audit logs the human.
Q1. What is your investable net worth, excluding primary residence?
Q2. Have you traded options or futures in the past 24 months?
س١. ما هي قيمة صافي ثروتك القابلة للاستثمار، باستثناء المسكن الرئيسي؟
س٢. هل سبق وأن تداولت في الصكوك أو السلع المتوافقة مع الشريعة؟
س۱. ارزش خالص دارایی قابل سرمایهگذاری شما، به استثنای مسکن اصلی، چقدر است؟
س۲. آیا در ۲۴ ماه گذشته در بورس کالا یا فارابی معامله کردهاید؟
| From | Signal | To | Side effects |
|---|---|---|---|
| collecting_info | infoSubmitted | kyc_in_progress | KYC vendor activity dispatched; idempotency key recorded. |
| kyc_in_progress | kycComplete | suitability | Suitability questionnaire materialized for jurisdiction. |
| kyc_in_progress | kycFailed | rejected | Compliance case opened with severity high; advisor notified. |
| suitability | suitabilityComplete | document_collection | Account agreement and disclosure templates generated. |
| document_collection | documentsReceived | awaiting_signature | DocuSeal envelope created and dispatched. |
| awaiting_signature | signaturesComplete | compliance_review | Compliance reviewer queue updated. |
| compliance_review | complianceApproved | approved | Account provisioned, advisor assigned, OpenFGA tuples written. |
| compliance_review | complianceRejected | rejected | Reason captured; client notified; audit event linked. |
| any | withdraw | withdrawn | Workflow cancelled; partial documents retained per retention policy. |
The client portal is responsive down to 375px. The wizard pages keep one focal action per step, the e-signature integration uses DocuSeal’s mobile flow, and document upload uses the device camera with on-device cropping. Saving and resuming works because the workflow is durable in Temporal — close the tab, walk away, come back tomorrow.
For the advisor, the mobile view is read-mostly: dashboards, today’s meetings, pending approvals. Order entry and policy edits are kept to the desktop, where mistakes are easier to avoid.
Onboarding's last stage is a compliance review. The case management here keeps the audit trail intact.
FeatureCarbone-rendered account agreements; DocuSeal envelopes; locale-aware date and currency formatting.
FeatureThe same workflow in six locales with three calendars. RTL by design, not retrofit.
One hour. Bring a sample KYC, a sample suitability questionnaire, and a sample account agreement. We'll show you exactly how each lands in Modir.