# Max Olympiad Foundation (MOF) — Multi-Role Management System

## Original Problem
Hindi multi-role NGO platform for State Manager (राज्य प्रबंधक), District Coordinator (जिला समन्वयक), and Volunteer (वॉलंटियर). Manages Districts, Blocks, Coordinators, Volunteers, School Visits, Students, ₹300 fee collection & verification, report cards, ID cards, authority letters, wallet payouts, PDF/Excel exports with MOF logo.

## Personas
- **State Manager (Super Admin)**: full control, accepts/rejects, verifies fees, issues report cards, records wallet payouts.
- **District Coordinator**: manages blocks & registers volunteers in their district; sees wallet read-only.
- **Volunteer**: registers school visits, enrolls students, collects ₹300 fees; sees wallet read-only.

## Architecture
FastAPI + MongoDB (collections: users, districts, blocks, coordinators, volunteers, school_visits, students, wallet_transactions, delete_requests). React + Tailwind + shadcn/ui frontend. JWT auth (username/password) with Bearer token in localStorage + httpOnly cookie fallback.

## Implemented (16 Jul 2026)
- Auth: JWT login, role-gated `/api` endpoints, admin seed (ADMIN/ADMIN321) on startup.
- Districts, Blocks CRUD; Coordinator/Volunteer/Student/SchoolVisit workflows with accept/reject/edit/delete.
- Auto volunteer_code (MOF/VO/0001) generated on accept; password 123456.
- Fee collect (volunteer/DC) + fee verify (SM); marks entry + report card issuance.
- Wallet payouts (SM write, others read-only).
- PDF/Excel exports (reportlab/openpyxl) with MOF shield logo; PDF report card, ID card, authority letter.
- Delete-request queue for accepted entities from non-SM roles.
- Admin Management page: SM can add / delete / reset password for other admins.
- Hindi-first UI with real MOF shield logo image in sidebar, login, and PDFs.

## Backlog (P1 / P2)
- P1: Edit dialogs for coordinators/volunteers/students in tables (currently create+delete only).
- P1: Delete-request queue UI for SM.
- P1: District-wise wallet balance & student search bar.
- P2: Analytics charts (Recharts) on SM dashboard; district-wise performance.
- P2: Object storage for image uploads instead of base64.
- P2: Bulk import for volunteers/students via Excel.
- P2: SMS/WhatsApp notification on volunteer accept.
