DEVELOPER SPECIFICATION
BoolBul Core Architecture & Overview
BoolBul is an ultra-low-latency, in-app cancellation interceptor and exit telemetry engine built specifically for solo SaaS founders and indie hackers ($500 to $25k MRR).
โก <10ms Edge Engine
Turso LibSQL edge replicas evaluate discount and pause eligibility closest to the user.
โ๏ธ 0% Dark Patterns
Strictly conforms to FTC 16 CFR ยง 425 & California ARL with persistent 1-click escape hatch.
๐ก๏ธ 1500ms Fail-Open
If edge or network fails, customer is immediately allowed to cancel without being trapped.
System Flow & Data Boundary
+---------------------------------------------------------------------------------+
| USER BROWSER |
| [Cancel Subscription Button] --> BoolBul.open({ publicKey, ... }) |
+---------------------------------------------------------------------------------+
|
| (1) POST /api/v1/intercept/init (publicKey)
v
+---------------------------------------------------------------------------------+
| BOOLBUL EDGE RUNTIME (Cloudflare) |
| - Reads offer rules from the Turso libSQL edge database |
| - Evaluates MRR triggers, active discounts, and pause rules |
| - Generates tamper-proof initToken & single-use nonce |
+---------------------------------------------------------------------------------+
| |
| If Customer Claims Offer | If Customer Clicks
v | Escape Hatch
+---------------------------------------+ +---------------------------+
| (2) POST /api/v1/intercept/claim | | (3) onCancelConfirmed() |
| Returns HMAC-signed offerJwt | | Native billing cancel |
| Backend executes Dodo/Stripe mutation | | executed immediately |
+---------------------------------------+ +---------------------------+
Zero-Trust Credential Isolation
BoolBul follows strict zero-trust isolation: No secret keys ever touch your frontend bundle or unauthenticated visitors. Your workspace bb_pub_... public key is safe for client applications, while HMAC signing secrets remain strictly on your authenticated backend.