# ZamFund — Zambia Fund Hub
ZamFund is a Zambian-first investment marketplace that connects local startups
and SMEs with retail and diaspora investors. Founders raise capital through
equity, revenue-share, loan, or crowdfunding campaigns, while investors browse
verified opportunities, fund campaigns from an in-app wallet, and track returns.
> **Live preview:**
zambia-fund-hub.lovable.app
---
## Table of Contents
1. Feature overview
2. User roles
3. Demo accounts
4. Technology stack
5. Local setup
6. Project structure
7. Backend & database
8. Security model
9. Testing
10. Deployment
11. System diagrams
- Use-case diagram
- UML component diagram
- Entity-relationship diagram
- Sequence diagram — invest in a campaign
---
## Feature overview
| Area | What's implemented |
|------|--------------------|
| **Authentication** | Email/password sign-up & sign-in, Google OAuth, password reset by email, profile auto-provisioned via DB trigger |
| **KYC compliance** | Individual (NRC + selfie) and business (TPIN + PACRA) submissions, admin review (approve/reject with notes), hard-gate on investments until approved |
| **Wallet** | ZMW wallet per user, deposits via MTN MoMo / Airtel Money / Zamtel Kwacha / bank transfer / Flutterwave, withdrawals, internal investment debits, payouts/refunds — all through `SECURITY DEFINER` RPCs |
| **Discovery** | Browse approved businesses, discovery rails (trending / new / closing soon), risk scoring, real-time campaign progress bars, save/bookmark businesses |
| **Founder dashboard** | Create business profile, upload registration & pitch deck, launch campaigns (4 funding types), edit proposals, track raised amount in real time |
| **Investor dashboard** | Wallet card, portfolio summary, investment list with status, campaign urgency badges, saved businesses |
| **Admin dashboard** | Tabs for Users, KYC, Businesses, Campaigns, Investments, Transactions; verify/suspend users; approve/reject businesses & campaigns; issue payouts/ref …