Python · Flask · SQLite · Google Gemini AI
StudySync AI is a full-stack, Python-first AI-powered educational platform designed for students who want to study smarter. It combines an AI tutor, smart study planner, quiz generator, real-time progress tracker, and exam readiness predictor — all in a single beautifully themed web application.
Built for: Internship portfolios, GitHub showcases, LinkedIn, and job applications.
| Feature | Description |
|---|---|
| 🤖 AI Tutor | Personalized explanations for any subject/topic with 4 difficulty modes |
| 📅 Study Planner | AI-generated step-by-step study schedules |
| 📝 Sticky Notes | Pinnable color-coded notes for formulas, reminders, and concepts |
| 🔗 Resource Manager | Save PDFs, articles, Google Drive links, and YouTube videos |
| 🎯 Quiz Generator | Auto-generated MCQs + short-answer questions with scoring |
| 📊 Analytics Dashboard | Score trends, accuracy, strong/weak topic analysis |
| 🏆 Exam Readiness | AI-predicted readiness percentage with confidence levels |
| 📈 Live Progress | Real-time tracking of chapters, streaks, sessions, and goals |
| 🎨 Personalised Themes | Auto-assigned Pink (Female) or Blue (Male) dashboard |
| 🔒 Auth System | Secure registration/login with password hashing |
| 💾 Persistent Storage | All data saved in SQLite — survives logout and return |
StudySyncAI/
│
├── app.py ← Flask app + all routes
├── ai_engine.py ← AI logic (Gemini + fallback)
├── models.py ← SQLite data-access layer
├── database.py ← DB init + connection
├── study_planner.py ← Study plan generation
├── quiz_generator.py ← Quiz creation + scoring
├── progress_tracker.py ← Streak + progress tracking
├── analytics.py ← Performance analytics
├── url_extractor.py ← Extract text from URLs
├── utils.py ← Shared helpers
│
├── templates/
│ ├── base.html ← Base layout
│ ├── index.html ← Landing page
│ ├── auth.html ← Login / Register
│ ├── gender.html ← Theme personalisation
│ ├── setup.html ← Study session setup
│ ├── dashboard.html ← Main dashboard (all features)
│ ├── quiz.html ← Quiz interface
│ ├── quiz_result.html ← Quiz results
│ ├── analytics.html ← Analytics dashboard
│ ├── readiness.html ← Exam readiness dashboard
│ ├── history.html ← Study history
│ └── error.html ← Error pages
│
├── static/
│ ├── css/
│ │ ├── main.css ← Base styles
│ │ ├── theme-blue.css ← Male/default blue theme
│ │ └── theme-pink.css ← Female pink pastel theme
│ └── js/
│ └── main.js ← Minimal JS utilities
│
├── instance/
│ └── studysync.db ← SQLite database (auto-created)
│
├── requirements.txt
├── Procfile ← Gunicorn for Render/Heroku
├── runtime.txt ← Python 3.11
└── README.md
| Layer | Technology |
|---|---|
| Backend | Python 3.11 + Flask 3.0 |
| Database | SQLite (via Python's built-in sqlite3) |
| AI Engine | Google Gemini 1.5 Flash (with offline fallback) |
| Frontend | HTML5 + CSS3 (minimal, no framework) |
| Interactivity | Vanilla JS (minimal — only for UI micro-interactions) |
| Auth | Session-based + SHA-256 password hashing |
| Deployment | Render (Gunicorn WSGI) |
Python is the dominant technology — all business logic, AI processing, database operations, routing, and data transformation lives in Python modules.
git clone https://github.com/yourusername/StudySyncAI.git
cd StudySyncAIpython -m venv venv
# Activate on Windows:
venv\Scripts\activate
# Activate on Mac/Linux:
source venv/bin/activatepip install -r requirements.txt# Copy example env file
cp .env.example .env
# Edit .env and add your keys:
# GEMINI_API_KEY=your_google_gemini_api_key_here
# SECRET_KEY=any_random_secret_stringNote: The app works fully without a GEMINI_API_KEY — it uses an intelligent built-in fallback engine. Add the key to enable live Gemini AI responses.
python app.pyOpen your browser at http://localhost:5000
git init
git add .
git commit -m "Initial commit: StudySync AI"
git remote add origin https://github.com/yourusername/StudySyncAI.git
git push -u origin mainGo to render.com and sign up with GitHub.
- Click New → Web Service
- Connect your GitHub repository
- Configure the service:
| Setting | Value |
|---|---|
| Environment | Python 3 |
| Build Command | pip install -r requirements.txt |
| Start Command | gunicorn app:app --bind 0.0.0.0:$PORT --workers 2 --timeout 120 |
| Instance Type | Free |
In the Render dashboard → Environment → Add the following:
| Key | Value |
|---|---|
SECRET_KEY |
Any random secret string (e.g. studysync-prod-secret-2024) |
GEMINI_API_KEY |
Your Google Gemini API key (optional) |
Click Create Web Service. Render will automatically build and deploy your app.
Your app will be live at: https://your-app-name.onrender.com
Free tier note: On Render's free plan, the app spins down after 15 minutes of inactivity. The first request after that takes ~30 seconds to wake up. This is normal.
- Go to Google AI Studio
- Sign in with your Google account
- Click Create API Key
- Copy the key and add it as
GEMINI_API_KEYin your.envor Render environment
The free tier is very generous — more than enough for a student portfolio project.
Clean modern landing page with hero section, features grid, and how-it-works steps.
Secure registration and login with SHA-256 password hashing and SQLite persistence.
After first login, users choose their gender. The app automatically applies:
- Female → Soft pink pastel theme with rounded UI
- Male → Professional blue navy theme
Enter subject (from dropdown or custom), topic, difficulty level, study goal, and optional material (URL or pasted text).
The main screen with 10 live sections:
- AI Tutor explanation (regeneratable)
- AI Study Plan
- Key Concepts
- Related Topics
- Live Progress Dashboard
- Goal Tracker
- Sticky Notes
- Study Links
- YouTube Learning Links
- Quiz History
Take an auto-generated quiz, see detailed results with AI feedback, then view your full performance analytics dashboard.
View your AI-predicted exam readiness percentage with confidence level, likelihood of passing, and breakdown by component.
The ai_engine.py module:
- Checks for GEMINI_API_KEY at startup
- If available → sends structured prompts to Gemini 1.5 Flash
- If not available (or API fails) → uses the built-in deterministic fallback engine
The fallback engine generates contextually relevant explanations, study plans, quizzes, and feedback without any external API — ensuring the app is always fully functional.
All AI content is difficulty-aware (Beginner / Intermediate / Advanced / Exam Mode) and goal-aware (Understand / Revise / Exam Prep etc).
users → id, username, email, password, gender
study_sessions → subject, topic, difficulty, goal, material, AI content
notes → title, content, color, pinned
study_links → title, url, type, subject
youtube_links → title, url, description, subject
goal_tasks → task, completed
quiz_history → questions, answers, score, time
progress → sessions, streak, study_minutes, weekly_data
analytics_snapshots → accuracy, strong/weak topics
- Streak: increments on consecutive study days, resets if a day is missed
- Topic mastered: incremented when a chapter is marked complete
- Weekly minutes: tracked per ISO week for consistency charts
- Readiness score: weighted combination of quiz avg (40%), task completion (25%), streak (15%), revision (10%), sessions (10%)
This project demonstrates:
- ✅ Python-first full-stack web development
- ✅ Flask routing, sessions, and template rendering
- ✅ SQLite database design and CRUD operations
- ✅ Integration of a real AI/LLM API (Google Gemini)
- ✅ Graceful fallback when API is unavailable
- ✅ URL text extraction with standard library + BeautifulSoup
- ✅ Live dashboard with JSON API and auto-refresh
- ✅ Multi-session persistent study history
- ✅ Personalised theming system
- ✅ Production deployment to Render with Gunicorn
MIT License — free to use, modify, and distribute.
Built with ❤️ using Python, Flask, and Google Gemini AI