Mobile-money-native micro-donations platform for East Africa - browse causes and give via M-Pesa, one-off or recurring, with rewards, receipts, and admin moderation.
# Micro-Donations Platform
A web app for making small, mobile-money-native donations to community causes across East Africa. Donors pay via M-Pesa STK push — one-off or recurring — and can track exactly where their money goes.
## Overview
Recipients create a cause with a funding goal, category, and country. Donors browse or search for causes and give any amount, paid straight from their phone via M-Pesa. Every cause page shows real-time progress, recent donations, and a comment thread. Donors earn reward points on each donation, redeemable from an admin-managed catalog, and can download a PDF receipt for any completed donation.
## Features
- Cause creation, browsing, search, and filtering by category/country
- M-Pesa donations via STK push — one-off or recurring (weekly/monthly)
- Comments on cause pages
- Reward points earned per donation, redeemable for admin-managed rewards
- Downloadable PDF receipts for completed donations
- Admin moderation: edit or remove any cause, manage the rewards catalog
- Admin user management: promote or demote other users to admin
- JWT-based authentication
## Tech Stack
**Backend:** Flask, SQLAlchemy, Alembic migrations, Flask-JWT-Extended, ReportLab (receipts), M-Pesa Daraja API.
**Frontend:** React, React Router, Tailwind CSS, Formik + Yup, Framer Motion.
## Project Structure
```
server/
app.py # Flask app factory, blueprint registration
models.py # SQLAlchemy models
config.py # M-Pesa configuration
routes/ # One blueprint per resource (causes, donations, rewards, admin, ...)
services/ # M-Pesa client, PDF receipt generation
jobs/ # Standalone script that charges due recurring donations
migrations/ # Alembic migrations
tests/ # pytest suite
seed.py # Resets and seeds demo data
client/
src/
pages/
public/ # Home, Causes, CauseDetail, Login, Register, NotFound
dashboard/ # D …