Inspiration
What it does
Project Story
About the project
Inspiration
Loyalty is supposed to feel like a “thank you”, but in reality it often feels like work: multiple apps, scattered points, generic coupons, and checkout friction. For a bank wallet, that fragmentation is a missed opportunity—because the wallet is already the daily habit and the trust anchor.
We were inspired by the challenge prompt: make loyalty wallet-native, remove the “separate app” barrier, and prove measurable uplift for both merchants and the bank.
What we built
SOL LoyaltyAI is a product-grade prototype that combines:
Dynamic QR Rewards Pass (anti-replay)
A signed, short‑TTL QR token that rotates quickly. It’s validated server-side and protected with idempotency + replay blocking to reduce abuse and customer disputes.AI-Personalized Offers with transparent “why” (non-creepy)
We use the latest Qwen 3.5 (via an OpenAI-compatible API) to turn backend-approved candidate offers into concise “Just for you” cards—each with a short explanation that stays within strict safety rules (no sensitive inference, no invented history).Bank-grade backend loop: eligibility → redemption → analytics
Every step emits events (offer shown, QR issued, scanned, redeemed/declined). The admin view aggregates these into a funnel so judges can immediately see how the system ties AI to business outcomes—not vanity clicks.
How we built it (end-to-end)
We designed the system with a clear separation of responsibilities:
- Backend is the source of truth for offers, eligibility rules, scoring signals, token signing, and redemption decisions.
- LLM is used for language and reasoning (ranking presentation and explanations), but it can only reference the offers the backend provides. If AI fails, the system falls back to deterministic rule-based reasons.
This “tool-first truth” architecture makes the demo feel reliable and bank-ready: the AI adds value without compromising correctness.
Challenges we faced
- Trust vs. personalization: It’s easy for personalization to feel invasive. We enforced guardrails (no sensitive inference, concise explanations) and designed the UX to make the “why” optional and readable.
- LLM hallucination risk: We constrained the model with structured JSON output and a closed set of candidate offers. If parsing fails or the response is empty, we degrade gracefully.
- Fraud and replay: Static QR codes are easy to share. We implemented short TTL + HMAC signature + replay protection so the redemption flow still feels “payment-grade”.
What we learned
- The most convincing AI demos are not just smart—they are measurable and safe.
- A bank product wins when it’s end-to-end: consumer delight + merchant simplicity + backend controls + analytics.
- The best “judge-wow” moment is when the system shows instant redemption and then immediately shows the business impact in a dashboard.
What’s next
- Add A/B testing by default (AI-ranked vs baseline) and incrementality reporting.
- Integrate with real POS adapters and settlement/accounting flows.
- Expand policy controls (consent, location usage, partner data boundaries) for production rollout.
Built With
- next.js-(app-router)
- node.js
- qrcode-generation-(qrcode)
- qwen-(dashscope-openai-compatible-api-via-openai-sdk)
- react
- sqlite-(better-sqlite3)
- tailwind-css
- typescript