Skip to main content
INDEPENDENT RESEARCH · PLATFORM · PORTALS · EVENTSTier 2 Architecture

A CRM-Backed Portal That Reads From the Edge

“CRMs are fine databases and poor web servers - so stop serving the web from them directly.”

Pattern study: keep the CRM authoritative, serve browsing from cache, and let change events do the invalidation.

PORTALSCHANGE EVENTSNEXT.JSAPI GATEWAY

Executive BriefPlatform
Domain / ScopePlatform Architecture
Architectural RoleIndependent Architect
Timeline & InitiativeIndependent research · 2025–2026
Key Verified Invariant

Fixture portal browses from edge with record reads reserved for writes and misses

01 · The Constraint

What Made the Problem Difficult

Independent work, fixtures only. Legacy portal stacks often read record data per page view, which couples browsing latency to record-API budgets. I modeled the decoupled alternative to see how much machinery it really takes.

Core Platform Constraint

Systemic Friction

Per-view record reads exhaust API allowances at peak and still feel slow on mobile. The portal inherits the record system's release and maintenance windows whether users like it or not.

Boundary Invariants & Operational Limits:
  • !Record system stays the sole authority in the study model
  • !Browsing must survive record-API budgets and stay fast on mobile
  • !Writes stay atomic across related fixture entities
  • !Staleness windows are explicit and visible, never silent
02 · The Architecture

What System Was Designed

Next.js at the edge, a thin caching gateway, and async invalidation. Change events on fixture entities evict affected cache entries; the gateway validates event signatures before acting. Mutations travel as composite payloads; the UI applies them optimistically and reconciles on confirmation.

03 · The Key Decision

Pivotal Architectural Choices

Key Architectural Decisions

ADR // 01DETERMINISTIC CHOICE

Edge cache with event invalidation

Context:

Per-view record reads burn budget for unchanged data.

Alternatives Evaluated:
  • Direct record reads per visitor
  • Nightly batch exports
Chosen: Edge caching invalidated by change events.

Browsing stops costing record-API calls while staying close to fresh.

ADR // 02DETERMINISTIC CHOICE

Composite mutations for related writes

Context:

Multi-entity workflows split across calls fail partially.

Alternatives Evaluated:
  • Sequential single-entity calls
  • Bespoke server endpoints per flow
Chosen: One composite payload per workflow.

Atomicity plus fewer calls - the two wins come together.

04 · The Engineering

What Was Actually Built

01

Defined fixture change streams for representative entities with signed invalidation webhooks.

02

Built the gateway to validate signatures, scope cache keys, and evict precisely.

03

Batched related fixture writes into single composite payloads with rollback semantics in the study model.

04

Rendered portal pages from edge cache with optimistic mutation states reconciled in the background.

05 · The Trade-offs

Deliberate Architectural Compromises

Trade-offs & Mitigations

⚖Custom portal vs. out-of-the-box community

Architectural Benefit:

Full control of performance, branding, and access costs in the study.

Associated Cost:

A portal and gateway to own.

Mitigation Strategy:

Shared design tokens and standard CI pipelines keep the ownership boring.

⚖Cached freshness vs. live reads

Architectural Benefit:

Fast browsing, insulated from record-system downtime.

Associated Cost:

Seconds of staleness after writes.

Mitigation Strategy:

Optimistic UI plus explicit freshness indicators per surface.

06 · The Result

Verified Outcomes

✓ VERIFIED RESULT

Fixture portal browses from edge with record reads reserved for writes and misses

✓ VERIFIED RESULT

Record-API consumption in the study model falls to a fraction of per-view polling

✓ VERIFIED RESULT

Related-entity writes commit atomically in the fixture harness

✓ VERIFIED RESULT

Staleness behavior is documented per surface rather than discovered by users

07 · Architecture Blueprint

System Schematic & Data Flow

System Topology Blueprint
Decoupled Headless Portal & Salesforce CDC Topology
INTERACTIVE SCHEMATIC
EXPERIENCE SURFACENext.js Edge ClientSub-100ms Read AccessWCAG 2.1 AA accessibleEDGE READ/WRITE GATEWAYMicro-Gateway & CacheShields CRM from readsComposite write batchingSALESFORCE ENTERPRISE SYSTEM OF RECORDComposite REST / Mutation IngestionAtomic multi-object saves without quota spikesChange Data Capture (CDC) StreamAsynchronous event invalidation back to EdgeCDC cache invalidation event

High-speed modern client decoupled from CRM governor limits via asynchronous event cache invalidation.

Text alternative for screen readers: Architecture flow: Customer Client to Edge Gateway / Cache via Sub-100ms Read Access; Customer Write to Micro-Gateway API via Authenticated Mutation; Micro-Gateway API to Salesforce Composite API via Batched Deterministic Write; Salesforce CDC to Cache Invalidation Webhook via Near-Real-Time Stream

08 · Why It Matters

Architectural Conclusion

“Enterprise CRMs are magnificent transactional databases and workflow engines, but poor public web servers.”

Key Lessons for Platform Scale:
  • •Enterprise CRMs are magnificent transactional databases and workflow engines, but poor public web servers.
  • •Decoupling the experience layer with event streaming transforms an enterprise platform into a competitive advantage.