Official web platform for Aviyukt NGO with:
Aviyukt NGO is a community-focused platform designed to present social initiatives and support operational workflows like onboarding, donations, and user profile access.
The platform supports:
- Google-only authentication
- Donation and membership payments via Razorpay
- Payment verification and history lookup
- Contact email capture
- NGO service showcase pages and team/credits sections
- Google OAuth sign-in (no email/password auth flow)
- Session handling with JWT in HTTP-only cookies
- Donation flow and membership payment flow
- Razorpay order creation and signature verification
- Receipt generation (PDF) on the frontend after successful payment
- Payment history lookup by Aadhaar number
- Contact/volunteer form email capture
- Service pages across agriculture, health, education, legal/insurance, and household support
- Responsive UI with React Router-based navigation
The platform currently highlights the following service categories:
- Agriculture
- Medicine
- Health
- Placement
- Education
- Rental Work
- Property (Purchase, Loan, Registry, Mutation)
- Insurance (Legal and Court Case Work)
- Household Services
Aviyuktngo/
|- frontend/
| |- src/
| | |- Components/
| | |- context/
| | |- data/
| | |- instant/
| | |- pages/
| | |- routes/
| |- package.json
| |- vite.config.js
| |- vercel.json
|- BackEnd/
| |- src/
| | |- controller/
| | |- db/
| | |- middleware/
| | |- models/
| | |- routes/
| | |- app.js
| |- server.js
| |- package.json
|- README.md
- Node.js 18+
- npm
- MongoDB connection string
- Razorpay test/live keys
- Google OAuth Client ID
cd BackEnd
npm installCreate BackEnd/.env:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
GOOGLE_CLIENT_ID=your_google_client_id
FRONTEND_URLS=http://localhost:5173,https://your-frontend-domain.com
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
NODE_ENV=developmentStart backend:
npm startBackend default URL: http://localhost:3000
cd frontend
npm installCreate frontend/.env:
VITE_API_BASE_URL=http://localhost:3000
VITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_RAZORPAY_KEY_ID=your_razorpay_key_idStart frontend:
npm run devFrontend default URL: http://localhost:5173
| Variable | Required | Purpose |
|---|---|---|
PORT |
No | API server port (default: 3000) |
MONGO_URI |
Yes | MongoDB connection string |
JWT_SECRET |
Yes | JWT signing secret |
GOOGLE_CLIENT_ID |
Yes | Google OAuth token audience verification |
FRONTEND_URLS |
Recommended | Comma-separated CORS allowlist additions |
RAZORPAY_KEY_ID |
Yes (payments) | Razorpay key ID for order creation |
RAZORPAY_KEY_SECRET |
Yes (payments) | Razorpay key secret for signature verification |
NODE_ENV |
Recommended | Cookie behavior (production enables secure cookie flags) |
Default CORS frontend origins already included in code:
http://localhost:5173https://aviyuktngo.vercel.apphttps://www.aviyuktngo.org
| Variable | Required | Purpose |
|---|---|---|
VITE_API_BASE_URL |
Yes | Backend base URL for API calls |
VITE_GOOGLE_CLIENT_ID |
Optional | Google OAuth client ID (if omitted, frontend fetches from backend) |
VITE_RAZORPAY_KEY_ID |
Yes (payments) | Razorpay publishable key used in checkout |
npm run dev # start Vite dev server
npm run build # build production bundle
npm run lint # lint source
npm run preview # preview production buildnpm start # run server.jsBase URL (local): http://localhost:3000
| Method | Route | Description |
|---|---|---|
GET |
/google-client-id |
Returns configured Google client ID |
POST |
/google |
Verifies Google ID token, upserts user, sets auth cookie |
GET |
/me |
Returns current logged-in user (requires token/cookie) |
POST |
/logout |
Clears auth cookie |
| Method | Route | Description |
|---|---|---|
POST |
/email |
Stores contact email in DB |
| Method | Route | Description |
|---|---|---|
POST |
/paymentcreate |
Creates Razorpay order and stores pending payment |
POST |
/paymentverify |
Verifies Razorpay signature and marks payment completed |
POST |
/payHistory |
Returns payment history by Aadhaar number |
name(required)email(required, unique)profilePicgoogleId(unique, sparse)- timestamps
orderId(required)paymentIdsignatureamount(required)currency(required)- donor/member details:
name,email,adhar,address,occupation,street,city,state,pincode,gender status(pending/completed)- timestamps
email(required)- timestamps
- Google-only authentication flow
- Backend verifies Google ID token audience with
GOOGLE_CLIENT_ID - JWT token is issued and stored in HTTP-only cookie (
token) - Auth middleware accepts cookie token or
Authorization: Bearer <token> - In production, cookie settings use
secure: trueandsameSite: None - CORS is origin-restricted using defaults +
FRONTEND_URLS
Important production recommendations:
- Use HTTPS for frontend and backend
- Use strong
JWT_SECRET - Never commit
.envfiles - Protect and rotate Razorpay keys as needed
- Frontend is Vercel-ready (
frontend/vercel.jsonhas SPA rewrite) - Backend can be deployed on Render, Railway, VPS, or any Node host
- Ensure all required env variables are configured in deployment platform
- Keep frontend
VITE_API_BASE_URLpointed to deployed backend URL
- President: Narayan Kumar Shrivastav
- Vice President: Vijay Kumar khare
- Secretary: Brajesh Pratap Singh
- Joint Secretary: Dr. Sukrati shrivastava
- Treasurer: Sapna Shrivastava
- Board Member: Awadh Bihari Gautam
- Board Member: Pankaj Kumar Panthi
- Anand Singh Chouhan - Founder and Visionary
- Ankesh Barhadiya - Co-Founder and Tech Lead
- Sameer Khan - Co-Founder and Tech Lead
- Deepti Lodhi - Co-Founder and Tech Lead
- Sameer Khan
- Email:
sameerkhan27560@gmail.com - LinkedIn:
https://www.linkedin.com/in/sameer-khan2210/
- Email:
- Email:
aviyuktngo@gmail.com - Phone:
+91 8770321854 - Location: Bhopal, India
Social links:
- Instagram:
https://www.instagram.com/aviyukt_samaja_sevi_sansthan - Facebook:
https://www.facebook.com/share/18ykXqs2ca/ - YouTube:
http://www.youtube.com/@Aviyuktngo
- Fork the repo
- Create a feature branch
- Make and test changes locally
- Open a pull request with clear description
Recommended before PR:
- Run frontend linting
- Validate auth flow
- Validate payment create + verify in Razorpay test mode
- Google login not appearing:
- Check
GOOGLE_CLIENT_IDin backend and/orVITE_GOOGLE_CLIENT_IDin frontend
- Check
- Unauthorized on
/api/auth/me:- Check cookie settings, CORS config, and
withCredentialsbehavior
- Check cookie settings, CORS config, and
- Payment create failing:
- Verify
RAZORPAY_KEY_IDandRAZORPAY_KEY_SECRETin backend
- Verify
- Payment verify failing:
- Ensure correct signature and order/payment IDs are sent
- No payment history:
- Aadhaar must be exactly 12 digits
- Backend currently uses
npm startonly (no nodemon script configured). - No automated tests are configured yet in this repository.