RORK LABJP
TOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the roundTOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the round
Articles/Dev Tools
Dev Tools/2026-05-09Advanced

Building a Rork A/B Testing Platform with GrowthBook and PostHog from Scratch

Drop Firebase and pair GrowthBook with PostHog to ship a production-grade A/B testing stack for your Rork apps. SDK wiring, edge evaluation on Cloudflare Workers, Bayesian statistics interpretation, and the operational pitfalls I learned the hard way.

GrowthBookPostHog3A/B Testing7Feature Flags2Cloudflare Workers24Rork515Experimentation

Premium Article

Late 2025, I tried to run a small experiment on my wallpaper app — three different onboarding screens for a paid subscription — using Firebase A/B Testing. I gave up partway through. Three reasons. Reaching the sample size for adequate statistical power would have taken three weeks. Remote Config updates lag behind the rollout, smearing the cohorts. And Firebase's billing got tangled with other features I was already paying for, making it hard to scale up just the experimentation piece.

After trying a few alternatives, the combination that fit my own indie-developer workflow best was GrowthBook (the experiment engine) paired with PostHog (product analytics). Both are open source. Self-hosted, the running cost is the server bill alone. The official SDKs run cleanly on the React Native code Rork generates, and putting Cloudflare Workers in front of GrowthBook for edge evaluation gives more consistently low latency than Firebase Remote Config in my testing.

This article walks through the entire setup I actually use in production: integrating both tools into a Rork app, getting the first experiment running, and the statistics-and-operations details that aren't obvious from the official docs.

Why GrowthBook + PostHog, Not Firebase

Firebase Remote Config plus Firebase Analytics is the shortest path to your very first A/B test. But once experimentation becomes a regular practice, the limits show up.

The first is the opacity of the statistics engine. Firebase A/B Testing uses an internal Bayesian engine whose assumptions you can't tune. Want to set custom priors? Adjust the significance threshold? Apply CUPED (Controlled-experiment Using Pre-Experiment Data) to reduce variance? You're stuck with Firebase's defaults.

The second is the separation between experiment design and analysis. Remote Config delivers flags, Analytics collects events, and you bounce between two tools to interpret a running experiment. GrowthBook unifies definition, delivery, and analysis in one dashboard, and when you point it at PostHog as the data source, your existing PostHog events become experiment metrics directly.

The third reason — the one that tipped me over the edge — is avoiding vendor lock-in through self-hosting. GrowthBook is MIT-licensed; PostHog's core is MIT/Apache 2.0. Both ship Docker images. GrowthBook Cloud has a free tier for up to 3 users, and PostHog Cloud is free up to 1M events per month. I ran on both clouds for the first six months, then moved GrowthBook alone onto Fly.io once the bill became visible.

Architecture Overview

The platform has four moving parts.

  • GrowthBook backend: the admin UI, delivery rules, and statistics engine. Either GrowthBook Cloud or self-hosted on Fly.io / Railway / Hetzner.
  • GrowthBook Edge SDK on Cloudflare Workers: the edge layer that delivers feature flags to the Rork app at low latency.
  • PostHog: events, funnels, cohorts. Doubles as GrowthBook's metric source.
  • Rork app (React Native / Expo): integrates @growthbook/growthbook-react and posthog-react-native; sends user identification and exposure logs.

When a user launches the app, Cloudflare Workers serves the latest GrowthBook flag set; exposure events flow into PostHog. The GrowthBook backend then reads PostHog's $pageview, subscription_started, and similar events, runs Bayesian inference, and tells you which arm wins.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Wire GrowthBook and PostHog into a Rork app today and run your first real experiment without depending on Firebase
Cut feature-flag evaluation latency below 30ms by routing the GrowthBook Edge SDK through Cloudflare Workers
Read GrowthBook's Bayesian metrics with confidence and stop calling experiments early just because Chance to Beat hit 95%
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-07-11
Verifying StoreKit 2 Signed Transactions in a Cloudflare Worker
If you trust whatever the device says about its purchase state, a tampered entitlement walks right through. This walks through verifying StoreKit 2 signed transactions (JWS) in a Cloudflare Worker so you grant entitlements without trusting the client, with working code.
Dev Tools2026-06-22
Serving Both Plain Rork and Rork Max From One Backend — Designing an API Response Contract That Never Breaks Old Binaries
When plain Rork (React Native / Expo) and Rork Max (native Swift) both call the same Cloudflare Workers backend, the whole design centers on not breaking old binaries you cannot force-update. Wrap responses in an envelope, evolve them additively, absorb client differences with capability flags, and retire old contracts safely — shown in code.
Dev Tools2026-06-22
Hardcoding Your OpenAI Key in a Rork (Expo) App Means It Gets Stolen — Slip a Thin Worker Proxy In Between
Embed an OpenAI or Gemini API key directly in the Expo app Rork generates and it can be extracted from the shipped binary. Here is why a key inside an app is never secret, plus a minimal Cloudflare Workers proxy that hides it (streaming passthrough included), simple abuse controls, and key rotation that needs no app review.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →