AI-Powered Study Platform - Transform your learning experience with intelligent flashcards, adaptive quizzes, and personalized study plans.
StudyForge is a comprehensive AI-powered study platform designed to revolutionize how students learn and retain information. Built with modern web technologies and powered by Google Gemini AI, StudyForge offers intelligent flashcard generation, adaptive quizzes, document summarization, and personalized study planning.
- ๐ค AI-Powered Learning - Leverage Google Gemini AI for intelligent content generation
- ๐ Smart Flashcards - Auto-generate flashcards from documents, text, or topics
- ๐ฎ Adaptive Quizzes - Dynamic difficulty adjustment based on performance
- ๐ Analytics Dashboard - Track progress with detailed insights and visualizations
- ๐ Study Planner - Organize your learning with customizable study schedules
- ๐ฌ AI Chat Assistant - Get instant help with your study questions
- ๐ Dark Mode - Beautiful UI with light/dark theme support
- ๐ฑ Responsive Design - Seamless experience across all devices
๐ Coming Soon - Project will be deployed shortly!
- AI Flashcard Generation - Generate flashcards from text, documents (PDF, DOCX), or topics
- Spaced Repetition System - Optimize retention with scientifically-proven review intervals
- Adaptive Quiz Mode - Dynamic difficulty adjustment based on real-time performance
- Quiz of the Day - Daily challenges to keep learning consistent
- Study Planner - Create and manage personalized study schedules
- Document Summarization - Extract key insights from PDFs and Word documents
- AI Chat Assistant - Interactive learning companion for instant help
- Context-Aware Conversations - AI dynamically tracks user XP, study plans, and historical context
- Resilient AI Infrastructure - Auto-failover to backup models during high-traffic 503 overloads (Gemini 3.1 Flash Lite -> Gemini 2.5 Flash)
- Smart Chat Sessions - Automatically generates concise, relevant titles for new chats
- Code Generator - Generate code snippets with explanations and run them instantly
- Bulk Quiz Generation - Create multiple quizzes simultaneously
- Smart Hints - Context-aware hints during quizzes
- Mastery Charts - Visualize your learning progress by category
- Review Heatmap - Track study consistency over time
- Streak Display - Maintain daily study streaks
- Performance Insights - Detailed analytics on quiz performance
- Weak Area Recommendations - AI-suggested focus areas
- Dark/Light Theme - Customizable appearance
- Keyboard Shortcuts - Efficient navigation for power users
- Export Options - Download flashcards as PDF or DOCX
- Share Quizzes - Collaborate with friends via shareable links
- Email Verification - Secure account activation
- Password Reset - Secure password recovery flow
- JWT Authentication - Secure session management
- Rate Limiting - Protection against abuse
- Account Lockout - Brute-force attack prevention
- Framework: React 18.3.1 with TypeScript
- Routing: Wouter (lightweight React router)
- State Management: TanStack Query (React Query)
- UI Components: Radix UI primitives
- Styling: Tailwind CSS with custom animations
- Forms: React Hook Form with Zod validation
- Charts: Recharts for data visualization
- Animations: Framer Motion
- Runtime: Node.js with Express.js
- Language: TypeScript
- Database: PostgreSQL with Drizzle ORM
- Authentication: Passport.js with JWT
- Session Management: Express Session with Redis/File Store
- Email: Nodemailer with SMTP
- File Upload: Multer
- Security: Helmet, CORS, Rate Limiting
- Primary AI: Google Gemini 3.1 Flash Lite Preview
- Fallback AI: Google Gemini 2.5 Flash (for high availability failover)
- Document Processing: PDF-Parse, Mammoth (DOCX)
- Caching: Redis for AI response caching
- Build Tool: Vite
- Package Manager: npm
- Database Migrations: Drizzle Kit
- Testing: Vitest with Fast-Check (property-based testing)
- Code Quality: TypeScript strict mode
- Bundler: esbuild for production builds
Before you begin, ensure you have the following installed:
- Node.js (v20.0.0 or higher)
- npm (v10.0.0 or higher)
- PostgreSQL (v14.0 or higher)
- Redis (optional, for caching)
git clone https://github.com/Dipendra2003/StudyForge.git
cd StudyForgenpm installCreate a .env file in the root directory:
cp .env.example .envEdit .env and configure the following required variables:
# Database
DATABASE_URL=postgres://postgres:password@localhost:5432/studyforge
# JWT Authentication
JWT_SECRET=your-super-secret-jwt-key-min-32-chars-long
# Google Gemini AI
GEMINI_API_KEY=your-gemini-api-key-here
# JDoodle API for Code Execution (Optional)
JDOODLE_CLIENT_ID=your-jdoodle-client-id
JDOODLE_CLIENT_SECRET=your-jdoodle-client-secret
# Email (Optional but recommended)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password๐ก Tips:
- Get your Gemini API key from Google AI Studio
- Get JDoodle credentials from JDoodle Compiler API (Free tier: 200 requests/day)
# Generate database migrations
npm run db:generate
# Run migrations
npm run db:migrate
# Or push schema directly (for development)
npm run db:pushnpm run devThe application will be available at http://localhost:5000
If you prefer Docker, you can run the entire stack with a single command.
- Docker (v20.10 or higher)
- Docker Compose (v2.0 or higher โ included with Docker Desktop)
-
Copy the Docker environment template:
cp .env.docker .env
-
Edit
.envand set your required variables:JWT_SECRETโ generate with:node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"GEMINI_API_KEYโ from Google AI Studio
-
Start all services:
npm run docker:dev
This starts:
- ๐ข App โ Node.js server with hot-reload at
http://localhost:5000 - ๐ PostgreSQL โ Database at
localhost:5432 - ๐ด Redis โ Cache at
localhost:6379
- ๐ข App โ Node.js server with hot-reload at
-
View logs:
npm run docker:logs
-
Stop everything:
npm run docker:down
# Set NODE_ENV and configure production values in .env, then:
npm run docker:prodThis adds an Nginx reverse proxy on port 80 with gzip compression, rate limiting, and SSL-ready configuration.
| Command | Description |
|---|---|
npm run docker:dev |
Start development environment |
npm run docker:prod |
Start production environment (detached) |
npm run docker:down |
Stop and remove all containers |
npm run docker:logs |
Follow application logs |
- Navigate to Flashcards - Click "Flashcards" in the sidebar
- Create a Deck - Click "Create New Deck" and give it a name
- Add Flashcards - Choose from:
- Manual entry
- AI generation from text
- Upload a document (PDF/DOCX)
- Start Studying - Click "Study" to begin your learning session
- Go to Quiz Mode - Select "Quiz Mode" from the navigation
- Configure Quiz - Choose:
- Number of questions
- Difficulty level
- Categories
- Start Quiz - Answer questions and watch difficulty adapt to your performance
- Review Results - Analyze your performance and weak areas
- Open Chat - Click "Chat" in the sidebar
- Ask Questions - Type your study-related questions
- Get Instant Help - Receive AI-powered explanations and guidance
- Navigate to Study Planner - Click "Study Planner"
- Create Plan - Set goals, deadlines, and topics
- Add Study Items - Break down your plan into manageable tasks
- Track Progress - Mark items complete as you study
studyforge/
โโโ client/ # Frontend React application
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ quiz/ # Quiz-specific components
โ โ โ โโโ chat/ # Chat interface components
โ โ โ โโโ ui/ # Base UI components (Radix)
โ โ โโโ contexts/ # React contexts (Auth, etc.)
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ lib/ # Utility libraries
โ โ โโโ pages/ # Page components
โ โ โโโ App.tsx # Main app component
โ โโโ index.html # HTML entry point
โ โโโ vite.config.ts # Vite configuration
โ
โโโ server/ # Backend Express application
โ โโโ config/ # Configuration files
โ โโโ db/ # Database schemas and migrations
โ โโโ middleware/ # Express middleware
โ โโโ routes/ # API route handlers
โ โโโ services/ # Business logic services
โ โ โโโ gemini.ts # Gemini AI integration
โ โ โโโ quiz-of-the-day.service.ts
โ โ โโโ batch-quiz-generator.ts
โ โโโ utils/ # Utility functions
โ โโโ index.ts # Server entry point
โ โโโ routes.ts # Route definitions
โ
โโโ shared/ # Shared code between client/server
โ โโโ schema.ts # Database schema (Drizzle)
โ โโโ quiz-types.ts # Shared TypeScript types
โ
โโโ db/ # Database migrations
โ โโโ migrations/
โ
โโโ .env.example # Environment variables template
โโโ package.json # Dependencies and scripts
โโโ tsconfig.json # TypeScript configuration
โโโ tailwind.config.js # Tailwind CSS configuration
โโโ vite.config.ts # Vite build configuration
| Variable | Description | Example |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgres://... |
| JWT_SECRET | JWT signing secret (min 32 chars) | your-secret-key |
| GEMINI_API_KEY | Google Gemini API key | AIza... |
| Variable | Description | Default |
|---|---|---|
JDOODLE_CLIENT_ID |
JDoodle API client ID for code execution | - |
JDOODLE_CLIENT_SECRET |
JDoodle API client secret | - |
SMTP_HOST |
Email SMTP server | smtp.gmail.com |
SMTP_PORT |
SMTP port | 587 |
SMTP_USER |
SMTP username | - |
SMTP_PASSWORD |
SMTP password | - |
REDIS_HOST |
Redis host for caching | localhost |
REDIS_PORT |
Redis port | 6379 |
API_PORT |
Server port | 5000 |
NODE_ENV |
Environment mode | development |
See .env.example for complete configuration options.
POST /api/auth/register # Register new user
POST /api/auth/login # Login user
POST /api/auth/logout # Logout user
POST /api/auth/refresh # Refresh JWT token
POST /api/auth/forgot-password # Request password reset
POST /api/auth/reset-password # Reset password
POST /api/auth/verify-email # Verify email address
GET /api/auth/me # Get current user
GET /api/flashcards # Get all flashcards
POST /api/flashcards # Create flashcard
GET /api/flashcards/:id # Get flashcard by ID
PUT /api/flashcards/:id # Update flashcard
DELETE /api/flashcards/:id # Delete flashcard
POST /api/flashcards/generate # AI-generate flashcards
POST /api/flashcards/bulk # Bulk create flashcards
GET /api/quizzes # Get all quizzes
POST /api/quizzes/generate # Generate AI quiz
POST /api/quizzes/submit # Submit quiz answers
GET /api/quizzes/history # Get quiz history
GET /api/quizzes/qotd # Get Quiz of the Day
POST /api/quizzes/share # Share quiz
GET /api/quizzes/shared/:linkId # Get shared quiz
GET /api/study-plans # Get all study plans
POST /api/study-plans # Create study plan
GET /api/study-plans/:id # Get study plan by ID
PUT /api/study-plans/:id # Update study plan
DELETE /api/study-plans/:id # Delete study plan
POST /api/ai/chat # Chat with AI assistant
POST /api/ai/summarize # Summarize document
POST /api/ai/generate-code # Generate code snippet
GET /api/analytics/dashboard # Get dashboard stats
GET /api/analytics/progress # Get learning progress
GET /api/analytics/heatmap # Get study heatmap
GET /api/analytics/mastery # Get mastery by category
npm testnpm run test:e2enpm run test:uinpm run checknpm run buildThis will:
- Build the frontend with Vite
- Bundle the backend with esbuild
- Output to
dist/directory
npm start- User authentication and authorization
- Flashcard creation and management
- AI-powered flashcard generation
- Basic quiz functionality
- Study planner
- Adaptive quiz difficulty
- AI chat assistant
- Document summarization
- Code generation
- Quiz of the Day
- Study groups and collaboration
- Public flashcard marketplace
- Leaderboards and competitions
- Social sharing and profiles
- Comments and discussions
- Mobile app (React Native)
- Offline mode with sync
- Video content integration
- Gamification system
- Advanced analytics with ML insights
- Multi-language support
- API for third-party integrations
We welcome contributions from the community! Here's how you can help:
-
Fork the repository
git clone https://github.com/Dipendra2003/StudyForge.git
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
- Write clean, documented code
- Follow the existing code style
- Add tests for new features
-
Commit your changes
git commit -m "Add amazing feature" -
Push to your branch
git push origin feature/amazing-feature
-
Open a Pull Request
- Describe your changes clearly
- Reference any related issues
- Wait for review and feedback
- Follow TypeScript best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
- Keep PRs focused on a single feature/fix
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and grow
- Follow project guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 StudyForge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Dipendra Kumar
- GitHub: @Dipendra2003
- LinkedIn: Dipendra Kumar
- Email: dipendrak299@gmail.com
- Portfolio: portfolio-dipendra.vercel.app
- Google Gemini AI - For powering our AI features
- Radix UI - For accessible component primitives
- Tailwind CSS - For the utility-first CSS framework
- Drizzle ORM - For type-safe database operations
- React Community - For amazing tools and libraries
Need help? Feel free to reach out!
- ๐ง Email: dipendrak299@gmail.com
- Issues: GitHub Issues
If you find StudyForge helpful, please consider:
- โญ Starring the repository
- ๐ Reporting bugs
- ๐ก Suggesting new features
- ๐ค Contributing to the codebase
- ๐ข Sharing with friends and colleagues