Inspiration
In Kenya, M-Pesa powers everyday life, yet growing wealth still means hopping between disconnected apps. I built HazinaHub to bridge that gap, blending daily transactions, smart investing, and AI-powered advice into one clean, intuitive fintech experience.
What It Does
HazinaHub is a full-stack personal finance platform designed for the Kenyan ecosystem. It enables users to:
Transact Seamlessly: Deposit and withdraw via Safaricom’s Daraja API using secure STK Push and B2C flows.
Track Finances: Monitor real-time balances, spending trends, and financial health metrics.
Invest Smarter: Explore and invest in leading Kenyan MMFs like CIC Group, Sanlam Kenya, and Nabo Capital.
Consult Hazina AI: Chat with an AI financial advisor powered by Google’s Gemini API, which analyzes transaction history to provide personalized saving and investment insights.
How I Built It
Frontend: Next.js (App Router) and React, styled with Tailwind CSS. Zustand manages state for fast, reactive UI updates, while Recharts handles data visualization.
Backend: Node.js and Express with JWT authentication and CORS protection.
Database: MongoDB (via Mongoose) for scalable user profiles, transactions, and dynamic MMF simulations.
Integrations: Daraja API for payments and Gemini API for contextual AI advisory.
Challenges
Handling Daraja’s asynchronous webhook callbacks required careful transaction state management and atomic updates to prevent balance inconsistencies. Migrating transactional logic into a flexible MongoDB schema without breaking frontend state was another complex task.
To simulate realistic MMF growth without a public yield API, I engineered backend cron jobs that mathematically adjust rates within bounded limits, maintaining dynamic yet controlled fund performance.
What I Learned
This project sharpened my expertise in secure payment integrations, webhook architecture, and embedding LLMs directly into application workflows. I transformed AI from a simple chatbot into a context-aware financial assistant deeply integrated with user data.
What’s Next
The next phase is securing official API partnerships with fund managers for real portfolio execution within the dashboard. I also plan to introduce peer-to-peer wallet transfers and digital “chama” group savings, making HazinaHub not just a finance tracker but a community-powered wealth engine.
Log in or sign up for Devpost to join the conversation.