A full-stack educational platform that uses RAG (Retrieval-Augmented Generation) and LLMs to help students learn from their own study materials β with AI tutoring, adaptive quizzes, exam simulations, flashcards, an AI study planner, and progress tracking.
| Feature | Description |
|---|---|
| AI Chat Tutor | Ask questions from your uploaded PDFs β answers grounded in your study material |
| Quiz Arena | AI-generated MCQs with adaptive difficulty based on your performance |
| Exam Room | Timed mock exams with countdown timer and instant scoring |
| Flashcards | Auto-generated flashcards from your notes for quick revision |
| AI Study Planner | Set exam dates and let AI map out daily study cards on a calendar |
| Paper Analysis | AI-powered topic extraction from past question papers |
| Progress Analytics | Track quizzes, scores, topic mastery with visual charts |
| Dashboard | Personalized overview with metrics, score trends, and quick actions |
| Feature | Description |
|---|---|
| Student Analytics | View all quiz attempts, filter by subject, monitor performance |
| Feature | Description |
|---|---|
| User Management | View, search, promote/demote roles, delete accounts |
| Question Paper Upload | Ingest past papers into the RAG knowledge base |
- Students β Access to all learning tools
- Faculty β Student analytics and performance monitoring
- Admin β Full access including user management and paper uploads
| Layer | Technology |
|---|---|
| Frontend | React 18 + TypeScript + Vite + Tailwind CSS |
| Backend API | FastAPI + Uvicorn |
| LLM | Groq API β LLaMA 3.3 70B Versatile |
| RAG Pipeline | LangChain + FAISS vector store + Sentence Transformers |
| Embeddings | all-MiniLM-L6-v2 (384-dim) |
| Database | SQLite (users, quiz attempts, documents, progress) |
| Auth | bcrypt password hashing + Google OAuth |
| PDF Processing | pdfplumber + PyPDF2 |
| Reports | ReportLab PDF generation |
- Python 3.10+
- Node.js 18+ and npm
- A free Groq API Key
git clone https://github.com/YOUR_USERNAME/edusathi.git
cd edusathi# Create and activate a virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt# Copy the example env file
cp .env.example .env # macOS/Linux
copy .env.example .env # WindowsEdit .env and add your keys:
GROQ_API_KEY=gsk_your_groq_api_key_here
DB_PATH=./data/users.db
VECTOR_STORE_DIR=./data/vector_stores
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
LLM_MODEL=llama-3.3-70b-versatile
SECRET_KEY=change_this_to_a_random_secret
APP_ENV=production
VITE_GOOGLE_CLIENT_ID=your_google_client_id_herecd frontend
npm install
cd ..You need two terminals running simultaneously:
Terminal 1 β Backend API (FastAPI):
uvicorn backend.main:app --reload --port 8000Terminal 2 β Frontend Dev Server (Vite):
cd frontend
npm run devOpen http://localhost:5173 in your browser.
The Vite dev server automatically proxies
/apirequests to the FastAPI backend on port 8000.
To build the frontend for production:
cd frontend
npm run buildThis creates a frontend/dist/ folder. The FastAPI server automatically serves these static files when the dist directory exists β so you only need to run:
uvicorn backend.main:app --host 0.0.0.0 --port 8000edusathi/
βββ .env.example # Environment variable template
βββ .gitignore
βββ requirements.txt # Python dependencies
βββ LICENSE
βββ README.md
β
βββ backend/
β βββ main.py # FastAPI app entry point
β βββ api/
β βββ auth.py # Login, register, Google OAuth endpoints
β βββ chat.py # Chat tutor + document upload endpoints
β βββ quiz.py # Quiz generation + submission endpoints
β βββ flashcards.py # Flashcard generation endpoints
β βββ analytics.py # Dashboard stats + report endpoints
β βββ planner.py # AI study planner endpoints
β βββ admin.py # Admin user/document management
β
βββ modules/ # Shared business logic (used by backend)
β βββ auth.py # DB operations, user management
β βββ llm_client.py # Groq LLM wrapper (chat, MCQ gen, analysis)
β βββ rag_pipeline.py # PDF ingestion + FAISS vector retrieval
β βββ quiz_engine.py # Quiz session management
β βββ flashcard_generator.py # LLM-powered flashcard creation
β βββ progress_tracker.py # Score tracking + mastery calculation
β βββ report_generator.py # PDF report generation
β βββ validation.py # Input sanitization + security validators
β
βββ frontend/
β βββ package.json
β βββ vite.config.ts # Vite config with API proxy
β βββ tailwind.config.js
β βββ tsconfig.json
β βββ src/
β βββ main.tsx # React entry point
β βββ App.tsx # Full SPA β all pages and components
β βββ index.css # Global styles + design system
β
βββ data/
βββ .gitkeep # Auto-created: users.db, vector_stores/
| Variable | Required | Description |
|---|---|---|
GROQ_API_KEY |
β | Your Groq API key for LLM access |
VITE_GOOGLE_CLIENT_ID |
β | Google OAuth client ID for sign-in |
DB_PATH |
β | SQLite database path (default: ./data/users.db) |
VECTOR_STORE_DIR |
β | FAISS vector store directory (default: ./data/vector_stores) |
EMBEDDING_MODEL |
β | Sentence transformer model (default: all-MiniLM-L6-v2) |
LLM_MODEL |
β | Groq model name (default: llama-3.3-70b-versatile) |
SECRET_KEY |
β | App secret for session security |
APP_ENV |
β | development or production |
After first run, register new accounts through the app. To test role-based access:
- Register a new account (defaults to
studentrole) - To create an admin or faculty account, update the role in the database:
sqlite3 data/users.db
UPDATE users SET role = 'admin' WHERE email = 'your@email.com';
.quitApp shows "GROQ_API_KEY not configured"
Make sure your .env file exists in the project root and contains a valid key:
GROQ_API_KEY=gsk_xxxxxxxxxxxxx
Get a free key at console.groq.com/keys
Frontend can't connect to the backend
Make sure the FastAPI server is running on port 8000:
uvicorn backend.main:app --reload --port 8000The Vite dev server proxies /api requests to localhost:8000 automatically.
ModuleNotFoundError on import
Ensure you activated your virtual environment and installed dependencies:
venv\Scripts\activate # Windows
pip install -r requirements.txtPDF upload fails or returns empty results
- Ensure the PDF has selectable text (not scanned images)
- Check file size is under 50MB
- Verify your Groq API key is valid and has remaining quota
EduSathi is under active development and contributions are welcome!
- Fork this repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Commit your changes:
git commit -m "Add: your feature description" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request with a clear description of what you changed and why
- π Bug fixes and error handling improvements
- π¨ UI/UX enhancements and accessibility improvements
- π± Mobile responsiveness tweaks
- π§ͺ Adding tests (unit tests, integration tests)
- π Documentation improvements
- π Internationalization / localization support
- β‘ Performance optimizations
- π§ New features (check Issues for ideas)
Please open an issue first if you plan a large change β so we can discuss the approach before you invest time.
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ for Everyone