Skip to content
ConnectPH
All work

Case study · Product

Miloca

One QR for every loyalty card. Customers carry a single QR that works at every partner store; each store runs its own stamp or spend card, with rewards it sets up itself.

Visit miloca.app(opens in a new tab)
Miloca: One QR for every loyalty card, with the customer's cards, their Miloca QR and the counter's Stamp added screens
for every partner store
1 QR
apps on one backend
4
scanning at the counter
Offline
versioned database migrations
30

Overview

Miloca is our own loyalty platform, now in a live pilot. A customer signs up once and gets one QR; at any partner store the cashier scans it and the stamp or amount lands on that store's card. Stores design their own card, set the rewards and run the counter from a phone or tablet. It's four apps on one Supabase backend: the customer app, the store's counter app, the store website and our console.

01

For customers

  • One QR for every partner store, shown in the app
  • All your cards in one place, with progress like “7 of 10 stamps”
  • Rewards you've earned, and a map of partner stores
  • Start as a guest and save your account later, without losing your stamps

02

At the counter

  • Scan the customer's QR, add a stamp or an amount, redeem a reward
  • Works offline: scans queue and sync when the connection is back
  • Staff sign in with a PIN on the shared counter phone or tablet
  • Daily stats and a short tutorial for new staff

03

For store owners

  • Design the card: colours, stamp icon and layout, from a design library
  • Stamp or amount-spent cards, with the rewards and milestones the store chooses
  • Branches found through Google Places, plus team, devices and a printable QR standee
  • Insights on visits and cardholders, and billing through PayMongo

04

Miloca console

  • Approve stores before they go live
  • Plans, subscriptions and payments
  • Reports, customers and devices
  • An audit log of every admin action

Under the hood

  • Rotating QR

    The customer's QR rotates through short-lived signed tokens, so a screenshot stops working, and each token works only once.

  • Offline at the counter

    The store app checks the QR's signature offline and queues the scan; when it reconnects, each scan syncs exactly once.

  • One source of truth

    Points and rewards are only written by one database function, after the QR is verified; the apps can only read them.

  • No double rewards

    Redeeming needs a connection, so a reward can't be spent twice from two devices.

  • Access by role

    Customers see their own cards; owners, managers and staff see their store; only the console approves a store.

  • Shipping

    Main deploys production and migrates the database in CI; 30 versioned migrations so far.

Tech stack

  • Next.js + TypeScript

    Four App Router apps in one pnpm and Turborepo monorepo

  • Tailwind CSS v4 + Motion

    Shared “Violet & Gold” design system and components

  • Supabase (PostgreSQL)

    Auth, row-level security and the reward engine in the database

  • PWA + IndexedDB

    Installable apps; the counter queues scans while offline

  • PayMongo

    Store subscriptions and invoices

  • Google Maps & Places

    Store map for customers, branch lookup for stores

  • Vercel

    One project per app, functions in Singapore

Cover screens show sample data.

Next project

ConnectCoach