🇹🇿 MsaadaFund — Jukwaa la Kukusanya Fedha Tanzania. M-Pesa, Tigo Pesa, Airtel Money. Pamoja Tunaweza!
# 🇹🇿 MsaadaFund — Tanzania Crowdfunding Platform
**Pamoja Tunaweza** — A production-ready crowdfunding platform built for Tanzania, supporting M-Pesa, Tigo Pesa, Airtel Money, and bank transfers.
---
## Features
- **Phone OTP Authentication** — Login with any Tanzania mobile number
- **Campaign Management** — Create, edit, and track crowdfunding campaigns
- **3 Campaign Types** — Dharura (emergency), Biashara (business), Jamii (community)
- **4 Payment Methods** — M-Pesa, Tigo Pesa, Airtel Money, Bank Transfer (via AzamPay)
- **Real-time Notifications** — SMS alerts via Africa's Talking
- **Image Uploads** — Campaign photos with auto-resize
- **Campaign Updates** — Owners can post progress updates
- **Donor Notifications** — Auto-SMS to donors and campaign owners
- **Admin Review Flow** — Campaigns require approval before going live
- **Rate Limiting & Security** — Helmet, CORS, rate limiter, JWT auth
---
## Tech Stack
| Layer | Technology |
|------------|----------------------------------------|
| Backend | Node.js + Express |
| Database | SQLite (dev) / PostgreSQL (production) |
| Payments | AzamPay (M-Pesa, Tigo, Airtel Money) |
| SMS | Africa's Talking |
| Auth | JWT + Phone OTP |
| Frontend | Vanilla HTML/CSS/JS (SPA) |
| File Store | Local (`/uploads`) → swap for S3 |
---
## Quick Start
### 1. Install dependencies
```bash
cd msaadafund
npm install
```
### 2. Set up environment
```bash
cp .env.example .env
# Edit .env with your API keys
```
### 3. Start the server
```bash
# Development (with auto-reload + sandbox payments)
npm run dev
# Production
NODE_ENV=production npm start
```
Server starts at: **
http://localhost:3000**
> In development, the database is seeded with 6 sample campaigns automatically.
> OTP code is always `123456` in development — no SMS needed for testing.
---
## Environment Variables
| …