← Real Cases
REAL CASEcase-rewi-app

Rewi App — domain invariants, tenancy and evidence-based readiness

What the Laravel SaaS application taught about architecture, concurrency and recovery gates.

Context

Rewi App (distinct from the Rewi Web landing) implements multi-tenant digital loyalty, audit and integration boundaries on Laravel 13 and PostgreSQL.

Problem

Fast delivery risked conflating focused tests, backup inventory and actual operational readiness, particularly around workers, messaging and recovery.

Evidence

  • S14.2 documented 208 tests and 1,512 assertions PASS for a focused matrix; not comprehensive provider or production E2E.
  • S15.0 recorded GCP/GCS inventory and existing backups, but actual restore NOT RUN.
  • S15.1A defined DR design; reviewed state did not prove isolated restore executed or D1 Dedicated deployed.

Decision

Keep domain Actions and database authoritative; isolate tenants, make notification delivery recoverable and require executed evidence for readiness.

What changed

Dated lessons on concurrency, idempotency, orchestration boundaries and the difference between passing CI, finding backups and verifying restores.

What we learned

  • Focused CI success does not mean production readiness.
  • Backup existence does not prove recoverability.
  • Domain, audit and integration have distinct responsibilities.

How to reuse it

  • Multi-tenant Laravel SaaS.
  • Outbox and decoupled messaging.
  • Verifiable operations and DR.

What NOT to generalize

  • HMAC as blockchain.
  • S15/D1 as an approved release.
  • Configured workers, n8n and providers as verified active runtime.

Related Handbook