Live Demo: https://study-helper-six.vercel.app/
Study Helper is a full-stack AI-powered study assistant web application. It helps users learn smarter with features like AI chat, quiz generation, flashcards, PDF summarization, and more. The project is built with a modern React + TypeScript frontend and a Node.js + Express + TypeScript backend, integrating OpenAI and Gemini APIs for advanced AI capabilities.
- User Authentication: Secure registration, login, JWT-based sessions, and protected routes.
- Dashboard: Personalized dashboard with access to all study features.
- AI Chat: Chat with AI for study help, explanations, and Q&A.
- Quiz Generator: Create custom quizzes from text or documents.
- Flashcards: Generate flashcards for efficient revision.
- PDF Summarization: Upload PDFs and get AI-generated summaries.
- Usage Stats: Track your study activity and usage.
- Responsive UI: Mobile-friendly, animated landing page, and modern design.
- API Integrations: Uses OpenAI and Gemini APIs for AI features.
- Frontend: React, TypeScript, Vite, Tailwind CSS
- Backend: Node.js, Express, TypeScript, MongoDB
- APIs: OpenAI API, Gemini API (API keys required)
- Deployment: Vercel (frontend), Render (backend)
- Frontend:
- SPA (Single Page Application) using React Router for navigation
- State management via React Context and hooks
- API calls to backend for authentication and study features
- Environment variables for API URLs and keys
- Backend:
- RESTful API with Express
- JWT authentication middleware
- MongoDB for user and study data
- Modular controllers, routes, and middlewares
- CORS configured for frontend domain
- Environment variables for secrets and API keys
- Node.js (v18+ recommended)
- npm
- MongoDB (local or cloud)
- OpenAI API key
- Gemini API key
- Clone the repo:
git clone https://github.com/satyam0777/Study-helper.git cd Study-helper/studyhelper-backend - Install dependencies:
npm install
- Configure environment: Create a
.envfile:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret JWT_EXPIRES_IN=7d OPENAI_API_KEY=your_openai_api_key GEMINI_API_KEY=your_gemini_api_key
- Start the backend:
npm run dev
- Go to the frontend folder:
cd ../frontend - Install dependencies:
npm install
- Configure environment: Create a
.envfile:VITE_API_URL=http://localhost:5000/api VITE_OPENAI_API_KEY=your_openai_api_key VITE_GEMINI_API_KEY=your_gemini_api_key
- Start the frontend:
npm run dev
- Deploy the backend to Render.
- Set environment variables in the Render dashboard.
- Example backend URL:
https://study-helper-m0zo.onrender.com
- Deploy the frontend to Vercel.
- Set
VITE_API_URLin Vercel dashboard to your backend URL. - Add a
vercel.jsonfile for SPA routing:{ "rewrites": [ { "source": "/((?!.*\\..*).*)", "destination": "/" } ] }
POST /api/auth/register— Register a new userPOST /api/auth/login— LoginGET /api/auth/profile— Get user profile (protected)PUT /api/auth/profile— Update profile (protected)GET /api/auth/usage— Get usage stats (protected)
POST /api/ai/chat— AI chatPOST /api/ai/quiz— Generate quizPOST /api/ai/flashcards— Generate flashcardsPOST /api/ai/summarize— Summarize PDF- Other endpoints for chat, study sessions, etc.
MONGO_URI— MongoDB connection stringJWT_SECRET— JWT secret keyJWT_EXPIRES_IN— JWT expiration (e.g., 7d)OPENAI_API_KEY— OpenAI API keyGEMINI_API_KEY— Gemini API key
VITE_API_URL— Backend API base URLVITE_OPENAI_API_KEY— OpenAI API key (if used client-side)VITE_GEMINI_API_KEY— Gemini API key (if used client-side)
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/YourFeature) - Open a pull request
MIT
- Author: Satyam Prajapati
- GitHub: satyam0777
- Live Demo: https://study-helper-six.vercel.app/