Skip to content

What I Build

ThrShare: AI-Agent Powered Fintech Solution for Holiday Giving

Section titled “ThrShare: AI-Agent Powered Fintech Solution for Holiday Giving”

ThrShare is a specialized fintech platform built during a mini Ramadan Hackathon. The project aims to simplify the tradition of giving THR (Holiday Allowances) by allowing users to create distribution packages and share claim links, rather than manually transferring money to dozens of recipients.

What makes this project unique is its execution: 100% of the implementation was performed by AI Agents, following strict architectural rules and fintech-grade security requirements.


Sending THR to many people is traditionally tedious: you need to ask for everyone’s bank details, perform manual transfers, and track who has received what. ThrShare flips the script.

  • The Sender: Creates a package, pays once, and gets a distribution link.
  • The Recipient: Opens the link, enters their own payout details, and receives the funds automatically.

thrshare system architecture

To ensure scalability and reliability, I chose a modern, type-safe stack:

  • Framework: Next.js (App Router) & NestJS
  • Database: PostgreSQL with Drizzle ORM
  • Authentication: Better-Auth
  • UI/UX: Shadcn/UI, TailwindCSS, Lucide Icons
  • Integrations: Xendit (Payment & Payout), WAHA (WhatsApp Gateway)
  • Architecture: Feature-based Clean Architecture with strict layer separation (Repository → Service → API).

I implemented a strict state machine to handle financial transactions, ensuring no package is activated without verified funds.

  • Flow: DraftConfirmedInvoice CreatedPayment SuccessActive.
  • Gateway Agstraction: Built a Gateway Adapter Pattern to keep the system provider-agnostic, supporting Xendit and Doku seamlessly via a unified interface.

Unlike traditional transfers, ThrShare uses a “claim” mechanism.

  • Security: Participants use a unique claimCode. To prevent database leaks, the system only stores claimCodeHash.
  • Concurrency: Used Database Transactions and Row-Level Locking (SELECT FOR UPDATE) to prevent “Double Claim” attacks or race conditions during high-traffic periods.
  • Xendit Payout Integration: Automated the generation of Payout Links so the platform never has to store sensitive bank account numbers directly.

3. Automated WhatsApp Notifications (MVP Scale)

Section titled “3. Automated WhatsApp Notifications (MVP Scale)”

To keep the system lightweight yet effective, I built a background notification engine without the overhead of Redis or BullMQ.

  • Async Processing: Uses setImmediate() to trigger background sends, allowing the API to return 200 OK instantly.
  • Anti-Spam: Implemented phone number normalization, 24-hour rate limiting, and a 200ms delay between messages to ensure gateway stability.
  • Validation: A pre-flight check ensures numbers are registered on WhatsApp before a package is even created.

Reliability in fintech depends on webhooks. My implementation guarantees:

  • Idempotency: Webhook handlers check existing statuses to ignore duplicate delivery events.
  • Atomic Updates: Using a single DB transaction to sync Payment, Invoice, and Package statuses simultaneously.

The project includes a high-conversion marketing page designed with a “Stripe-like” aesthetic—clean, minimal, and trust-oriented.

  • Focus: Clarity for non-technical users.
  • Components: Hero with card-based visuals, a step-by-step “How it Works” flow, and a transparency-focused security section.

This project served as a benchmark for Agentic Workflows. By providing the AI with a strict “Architecture Rule” and “Layer Responsibilities,” the agents were able to:

  1. Maintain a complex feature-based folder structure.
  2. Adhere to a pre-existing database schema without unauthorized modifications.
  3. Write boilerplate-free, “DRY” (Don’t Repeat Yourself) code across the entire stack.

ThrShare is a testament to how AI can accelerate the development of complex, secure, and production-ready fintech applications without sacrificing architectural integrity.