An AI-powered study platform that transforms how students learn by generating structured notes, quizzes, flashcards, diagrams, and mind maps from any study material in seconds.
π Live URL: https://notepilotislivenow.vercel.app/
NotePilot AI solves the problem of time-consuming manual note preparation by leveraging Google's Gemini AI to instantly generate comprehensive study materials. What used to take 20-30 minutes now happens in under 20 seconds.
- AI-Powered Content Generation: Generate notes, quizzes, flashcards, diagrams, revision sheets, and mind maps
- PDF Export: Download generated content as PDFs for offline study
- Secure Authentication: Firebase Authentication with JWT session management
- Credit-Based System: Stripe-powered credit purchase workflow for monetization
- History Tracking: Save and access all previously generated content
- Responsive Design: Works seamlessly on desktop, tablet, and mobile
- Interactive Visuals: Mermaid.js diagrams and Recharts visualizations
π NotePilot/
βββ π client/ # React Frontend
β βββ π public/
β β βββ logo.png
β βββ π src/
β β βββ π assets/ # Static assets (images, logos)
β β βββ π components/ # Reusable React components
β β β βββ FinalResult.jsx # Display generated content
β β β βββ Footer.jsx # Footer component
β β β βββ MermaidSetup.jsx # Mermaid diagram renderer
β β β βββ Navbar.jsx # Navigation bar
β β β βββ RechartSetUp.jsx # Chart visualizations
β β β βββ Sidebar.jsx # Side navigation
β β β βββ TopicForm.jsx # Input form for study topics
β β βββ π pages/ # Page components
β β β βββ Auth.jsx # Authentication page
β β β βββ History.jsx # Generation history
β β β βββ Home.jsx # Dashboard/homepage
β β β βββ Notes.jsx # Notes generation page
β β β βββ PaymentFailed.jsx # Failed payment page
β β β βββ PaymentSuccess.jsx# Success payment page
β β β βββ Pricing.jsx # Pricing plans
β β βββ π redux/ # State management
β β β βββ store.js # Redux store configuration
β β β βββ userSlice.js # User state slice
β β βββ π services/ # API service layer
β β β βββ api.js # API client configuration
β β βββ π utils/ # Utility functions
β β β βββ firebase.js # Firebase configuration
β β βββ App.css # Global styles
β β βββ App.jsx # Root component
β β βββ config.js # App configuration
β β βββ index.css # Tailwind entry
β β βββ main.jsx # Application entry point
β βββ .env # Environment variables
β βββ index.html # HTML template
β βββ package.json # Dependencies
β βββ vercel.json # Vercel deployment config
β βββ vite.config.js # Vite configuration
β
βββ π server/ # Node.js Backend
β βββ π controllers/ # Route controllers
β β βββ auth.controller.js # Authentication logic
β β βββ credits.controller.js # Credit management
β β βββ generate.controller.js# AI content generation
β β βββ notes.controller.js # CRUD for notes
β β βββ pdf.controller.js # PDF generation
β β βββ user.controller.js # User management
β βββ π middleware/ # Middleware functions
β β βββ isAuth.js # Authentication middleware
β βββ π models/ # Database schemas
β β βββ notes.model.js # Notes schema
β β βββ user.model.js # User schema
β βββ π routes/ # API routes
β β βββ auth.route.js # Authentication routes
β β βββ credits.route.js # Credit routes
β β βββ genrate.route.js # Generation routes
β β βββ pdf.route.js # PDF routes
β β βββ user.route.js # User routes
β βββ π services/ # Business logic
β β βββ gemini.services.js # Gemini AI integration
β βββ π utils/ # Utilities
β β βββ connectDB.js # MongoDB connection
β β βββ promptBuilder.js # AI prompt construction
β β βββ token.js # JWT token utilities
β βββ .env # Environment variables
β βββ index.js # Server entry point
β βββ package.json # Dependencies
β βββ README.md # Backend documentation
β
βββ README.md # Main documentation
- Node.js (v18+)
- MongoDB (or MongoDB Atlas)
- Firebase account (for authentication)
- Stripe account (for payments)
- Gemini API key
git clone https://github.com/tanishxdev/NotePilot.git
cd NotePilotcd server
npm installCreate .env file in /server:
PORT=5000
MONGODB_URI=mongodb://127.0.0.1:27017/notepilot
JWT_SECRET=your_jwt_secret_key
GEMINI_API_KEY=your_gemini_api_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_webhook_secretStart the backend server:
npm run dev # Development with auto-reload
# OR
npm start # Productioncd ../client
npm installCreate .env file in /client:
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_API_URL=http://localhost:5000/api
VITE_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_keyStart the frontend development server:
npm run devThe application will be available at http://localhost:5173
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Vite | Build tool |
| Tailwind CSS 4 | Styling |
| Redux Toolkit | State management |
| Firebase | Authentication |
| React Router DOM | Routing |
| Axios | HTTP client |
| Mermaid.js | Diagram rendering |
| Recharts | Data visualization |
| React Markdown | Markdown rendering |
| Framer Motion | Animations |
| Technology | Purpose |
|---|---|
| Node.js | Runtime |
| Express.js | Web framework |
| MongoDB + Mongoose | Database |
| JWT | Authentication |
| Stripe | Payment processing |
| Gemini API | AI content generation |
| PDFKit | PDF generation |
| Cookie-parser | Cookie handling |
| CORS | Cross-origin requests |
{
_id: ObjectId,
uid: String, // Firebase UID
email: String,
displayName: String,
photoURL: String,
credits: Number, // Available credits
createdAt: Date,
updatedAt: Date
}{
_id: ObjectId,
userId: ObjectId, // Reference to User
topic: String, // User's topic/query
contentType: String, // notes, quiz, flashcards, etc.
content: String, // Generated content (Markdown)
type: String, // 'saved' or 'generated'
createdAt: Date,
updatedAt: Date
}| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register |
Register new user |
| POST | /auth/login |
Login user |
| POST | /auth/logout |
Logout user |
| GET | /auth/me |
Get current user |
| POST | /auth/verify-token |
Verify JWT token |
| Method | Endpoint | Description |
|---|---|---|
| POST | /generate/notes |
Generate study notes |
| POST | /generate/quiz |
Generate quiz questions |
| POST | /generate/flashcards |
Generate flashcards |
| POST | /generate/mindmap |
Generate mind map |
| POST | /generate/diagram |
Generate diagram |
| POST | /generate/revision |
Generate revision sheet |
| Method | Endpoint | Description |
|---|---|---|
| GET | /credits/balance |
Get user credit balance |
| POST | /credits/purchase |
Purchase credits via Stripe |
| POST | /credits/webhook |
Stripe webhook handler |
| Method | Endpoint | Description |
|---|---|---|
| GET | /notes |
Get user's notes |
| POST | /notes |
Save generated note |
| GET | /notes/:id |
Get specific note |
| DELETE | /notes/:id |
Delete note |
| Method | Endpoint | Description |
|---|---|---|
| POST | /pdf/generate |
Generate PDF from content |
| Method | Endpoint | Description |
|---|---|---|
| GET | /user/profile |
Get user profile |
| PUT | /user/profile |
Update user profile |
| GET | /user/history |
Get generation history |
- 1 Credit = 1 AI generation request
- Pricing tiers:
- Starter: 50 credits - $5
- Pro: 150 credits - $12
- Premium: 500 credits - $35
- User selects pricing plan
- Redirected to Stripe checkout
- Payment confirmation (webhook)
- Credits added to user account
- User can generate content
- User Signup/Login via Firebase Auth
- Firebase returns ID token
- Token sent to backend
/auth/registeror/auth/login - Backend validates token and creates/updates user
- JWT generated and sent to client
- JWT used for all authenticated requests
- Middleware (
isAuth.js) validates JWT on protected routes
- Prompt Engineering: Custom prompts for each content type
- Gemini API Integration: Leverages Gemini 1.5 Pro
- Markdown Output: Consistent formatting across all content
- Diagrams: Mermaid.js for visual diagrams
- Charts: Recharts for data visualization
- Real-time Feedback: Loading states and progress indicators
- Responsive Design: Mobile-first approach
- Dark Mode: Eye-friendly dark theme
- Animations: Smooth transitions with Framer Motion
- Error Handling: Graceful error states and recovery
- Auto-save: All generated content automatically saved
- Search & Filter: Find previous generations
- Export: Download as PDF or share
We welcome contributions! Please see our Contributing Guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'feat: add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
- Frontend: ESLint + Prettier
- Backend: ESLint (Standard config)
cd server
npm install
npm startcd client
npm run build
# Deploy dist/ folderMake sure to set all environment variables in your deployment platform:
Frontend (Vercel):
- All
VITE_*variables
Backend (Render/Heroku):
- All server environment variables
- AI-powered question answering
- Collaborative study rooms
- Mobile app (React Native)
- Chrome extension for quick capture
- User-generated templates
- Integration with Google Drive/Notion
- Study analytics dashboard
- Voice-to-text input
- Multi-language support
- Community sharing feature
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini for AI capabilities
- Stripe for payment processing
- Firebase for authentication
- MongoDB for database services
- Vercel for hosting
- All open-source libraries and their maintainers
For support, questions, or feedback:
If you found this project helpful, please give it a β on GitHub!
Made with β€οΈ by Tanish Kumar