Files
nur-falah-prevention/docs/architecture/benchmark-clio-stripe.html
T
wmj 14b34ad532 docs: add architecture visuals and RAMZ tenant isolation decision
Clio/Stripe competitive benchmark, moslem03/04 backend reality check,
and the moslem04 sync API spec, plus the resolved schema-per-tenant
isolation decision that unblocks Phase 2 of the sync spec.
2026-08-18 13:12:05 +08:00

446 lines
15 KiB
HTML

<title>Falah OS — Competitive Benchmark: Clio &amp; Stripe</title>
<style>
:root {
--bg: #f6f5ef;
--bg-panel: #ffffff;
--ink: #1b2420;
--ink-soft: #4d5951;
--line: #dbd9cd;
--line-strong: #b9b6a6;
--accent: #2f6e52;
--accent-soft: #e3ede7;
--steal: #2f6e52;
--steal-bg: #e3ede7;
--build: #a6432e;
--build-bg: #f6e6e1;
--gap: #9a7327;
--gap-bg: #f2e9d4;
--mono-tint: #f0efe6;
}
:root[data-theme="dark"] {
--bg: #141815;
--bg-panel: #1b201c;
--ink: #e9e7dd;
--ink-soft: #a9b0a7;
--line: #333a34;
--line-strong: #48524a;
--accent: #6bbf94;
--accent-soft: #212b24;
--steal: #6bbf94;
--steal-bg: #1d2b22;
--build: #e08268;
--build-bg: #2c1e1a;
--gap: #e3bd6a;
--gap-bg: #2b2416;
--mono-tint: #1f2420;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #141815;
--bg-panel: #1b201c;
--ink: #e9e7dd;
--ink-soft: #a9b0a7;
--line: #333a34;
--line-strong: #48524a;
--accent: #6bbf94;
--accent-soft: #212b24;
--steal: #6bbf94;
--steal-bg: #1d2b22;
--build: #e08268;
--build-bg: #2c1e1a;
--gap: #e3bd6a;
--gap-bg: #2b2416;
--mono-tint: #1f2420;
}
}
* { box-sizing: border-box; }
html, body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Source Serif Pro", serif;
}
body {
padding: clamp(1.5rem, 4vw, 4rem);
display: flex;
justify-content: center;
}
main {
width: 100%;
max-width: 920px;
display: flex;
flex-direction: column;
gap: clamp(2.5rem, 5vw, 3.5rem);
}
.masthead {
display: flex;
flex-direction: column;
gap: 0.6rem;
padding-bottom: 1.75rem;
border-bottom: 2px solid var(--ink);
}
.eyebrow {
font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.72rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--accent);
}
h1 {
margin: 0;
font-size: clamp(1.9rem, 4vw, 2.6rem);
font-weight: 600;
letter-spacing: -0.01em;
text-wrap: balance;
}
.dek {
margin: 0;
max-width: 62ch;
font-size: 1.02rem;
line-height: 1.55;
color: var(--ink-soft);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
section.bench {
display: flex;
flex-direction: column;
gap: 1.1rem;
}
.bench-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}
.bench-title {
display: flex;
align-items: baseline;
gap: 0.6rem;
}
.bench-title h2 {
margin: 0;
font-size: 1.4rem;
font-weight: 600;
}
.bench-title .vs {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.85rem;
color: var(--ink-soft);
}
.bench-note {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 0.82rem;
color: var(--ink-soft);
max-width: 40ch;
text-align: right;
line-height: 1.4;
}
.table-wrap {
overflow-x: auto;
border: 1px solid var(--line-strong);
border-radius: 3px;
background: var(--bg-panel);
}
table {
width: 100%;
min-width: 640px;
border-collapse: collapse;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
font-size: 0.88rem;
}
thead th {
text-align: left;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.68rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--ink-soft);
padding: 0.7rem 0.9rem;
border-bottom: 1px solid var(--line-strong);
background: var(--mono-tint);
}
tbody td {
padding: 0.75rem 0.9rem;
border-bottom: 1px solid var(--line);
vertical-align: top;
line-height: 1.45;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
td.area {
font-weight: 600;
white-space: nowrap;
color: var(--ink);
}
td.detail { color: var(--ink-soft); }
td.verdict { width: 15%; }
.chip {
display: inline-block;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.68rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
padding: 0.22rem 0.55rem;
border-radius: 3px;
white-space: nowrap;
}
.chip.steal { color: var(--steal); background: var(--steal-bg); }
.chip.build { color: var(--build); background: var(--build-bg); }
.chip.gap { color: var(--gap); background: var(--gap-bg); }
.legend {
display: flex;
gap: 1.4rem;
flex-wrap: wrap;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 0.78rem;
color: var(--ink-soft);
align-items: center;
}
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.synth {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
padding: 1.5rem;
border: 1px solid var(--line-strong);
border-radius: 3px;
background: var(--bg-panel);
}
@media (max-width: 640px) {
.synth { grid-template-columns: 1fr; }
}
.synth-col h3 {
margin: 0 0 0.85rem 0;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.72rem;
letter-spacing: 0.1em;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 0.5rem;
}
.synth-col.steal h3 { color: var(--steal); }
.synth-col.build h3 { color: var(--build); }
.synth ol {
margin: 0;
padding: 0 0 0 1.15rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 0.86rem;
line-height: 1.55;
color: var(--ink);
}
.synth ol li::marker {
font-family: ui-monospace, monospace;
color: var(--ink-soft);
}
.synth li + li { margin-top: 0.4rem; }
.divider {
grid-column: 1 / -1;
height: 1px;
background: var(--line);
display: none;
}
@media (max-width: 640px) {
.divider { display: block; }
}
footer {
padding-top: 1.5rem;
border-top: 1px solid var(--line);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 0.78rem;
color: var(--ink-soft);
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.5rem;
}
footer strong { color: var(--ink); }
</style>
<main>
<div class="masthead">
<span class="eyebrow">Falah OS — Nur Falah Admin Console</span>
<h1>Competitive benchmark: Clio &amp; Stripe Dashboard</h1>
<p class="dek">Two reference products mapped against EstateOS and the cross-tenant super-admin surface. Every row ends in a call: <strong style="color:var(--steal)">steal</strong> the pattern, <strong style="color:var(--build)">build</strong> it ourselves, or note it as a <strong style="color:var(--gap)">structural gap</strong> the reference product simply doesn't resolve.</p>
</div>
<section class="bench">
<div class="bench-head">
<div class="bench-title">
<h2>Clio</h2>
<span class="vs">vs. EstateOS</span>
</div>
<p class="bench-note">Legal practice management — case files, billing, client portal, co-counsel collaboration.</p>
</div>
<div class="table-wrap">
<table>
<thead>
<tr><th>Feature area</th><th>What Clio does</th><th>Verdict for EstateOS</th></tr>
</thead>
<tbody>
<tr>
<td class="area">Intake → billing</td>
<td class="detail">Clio Grow captures leads via custom forms, hands off to Clio Manage automatically once a matter opens.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Document automation</td>
<td class="detail">Template library with variable-filled document generation, version control.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Billing &amp; invoicing</td>
<td class="detail">Timers, hourly/contingency billing, AI-drafted invoices with error flagging.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Trust accounting</td>
<td class="detail">Client trust ledgers, deposit/disbursement tracking, compliance reporting.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Client portal</td>
<td class="detail">Encrypted messaging, document sharing, payments — but single-brand, one firm per instance.</td>
<td class="verdict"><span class="chip steal">Steal UX</span></td>
</tr>
<tr>
<td class="area">Faraid / Syariah workflows</td>
<td class="detail">No inheritance-share calculation, no Syariah Court filing templates — generic common-law matter types only.</td>
<td class="verdict"><span class="chip build">Build</span></td>
</tr>
<tr>
<td class="area">Panel-lawyer vetting</td>
<td class="detail">"Clio for Co-Counsel" assumes counsel is already chosen — it's a collaboration portal, not a credentialing tool.</td>
<td class="verdict"><span class="chip build">Build</span></td>
</tr>
<tr>
<td class="area">Per-tenant branding</td>
<td class="detail">Client portal is single-brand per firm — no white-label capability for a platform serving multiple firms.</td>
<td class="verdict"><span class="chip build">Build</span></td>
</tr>
<tr>
<td class="area">Multi-tenant backend</td>
<td class="detail">Clio is one firm, one instance — no shared-backend, multi-firm architecture exists to compare against.</td>
<td class="verdict"><span class="chip gap">Structural gap</span></td>
</tr>
<tr>
<td class="area">RAMZ row-level access</td>
<td class="detail">Firm-scoped permissions throughout — no concept of row-level, cross-tenant gating.</td>
<td class="verdict"><span class="chip gap">Structural gap</span></td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="bench">
<div class="bench-head">
<div class="bench-title">
<h2>Stripe Dashboard</h2>
<span class="vs">vs. Falah OS super-admin</span>
</div>
<p class="bench-note">Connect platform admin — connected-account management, roles, audit, API access.</p>
</div>
<div class="table-wrap">
<table>
<thead>
<tr><th>Feature area</th><th>What Stripe does</th><th>Verdict for Falah OS</th></tr>
</thead>
<tbody>
<tr>
<td class="area">Admin role tiers</td>
<td class="detail">Admin vs. Super Administrator — Super Admin gates who can grant/revoke roles and manage environments.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Audit logging</td>
<td class="detail">Activity Logs API — exportable, SOC 2/PCI-ready record of key changes, invitations, role changes.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">API key scoping</td>
<td class="detail">Restricted keys limited to specific permission sets per integration.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Tenant status view</td>
<td class="detail">Connected-account list with onboarding and risk status at a glance.</td>
<td class="verdict"><span class="chip steal">Steal UX</span></td>
</tr>
<tr>
<td class="area">Onboarding flow</td>
<td class="detail">Hosted or embedded onboarding, incremental — collects only what's currently required.</td>
<td class="verdict"><span class="chip steal">Steal</span></td>
</tr>
<tr>
<td class="area">Cross-regime compliance routing</td>
<td class="detail">No concept of routing tenants through different regulatory rule sets (Syariah Court vs. JKPTG vs. govt case routing).</td>
<td class="verdict"><span class="chip build">Build</span></td>
</tr>
<tr>
<td class="area">Usage / billing-trigger events</td>
<td class="detail">Activity Logs are security-focused, not usage-metering. Stripe's actual metering product wasn't covered — separate follow-up needed.</td>
<td class="verdict"><span class="chip build">Build / unclear</span></td>
</tr>
<tr>
<td class="area">Tenant = product line</td>
<td class="detail">Every connected account is a roughly uniform merchant entity — no support for managing distinct SaaS products per tenant.</td>
<td class="verdict"><span class="chip gap">Structural gap</span></td>
</tr>
<tr>
<td class="area">RAMZ row-level access</td>
<td class="detail">Isolation happens at the account level (own object graph per tenant) — closer to separate-DB than row-level gating.</td>
<td class="verdict"><span class="chip gap">Structural gap</span></td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="legend">
<span><span class="chip steal">Steal</span> pattern transfers directly</span>
<span><span class="chip build">Build</span> reference has nothing comparable</span>
<span><span class="chip gap">Structural gap</span> reference's whole model doesn't apply</span>
</div>
<section class="synth">
<div class="synth-col steal">
<h3>Combined — steal list</h3>
<ol>
<li>Intake → billing handoff (Clio Grow → Manage)</li>
<li>Document automation + template library</li>
<li>Trust ledger compliance reporting</li>
<li>Two-tier Admin / Super Admin roles</li>
<li>Exportable audit log, scoped API keys</li>
</ol>
</div>
<div class="divider"></div>
<div class="synth-col build">
<h3>Combined — build list</h3>
<ol>
<li>Faraid inheritance calculation engine</li>
<li>Panel-lawyer vetting / credentialing</li>
<li>Per-tenant white-labeled portal branding</li>
<li>RAMZ row-level, shared-schema isolation</li>
<li>Cross-regime compliance routing (Syariah / JKPTG / govt)</li>
</ol>
</div>
</section>
<footer>
<span>Sources: clio.com, docs.stripe.com, support.stripe.com — full citations in the prior research turns.</span>
<span><strong>Open:</strong> Core Ledger billing-event readiness still unconfirmed against Stripe's metering product.</span>
</footer>
</main>