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.
The Vision
Section titled “The Vision”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.
Tech Stack & Architecture
Section titled “Tech Stack & 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).
Key Features & Engineering Deep Dive
Section titled “Key Features & Engineering Deep Dive”1. Robust Payment Lifecycle
Section titled “1. Robust Payment Lifecycle”I implemented a strict state machine to handle financial transactions, ensuring no package is activated without verified funds.
- Flow:
Draft→Confirmed→Invoice Created→Payment Success→Active. - Gateway Agstraction: Built a Gateway Adapter Pattern to keep the system provider-agnostic, supporting Xendit and Doku seamlessly via a unified interface.
2. Secure “Pull-Based” Payout System
Section titled “2. Secure “Pull-Based” Payout System”Unlike traditional transfers, ThrShare uses a “claim” mechanism.
- Security: Participants use a unique
claimCode. To prevent database leaks, the system only storesclaimCodeHash. - 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.
4. Fintech-Grade Webhook Handling
Section titled “4. Fintech-Grade Webhook Handling”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, andPackagestatuses simultaneously.
Modern Landing Page
Section titled “Modern Landing Page”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.
Reflection: Building with AI Agents
Section titled “Reflection: Building with AI Agents”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:
- Maintain a complex feature-based folder structure.
- Adhere to a pre-existing database schema without unauthorized modifications.
- 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.
🔗 Source & Demo
Section titled “🔗 Source & Demo”- Live Demo: Youtube: Demo Thr Share