Building Talus - A Step-to-Earn App That Connects Fitness with Local Commerce
2026-08-05
How I designed and built a location-aware mobile app with a self-sustaining merchant economy, from architecture to anti-cheat to coin-based billing.
The Problem
Local businesses struggle with customer acquisition. Fitness apps struggle with retention. What if one app solved both?
People walk every day, to work, to lunch, around the neighborhood. That movement has value, but no one's capturing it. Meanwhile, local merchants need foot traffic, not impressions.
Talus connects the two: walkers earn coins through physical steps, then spend those coins on discount vouchers at local businesses. Merchants get real walk-in customers. Walkers get real rewards for activity they're already doing.
What I Built
A full-stack mobile app with three interconnected surfaces:
1. User App (Tauri 2 + React + TypeScript)
- Hardware pedometer integration — Uses Android's TYPE_STEP_COUNTER sensor (same as Pikmin Bloom) for accurate step counting that works indoors, in pockets, and while the phone is locked
- Real-time dashboard — Strava-style step tracking with daily cap progress, streak multipliers, and party bonuses
- Map view — OpenStreetMap with live walk path recording (Strava-style gold trail) and nearby walking trails via Overpass API
- Voucher redemption — Browse merchant offers, claim with coins, generate single-use QR codes
- Anti-cheat system — Rolling window cadence cap (5 steps/sec), 20,000 daily step cap, GPS movement gate to detect "sitting and swinging"
2. Merchant Portal (React + Vite)
- Voucher management — Create, edit, and toggle discount offers with coin pricing
- QR scanner — Camera-based QR scanning to validate redemptions in-store
- Branch management — Multi-location support with per-branch settings
- Subscription billing — Monthly subscription with coin-based discount tiers
- Referral system — Merchants refer other merchants and earn coins
3. Backend (Supabase + Cloudflare Workers + Deno Edge Functions)
- 14 edge functions handling auth, coin earning, voucher CRUD, QR scanning, referrals, and subscription billing
- Cloudflare R2 for image storage (avatars, voucher photos, invoice/receipt PDFs)
- PDF generation — Server-side invoice and receipt generation using pdf-lib
- Email automation — Resend integration for invoices, approval workflows, and renewal confirmations
- Row-level security on all tables with merchant-scoped access
The Coin Economy — A Self-Sustaining Loop
The economy had to be balanced so walkers can't farm coins by cheating, merchants can't game their own vouchers, and the subscription model incentivizes real engagement over just payment. Walkers earn 10 steps per coin with a 20,000-step daily cap, streak multipliers up to 2x, and proximity party bonuses. Merchants earn back coins from every redemption, with a 500-coin cap per voucher to prevent self-redemption farming. 100,000 coins equals a free monthly renewal, which at 500 coins per voucher means 200 genuine customer visits pay for the subscription.
Technical Decisions I'd Highlight
Why Tauri 2 instead of React Native?
Tauri gives me a native Kotlin foreground service for step tracking (critical for background counting) while keeping the UI in React/TypeScript. The Rust bridge handles plugin communication, and I can deploy to both Android and iOS from one codebase. The tradeoff is a smaller ecosystem, but for a step-tracking app, native sensor access matters more than UI library availability.
Why Supabase Edge Functions instead of a traditional server?
Each function is independently deployable, auto-scales, and sits close to the database. For an MVP with 14 distinct operations (coin earning, voucher CRUD, QR scanning, billing, referrals), the serverless model eliminates infrastructure management. The service role key bypasses RLS for privileged operations while client queries stay locked down.
Why Cloudflare R2 + Workers for file storage?
Zero egress fees. Avatars, voucher photos, and generated PDFs (invoices, receipts) all flow through a single Worker that handles upload, serving, and deletion. The Worker also serves as a middleware layer for PDF storage from edge functions — the edge function generates a PDF with pdf-lib, base64-encodes it, and sends it to the Worker for R2 storage.
Why a 20,000-step daily cap?
At 10 steps/coin, that's 2,000 coins/day max. A typical voucher costs 50-200 coins, so a walker can redeem 1-3 vouchers per day of walking. This keeps the economy balanced — coins have real value, but earning them requires genuine physical effort. The cap also makes the streak system meaningful: hitting 20,000 steps for 7 consecutive days doubles your multiplier, but missing a day resets it.
What This Project Demonstrates
- Full-stack ownership — Mobile app, web portal, backend, infrastructure, and database schema all designed and built end-to-end
- Systems thinking — The coin economy required balancing user incentives, merchant incentives, and abuse prevention simultaneously
- Production-grade architecture — RLS, anti-cheat, PDF generation, email automation, file storage, and a billing workflow with admin approval
- Mobile-native integration — Hardware pedometer, GPS, foreground services, device integrity checks, and APK signature verification
- Pragmatic tradeoffs — Choosing the right tool for each layer (Tauri for native sensors, Supabase for rapid backend, Cloudflare for cheap storage) rather than forcing one framework everywhere
What's Next
- iOS HealthKit integration (currently Android-only for step tracking)
- Geofenced voucher redemption (only redeemable within X meters of the store)
- Merchant analytics dashboard (redemption rates, peak times, customer return rate)
- Party discovery (BLE-based proximity detection for group walking bonuses)
I'm always open to talking about product architecture, mobile development, or creative economy design.
Tech stack: Tauri 2, React 18, TypeScript, Vite, Tailwind CSS, Supabase, Cloudflare Workers, R2, Deno, Kotlin, Rust, Resend, pdf-lib
Links: talus.vikaph.com

Also Read
Baketlist - AI-Powered Travel Itinerary Extraction
Discover Baketlist, my AI-powered side project that extracts travel itineraries from YouTube videos. Learn how I automate travel content processing with near-zero operational costs.
How I Automate Website Content with One Simple Prompt
As a business owner, I know content is king. But creating consistent, high-quality articles for your website takes hours.