π Live App: https://studysense-ai.vercel.app
StudySense AI turns your documents into an interactive study space. Upload your notes or any PDF and it generates quizzes to test you. If you get stuck on a question or have a doubt, you can ask the AI directly from the same document. It also provides quick summaries and helps you manage all your study material in one place. Built mainly for students, but works for anyone who wants to learn or remember things faster.
![]() |
![]() |
![]() |
![]() |
- π§ AI-Powered Quiz Generation: Automatically generate quizzes from your study documents using Gemini AI
- β Interactive Chat: Ask AI doubts directly from your document to clarify concepts and get explanations
- π Document Summarization: Get AI-generated summaries of your study materials for faster revision
- π₯ Quiz Streak System: To build daily study consistency
- π Quiz Tracking: Track quiz performance and view detailed results
- ποΈ Activity Dashboard: Monitor your study activity and overall progress
- ποΈ Organized Document Hub: Manage and access all uploaded documents in one place
- π Semantic Search: Find relevant content using vector-based document search
- π± Fully Responsive UI: Smooth experience on desktop and mobile
- React 19 - UI library
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- React Router - Client-side routing
- React Hook Form - Form state management
- Axios - HTTP client
- React Markdown - Markdown rendering
- Lucide React - Icon library
- React Hot Toast - Toast notifications
- Node.js - JavaScript runtime
- Express 5 - Web framework
- MongoDB - Database
- Mongoose - MongoDB object modeling
- Gemini API (Google Generative AI) - LLM for quiz generation, summaries, and Q&A
- JWT - Authentication
- Bcrypt - Password hashing
- Multer - File upload handling
- PDF-Parse - PDF text extraction
- Gemini Embedding Model - Vector embeddings generation
- MongoDB Vector Index - Semantic search and context retrieval
- RAG (Retrieval Augmented Generation) - Document-based AI responses
- AWS S3 - Document storage
- AWS S3 Presigned URLs - Secure, time-limited document access
Before running this application, ensure you have:
- Node.js (v16 or higher)
- npm or yarn package manager
- MongoDB (local or Atlas account)
- Google Gemini API Key (for AI features)
- AWS S3 Bucket with credentials (for cloud storage)
Clone the repository:
git clone https://github.com/vividron/studysense-ai.git
cd studysense-ai# Backend
cd backend
npm install# Frontend
cd frontend
npm installCreate a .env file
#frontend
VITE_API_BASE_URL=http://localhost:8000#backend
FRONTEND_URL=http://localhost:5173
PORT=8000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
# Gemini
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-2.5-flash-lite
GEMINI_EMBEDDING_API_KEY=your_gemini_embedding_api_key
EMBEDDING_MODEL=gemini-embedding-001
# AWS S3
AWS_BUCKET_NAME=your_s3_bucket_name
AWS_REGION=your_s3_bucket_region
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_keycd backend
npm run devcd frontend
npm run devPOST /signup- Register a new userPOST /signin- Login userPOST /logout- Logout user
GET /- Get all user documentsPOST /upload- Upload a new documentGET /:id- Get document detailsDELETE /:id- Delete a document
POST /chat- Chat about documentsPOST /summarize- Generate document summary
GET /- Get all quizzesPOST /generate- Generate quiz from documentGET /:id- Get quiz detailsPOST /:id/submit- Submit quiz answersDELETE /:id- Delete a quiz
GET /- Get user activity statsGET /streak- Get study streak information
studysense-ai/
βββ backend/
β βββ config/ # Configuration files
β β βββ aws.js # AWS S3 setup
β β βββ db.js # MongoDB connection
β β βββ multer.js # File upload config
β βββ controllers/ # Request handlers
β β βββ activityController.js
β β βββ aiController.js
β β βββ authController.js
β β βββ documentController.js
β β βββ quizController.js
β βββ middleware/ # Express middleware
β β βββ authMiddleware.js
β β βββ errorHandler.js
β βββ models/ # Database schemas
β β βββ chat.js
β β βββ document.js
β β βββ quiz.js
β β βββ user.js
β βββ routes/ # API routes
β β βββ activityRoutes.js
β β βββ aiRoutes.js
β β βββ authRoutes.js
β β βββ documentRoutes.js
β β βββ quizRoutes.js
β βββ utils/ # Utility functions
β β βββ AppError.js
β β βββ fileSizeFormatter.js
β β βββ geminiService.js
β β βββ pdfParser.js
β β βββ quizStreakHelper.js
β β βββ textChunker.js
β βββ uploads/ # Local uploads directory
β βββ package.json
β βββ server.js # Entry point
β
βββ frontend/
βββ src/
β βββ api/ # API integration
β β βββ activity.api.js
β β βββ ai.api.js
β β βββ auth.api.js
β β βββ document.api.js
β β βββ quiz.api.js
β β βββ config/
β β βββ axios.js
β β βββ utils/
β βββ assets/ # Static assets
β β βββ fonts/
β βββ components/ # Reusable React components
β β βββ document-detail/
β β βββ documents/
β β βββ layout/
β β βββ quizzes/
β β βββ Button.jsx
β β βββ DeleteConfimModal.jsx
β β βββ Loader.jsx
β β βββ ProtectedRoute.jsx
β β βββ StatCard.jsx
β β βββ Tabs.jsx
β βββ context/ # React Context
β β βββ authContext.jsx
β βββ pages/ # Page components
β β βββ auth/
β β βββ documents/
β β βββ quizzes/
β β βββ ActivityPage.jsx
β β βββ ProfilePage.jsx
β βββ schemas/ # Validation schemas
β β βββ authSchema.js
β βββ App.jsx
β βββ index.css
β βββ main.jsx
βββ eslint.config.js
βββ package.json
βββ vite.config.js
βββ vercel.json
βββ README.md
βββ index.html
Contributions are welcome! Please feel free to submit a Pull Request.
For issues, questions, or suggestions, please open an issue on the repository.
Happy Studying! π



