Smart assistant suite for teachers — question paper generator, class summarizer, scheduler & voice assistant.
- Guru-Setu-AI
Guru-Setu-AI is a full-stack project aimed at helping teachers build/organize teaching material quickly. It combines:
- PDF-based question paper generation (RAG + GenAI)
- Video/YouTube class summarization + optional Google Classroom upload
- Scheduler with email reminders
- Voice assistant (Whisper STT → GenAI → TTS)
The backend is a Flask app and the frontend is a Next.js (App Router) SPA.
- Backend: Python, Flask, Flask-SQLAlchemy, Flask-Mail, APScheduler
- Frontend: Next.js 16 (React 19), Tailwind CSS, TypeScript
- LLMs & AI: Google GenAI (Gemini models), sentence-transformers embeddings, Chroma DB (local), Whisper for STT
- Video & audio:
yt_dlp,ffmpeg,gTTS - PDF generation:
reportlab - Storage: local
uploads/andsummary/folders (dev). SQLite used for small persistent storage.
- Upload PDFs and generate custom question papers using RAG + LLM.
- Extract audio from video or download YouTube, transcribe, summarize, and export PDF summary.
- Upload generated summary directly to Google Classroom (optional, requires credentials).
- Scheduler UI to create reminders; backend sends email reminders via SMTP.
- Voice assistant endpoint: upload speech, backend transcribes, runs LLM, returns TTS audio.
- Python 3.10+ (recommended)
- Node 18+ (for Next.js)
- ffmpeg binary available in PATH
- (Optional) Google Cloud credentials for Classroom API
- Create a virtual environment and install dependencies (create
requirements.txtif you prefer):
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r backend/requirements.txt # if you add one
# or install individually
pip install flask flask_sqlalchemy flask_mail flask_cors python-dotenv sentence-transformers pypdf chromadb google-generativeai yt_dlp ffmpeg-python openai-whisper reportlab google-auth google-auth-oauthlib google-api-python-client apscheduler gTTS- Add environment variables in
backend/.env(see config section below). - Ensure
backend/credentials.jsonis present if you want Google Classroom integration. - Start the backend:
python backend/app.pyThe app will create users.db and schedule.db on first run.
- From
frontend/folder:
cd frontend
npm install # or pnpm install
npm run dev- Open
http://localhost:3000(default Next dev port). The frontend is currently configured to call backend athttp://localhost:5000.
Place secrets in backend/.env (do NOT commit to git).
GEMINI_API_KEY— Google Generative AI API keyMAIL_USERNAME— SMTP username (Gmail used in dev config)MAIL_PASSWORD— SMTP password (or app password)
Files (not committed):
backend/credentials.json— Google OAuth client secretsbackend/token.json— OAuth token saved after consent (auto-generated)
Note: backend/.gitignore already excludes these files.
Base: http://localhost:5000
- GET
/users— list users - GET
/users/<id>— get user - POST
/user— create user (JSON:{ name, password, email }) - PUT
/users/<id>— update name - DELETE
/users/<id>— delete
- POST
/submit_question(multipart/form-data)- Files:
pdfs(multiple) - Fields:
numQuestions,difficulty_1, ...,question_1, etc. - Returns:
{ generated_questions: [{ input: {...}, generated_question }] }
- Files:
Example cURL (simplified):
curl -X POST "http://localhost:5000/submit_question" \
-F "pdfs=@mynotes.pdf" \
-F "numQuestions=1" \
-F "difficulty_1=medium" \
-F "marks_1=2" \
-F "type_1=short" \
-F "question_1=Explain concept X"- POST
/classnotes/sendfile— form: eitheryoutube_urlorvideo_file(multipart). Optionalupload_to_classroom=true - GET
/classnotes/download/<job_id>— returnssummary/class_summary.pdf
- POST
/scheduler/add— JSON:{ title, time (ISO), email, remind_before } - GET
/scheduler/<email>— list scheduled tasks for email
- POST
/voice_upload— form:audiofile -> returns{ teacher_text, assistant_text, tts_audio } - GET
/voice/<file>— serves TTS audio
User(bindusers_db) —id,name,password,emailSchedule(bindschedule_db) —id,title,time(DateTime UTC),remind_before(minutes),notified(bool),email
- To use upload to Classroom: place
credentials.json(OAuth client secret) inbackend/and run the flow. The server writestoken.jsonafter user consent. The OAuth scope is limited to classroom announcements & drive file upload. course_id.txtstores chosen course id after listing courses.