ExamNotesAI is a production-style AI-powered SaaS web application that allows users to generate smart exam notes using AI and purchase usage credits securely via Stripe.
This project demonstrates real-world backend architecture including secure authentication, payment gateway integration, webhook verification, and a credit-based transaction system.
β Implemented secure Google OAuth authentication using Firebase
β Designed JWT-protected backend architecture
β Integrated Stripe Checkout with webhook verification
β Built a credit-based payment system using Stripe metadata validation
β Integrated Google Gemini AI API for intelligent note generation
β Connected MongoDB Atlas for scalable cloud database storage
β Managed environment variables securely
β Designed SaaS-style backend architecture
This reflects real startup-level SaaS backend implementation.
- React (Vite)
- Firebase Authentication
- Axios
- Node.js
- Express.js
- MongoDB Atlas (Mongoose ODM)
- JWT Authentication
- Stripe API + Webhooks
- Google Gemini API
ExamNotesAI/
β
βββ client/ β React Frontend
βββ server/ β Node + Express Backend
βββ README.md
βββ .gitignore
git clone https://github.com/rajratan-rajput/ExamNotesAI.git
cd ExamNotesAIcd server
npm installCreate server/.env
PORT=8000
MONGODB_URL=your_mongodb_connection_string
JWT_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_api_key
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
CLIENT_URL=http://localhost:5173
Run backend:
npm run devcd client
npm installCreate client/.env
VITE_FIREBASE_APIKEY=your_firebase_api_key
Run frontend:
npm run devLogin Stripe CLI:
stripe loginStart webhook listener:
stripe listen --forward-to localhost:8000/api/credits/webhookCopy the whsec_ key into backend .env.
4242 4242 4242 4242
Any future date
Any 3-digit CVC
Any 5-digit ZIP
- Push repository to GitHub
- Connect repository to Render
- Add environment variables in dashboard
- Build command:
npm install
- Start command:
node index.js
- Connect GitHub repository
- Build command:
npm run build
- Output directory:
dist
- Add environment variable:
VITE_FIREBASE_APIKEY
- Stripe webhook signature verification
- JWT-protected routes
- Metadata-based secure credit allocation
- Environment-based secret management
- No sensitive keys exposed in frontend
- Idempotent webhook handling
- Payment transaction history logging
- Subscription-based billing
- Role-based access control
- Production Stripe live mode integration
- Cloud deployment optimization
Rajratan Rajput
GitHub: https://github.com/rajratan-rajput
Full Stack Developer | MERN Stack | Backend Engineering