A full-stack donation platform for the "Rally for Big Cats 2026" campaign by Dharti International Foundation.
finalproject/
├── frontend/ # React + Vite application
│ ├── src/
│ ├── public/
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
├── backend/ # Express.js API server
│ ├── config/ # Database configuration
│ ├── middleware/ # Rate limiting, validation, error handling
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── services/ # Business logic (email service)
│ ├── utils/ # Logger, helpers
│ ├── server.js
│ └── package.json
├── package.json # Root monorepo scripts
└── README.md
- Node.js >= 18.0.0
- MongoDB (local or Atlas)
- Razorpay account (for payments)
# Install all dependencies
npm run install:all
# Or install individually
cd frontend && npm install
cd ../backend && npm install- Copy the environment template:
cd backend
cp .env.example .env- Update
.envwith your credentials:
MONGODB_URI- MongoDB connection stringRAZORPAY_KEY_ID/RAZORPAY_KEY_SECRET- Razorpay API keysEMAIL_USER/EMAIL_PASSWORD- Gmail App Password
# Start backend (from root)
npm run dev:backend
# Start frontend (from root)
npm run dev:frontend
# Or run from individual directories
cd backend && npm run dev
cd frontend && npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check |
| POST | /api/donations |
Create donation |
| GET | /api/donations |
List donations |
| GET | /api/donations/total |
Get donation stats |
| POST | /api/payments/create-order |
Create Razorpay order |
| POST | /api/payments/verify-payment |
Verify Razorpay payment |
| POST | /api/payments/create-upi-order |
Create UPI QR order |
- Helmet - Security headers (XSS, HSTS, etc.)
- Rate Limiting - 100 req/15min (API), 10 req/15min (payments)
- Input Validation - express-validator on all endpoints
- Structured Logging - Winston with request ID tracking
- CORS - Configured for specific origins
Frontend: React 18, Vite, TailwindCSS, Framer Motion Backend: Express.js, MongoDB, Razorpay, Nodemailer, Puppeteer