A comprehensive AI-powered study assistant application to help students learn more effectively.
- User Authentication: Secure login/register with email verification and password reset
- Category-based Setup: Different flows for school students, college students, working professionals, and research scholars
- Personalized Study Plans: AI-generated study plans based on user goals and current performance
- Study Timer: Pomodoro technique implementation with focus sessions
- Flashcards: Spaced repetition learning system
- Notes Management: Organized note-taking with tags and subjects
- Drawing Board: Miro-like drawing board for flowcharts and visual learning
- Progress Analytics: Detailed analytics and progress tracking
- Mock Tests: AI-generated practice tests and assessments
- Study Groups: Collaborative learning spaces
- Calendar Integration: Study scheduling and deadline tracking
- Focus Music: Curated music and sounds for concentration
- Text Summarizer: AI-powered text summarization tool
- AI Doubt Solver: Get instant solutions to academic questions
- Multiple AI Providers: Support for OpenAI, Hugging Face, Roq, and mock services
- Smart Study Plans: Personalized recommendations based on user profile
- Intelligent Summarization: Extract key points from study materials
- Doubt Resolution: Step-by-step solutions with explanations
- Frontend: React 18 with TypeScript, Tailwind CSS, Framer Motion
- Backend: Node.js with Express, SQLite database
- Authentication: JWT-based authentication with bcrypt password hashing
- Email: Nodemailer for email verification and password reset
- Security: Helmet, CORS, rate limiting, input validation
- AI Integration: Configurable AI services with fallback support
- Node.js (v16 or higher)
- Git
git clone <repository-url>
cd study-assistant-appnpm installcd server
npm install
cd ..-
Copy environment file:
cd server cp .env.example .env -
Edit
.envfile with your configuration:# JWT Secret (Generate a strong secret key) JWT_SECRET=your_super_secret_jwt_key_here_make_it_long_and_random # Email Configuration (Optional - for password reset and verification) EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_app_password # Client URL CLIENT_URL=http://localhost:5173 # Server Port PORT=3001 # AI API Configuration (Choose one) # OpenAI Configuration OPENAI_API_KEY=your_openai_api_key_here OPENAI_MODEL=gpt-3.5-turbo # Hugging Face Configuration (Alternative to OpenAI) HUGGINGFACE_API_KEY=your_huggingface_api_key_here HUGGINGFACE_MODEL=microsoft/DialoGPT-medium # Roq Configuration (Alternative AI service) ROQ_API_KEY=your_roq_api_key_here ROQ_API_URL=https://api.roq.ai # AI Service Provider (openai, huggingface, roq, or mock) AI_PROVIDER=mock
The app works with mock AI services by default. To enable real AI features:
- Get API key from OpenAI
- Set
OPENAI_API_KEYandAI_PROVIDER=openaiin.env
- Get API key from Hugging Face
- Set
HUGGINGFACE_API_KEYandAI_PROVIDER=huggingfacein.env
- Get API key from your Roq provider
- Set
ROQ_API_KEYandAI_PROVIDER=roqin.env
For password reset and email verification features:
- Gmail Setup:
- Enable 2-factor authentication on your Gmail account
- Generate an App Password: Google Account β Security β App passwords
- Use the app password in the
EMAIL_PASSfield
Terminal 1 - Backend:
cd server
npm run devTerminal 2 - Frontend:
npm run devnpm run serverThen in another terminal:
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
- Health Check: http://localhost:3001/api/health
study-assistant-app/
βββ src/ # Frontend source code
β βββ components/ # Reusable React components
β βββ contexts/ # React contexts (Auth, etc.)
β βββ pages/ # Page components
β βββ main.tsx # App entry point
βββ server/ # Backend source code
β βββ server.js # Express server
β βββ ai-service.js # AI service integration
β βββ package.json # Backend dependencies
β βββ .env.example # Environment variables template
βββ public/ # Static assets
βββ package.json # Frontend dependencies
βββ README.md # This file
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current userPUT /api/auth/update-profile- Update user profilePOST /api/auth/forgot-password- Password reset request
POST /api/ai/generate-study-plan- Generate personalized study planPOST /api/ai/summarize- Text summarization
POST /api/doubts/ask- Ask a question and get AI solutionGET /api/doubts/history- Get user's doubt historyGET /api/doubts/:id- Get specific doubt solution
GET /api/health- Server health status and configuration
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintcd server
npm run dev # Start development server with nodemon
npm start # Start production serverThe application uses SQLite and automatically creates the following tables:
users- User accounts and profilesstudy_sessions- Study session trackingflashcards- Flashcard datanotes- User notes and study materialsstudy_groups- Study group informationstudy_group_members- Study group membershipsdoubts- User questions and AI solutions
- Basic study tools and timers
- Simple flashcards and notes
- Grade-appropriate content
- Advanced study planning
- Subject-specific organization
- Collaboration features
- Skill-based learning paths
- Time-efficient study methods
- Career-focused content
- Research-oriented tools
- Advanced analytics
- Academic collaboration features
-
Backend Connection Error:
- Ensure backend server is running on port 3001
- Check if JWT_SECRET is set in
.env - Verify all dependencies are installed
-
AI Features Not Working:
- Check AI_PROVIDER setting in
.env - Verify API keys are correct
- App falls back to mock services automatically
- Check AI_PROVIDER setting in
-
Email Not Working:
- Verify email credentials in
.env - Check Gmail app password setup
- Email features are optional for basic functionality
- Verify email credentials in
-
Frontend Not Loading:
- Ensure all dependencies are installed:
npm install - Check if backend is running
- Verify CORS configuration
- Ensure all dependencies are installed:
-
Database Reset:
rm server/study_assistant.db # Restart server to recreate database -
Clear Browser Data:
- Clear localStorage and cookies for fresh start
-
Check Logs:
- Backend logs appear in terminal
- Frontend errors in browser console
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For issues and questions:
- Check the troubleshooting section
- Review the code comments
- Create an issue in the repository
- Real-time collaboration features
- Mobile app development
- Advanced AI tutoring
- Integration with learning management systems
- Offline functionality
- Voice-to-text note taking
- Advanced analytics dashboard