Menu

1 / 2

I shipped a $49 React Native template with the backend included — here's the architecture

DEV Community·kenghow·6 months ago
#fEd2Wo5N
#reactnative#expo#supabase#cloudflare#groq
Reading 0:00
15s threshold

After building a fitness tracker as a side project, I realized the backend plumbing (auth, cloud sync, AI proxy with quota, RLS) was ~4 weeks of work that most React Native templates skip entirely.

So I rebranded mine as Reptron and shipped it as a template.

Live: https://8628671192007.gumroad.com/l/mbmmh

The architecture

mermaid flowchart LR App[📱 React Native App] -->|JWT| Worker[⚡ Cloudflare Worker<br/>auth + quota] App -->|JWT| Supabase[☁️ Supabase<br/>Postgres + RLS] Worker -->|server secret| Groq[🤖 Groq Llama 3.1] \`\`\`

(The Groq API key never ships in the app bundle — it lives as a Cloudflare secret on the Worker.)

## What's actually in it

### Production backend (the actual value)

- **Cloudflare Worker proxy** that hides the Groq API key — verifies Supabase JWT via cached JWKS (1h TTL), enforces 50 req/user/day quota in KV (26h TTL covers the UTC day boundary) - **Supabase Postgres with RLS** — users only see their own data, verified at the database level - **Idempotent cloud sync** —…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.