Recipe Streak Design
How Meridian turns daily usage into a compounding reward loop.
The Core Loop
Every time a user runs a recipe to completion, Meridian increments an atomic counter in Upstash KV. The key pattern is streak:{userId}:{recipeId}. A recipe is any saved automation — export, transform, or cleanup.
Streak States
- Cold (0–2 days): No visual indicator. Baseline state.
- Warm (3–6 days): Subtle glow on the recipe card border.
- Hot (7–13 days): Pulsing gradient ring. Unlocks streak badge.
- On Fire (14+ days): Full violet-to-pink animated border. Priority queue slot unlocked.
Decay Mechanics
Missing a day drops the streak by one tier, not to zero. A user at Hot who skips Monday falls to Warm. Two consecutive misses drop to Cold. This prevents rage-quitting while preserving the incentive to return.
Reward Tiers
Implementation Notes
Streak counters live in Upstash KV with a 72-hour TTL on cold entries. The loader binary reports recipe completion via a signed payload to /api/streak/increment. The dashboard reads current streak state from /api/streak/status and renders the appropriate visual tier client-side. No WebSocket needed — polling every 30s on the recipes page is sufficient.