NGO PLATFORM – COMPLETE TECHNICAL & FUNCTIONAL DESCRIPTION 1. Project Overview This NGO Platform is a full-scale donation and membership management system designed for real-world NGO operations. It supports Members, Donors, Coordinators, and Admin with role-based dashboards, secure payments, document generation, and automated communication. The system is production-ready, scalable, and deployable on AWS / Vercel / Railway / any cloud hosting. 2. Technology Stack Backend Node.js – Runtime environment Express.js – REST API framework PostgreSQL – Primary relational database Prisma ORM – Database schema & query management JWT (JSON Web Token) – Authentication & authorization bcrypt – Password hashing Razorpay SDK – Payment processing & verification Nodemailer (Brevo SMTP) – Email automation Cloudinary / S3 – Cloud file storage jsPDF – Receipt, ID card, certificate generation QR Code Generator – Verification QR on documents Frontend React.js Responsive Design (Mobile + Desktop) Role-based routing Secure API consumption Deployment Backend: AWS EC2 / Railway / Render Frontend: Vercel / Netlify Database: AWS RDS / Supabase / Neon Domain: Custom domain (your own) 3. Environment Configuration (.env) The platform runs using environment variables: DATABASE_URL JWT_SECRET JWT_EXPIRES_IN SMTP_HOST SMTP_PORT SMTP_USER SMTP_PASS RAZORPAY_KEY_ID RAZORPAY_KEY_SECRET CLOUDINARY_CLOUD_NAME CLOUDINARY_API_KEY CLOUDINARY_API_SECRET APP_BASE_URL This makes the system secure, portable, and cloud-ready. 4. User Roles & Access Control Roles: Admin Member Coordinator Donor Each role has: Separate dashboard Separate API access Strict role-based authorization middleware 5. Authentication System (Email / Password) Features: Email + Password Registration Secure Password Hashing (bcrypt) JWT-based login session Role-based access control Token validation middleware Flow: User registers → data saved in PostgreSQL Password hashed Login returns JWT token Token attached to every API request Backend validates token & role No Internet Identity, no IC, no Motoko. 6. Member System Member Capabilities: Register & login View membership status View donations history Download: Membership ID Card Membership Certificate Membership validity: 1 year QR code for verification on documents Auto-Generated Documents: PDF format Stored in cloud storage Accessible from member dashboard 7. Donor System Donor Capabilities: Register & login Make donations via Razorpay View donation history Download Donation Receipt Receive email confirmation after payment Donation Flow: Donor initiates payment Razorpay Checkout opens Payment completed Backend verifies signature Donation stored in DB Receipt auto-generated Email sent to donor 8. Coordinator System Coordinator Capabilities: Login View assigned members View donation statistics Monitor activities/events Limited admin-like visibility (read-only or controlled actions) 9. Admin Panel Admin Capabilities: Secure login (Admin-only) Create & manage: Members Donors Coordinators Approve / block users Control website content: Home page sections Activities News Events View all donations Manage receipts, certificates, ID cards Configure settings (email, payment, validity rules) Admin panel is central control system of the website. 10. Payment System (Razorpay – Live Mode) Features: Razorpay Order Creation Backend Payment Verification HMAC Signature Validation Fraud-proof confirmation Payment failure handling Security: Keys stored only in .env Verification happens server-side No trust on frontend response 11. Document Generation System Documents: Donation Receipt Membership ID Card Membership Certificate Features: PDF generation using jsPDF QR code embedded Auto-fetch user data from DB Cloud storage upload Downloadable from dashboard Same format every time (no manual edits) 12. Email Automation (SMTP) Emails sent automatically: Registration confirmation Donation confirmation Receipt delivery Membership approval Expiry notifications Uses Brevo SMTP or any SMTP provider. 13. Content Pages Static-Dynamic Pages: Home Page (Admin-controlled) About Us Activities News Events Terms & Conditions Privacy Policy These pages fetch content via APIs and can be updated without code changes. 14. API Architecture Structure: /api/auth /api/admin /api/member /api/donor /api/coordinator /api/payment /api/documents /api/content All APIs are: REST-based Secure Version-ready Scalable 15. Real-World Readiness ✔ Works like real NGO platforms ✔ Scalable for thousands of users ✔ Cloud-ready ✔ Secure payment handling ✔ Fully automated documents ✔ No vendor lock-in ✔ Future mobile app possible