███████╗████████╗██╗ ██╗██████╗ ██╗ ██╗
██╔════╝╚══██╔══╝██║ ██║██╔══██╗╚██╗ ██╔╝
███████╗ ██║ ██║ ██║██║ ██║ ╚████╔╝
╚════██║ ██║ ██║ ██║██║ ██║ ╚██╔╝
███████║ ██║ ╚██████╔╝██████╔╝ ██║
╚══════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
A S S I S T A N T 🎓
"What if you had a personal tutor who knew every subject, never got tired, and adapted to how YOU learn?" Meet your AI Study Assistant.
A full-stack AI-powered study companion built for students, self-learners, and curious minds. It doesn't just answer questions — it adapts to your level, summarizes your PDFs, stores your learning history, and exports your notes.
Think ChatGPT — but laser-focused on helping you actually learn and retain knowledge.
|
🔐 Authentication System Full login & signup with SQLite. Session persistence so you never lose your progress. Optional "Remember Me" support. |
💬 Chat-Based Learning Ask anything, get intelligent answers in a clean ChatGPT-style interface. Subject-aware responses that adapt to context. |
|
📄 PDF Summarization Upload any study material. AI extracts the text, understands it, and gives you a clean, concise summary. |
📥 Download Notes as PDF Every AI response can be exported as a formatted PDF — ready to print, share, or revise from. |
|
📜 Chat History Every question and answer is saved. Review your learning journey, revisit past explanations, or clear and start fresh. |
🌙 Dark Mode Toggle between light and dark themes. Study comfortably at 2am without burning your eyes. |
┌─────────────────────────────────────────────────────────────────┐
│ │
│ 📘 BEGINNER MODE │
│ Simple language · Analogies · Step-by-step breakdown │
│ "Explain it like I'm hearing this for the first time" │
│ │
│ 📗 NORMAL MODE │
│ Detailed explanations · Examples · Full context │
│ "Give me a thorough, complete understanding" │
│ │
│ 📕 EXAM REVISION MODE │
│ Bullet points · Key facts · Quick recall format │
│ "I have 2 hours before my exam, let's go" │
│ │
└─────────────────────────────────────────────────────────────────┘
The assistant doesn't give generic answers — it adapts its style to the subject:
| Subject | How It Responds |
|---|---|
| ➕ Math | Step-by-step solving with working shown |
| 💻 Programming | Code examples + line-by-line explanation |
| 🔬 Science | Real-world analogies + visual descriptions |
| 📚 General | Structured explanation with examples |
User logs in / signs up
│
▼
┌───────────────────┐ ┌─────────────────────┐
│ Ask a question │ OR │ Upload a PDF │
└────────┬──────────┘ └──────────┬──────────┘
│ │
▼ ▼
┌────────────────────────────────────────────────┐
│ prompts.py │
│ Subject + Mode → Crafted System Prompt │
└─────────────────────┬──────────────────────────┘
│
▼
┌────────────────────────────────────────────────┐
│ Groq API ⚡ (LLM) │
│ Fast inference, smart output │
└─────────────────────┬──────────────────────────┘
│
┌─────────────┼──────────────┐
▼ ▼ ▼
Chat display Save to DB Export as PDF
(SQLite) (ReportLab)
-- Users table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL
);
-- Chat history table
CREATE TABLE history (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT,
question TEXT,
answer TEXT,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
);ai-study-assistant/
│
├── 📄 app.py ← main streamlit app + UI + routing
├── 📄 db.py ← all SQLite database functions
├── 📄 prompts.py ← subject + mode based prompt builder
│
├── 📄 study.db ← SQLite database (auto-created)
├── 📄 notes.pdf ← latest exported notes
├── 📄 session.txt ← login session persistence
│
├── 📄 requirements.txt ← all dependencies
└── 📄 .env ← GROQ_API_KEY (never push this!)
# 1. Clone the repo
git clone https://github.com/SHALINISAURAV/ai-study-assistant.git
cd ai-study-assistant
# 2. Create virtual environment
python -m venv venv
source venv/bin/activate # Mac/Linux
# venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Add your API key
echo "GROQ_API_KEY=your_api_key_here" > .env
# 5. Launch 🚀
streamlit run app.py🔑 Get your free Groq API key → console.groq.com
GROQ_API_KEY=your_groq_api_key_hereFor Streamlit Cloud → Settings → Secrets mein add karo.
streamlit
groq
python-dotenv
PyPDF2
reportlab
pillow
requests
- 🔐 Login & Signup with SQLite
- 💬 Chat-based AI tutor
- 🧠 3 adaptive study modes
- 📄 PDF upload & summarization
- 📥 Download notes as PDF
- 📜 Chat history storage
- 🌙 Dark mode toggle
- ⚡ Groq LLM integration
Shalini Saurav
AI Engineer · Data Scientist · Builder
Building tools that make learning faster, smarter, and more accessible.