Your Complete Academic Companion Powered by Google Gemini 2.5 Pro
A comprehensive AI-powered web application designed specifically for students, featuring smart notes, file management, health tracking, quiz generation, and intelligent search capabilities.
Safia Liaqat & Ume Habiba - Frontend Developer (Under process as Safia will enhance fronet end by React)
- π¨ Responsible for: Complete Frontend Architecture & UI/UX Design
- βοΈ Tech Stack: React.js, Modern CSS, Responsive Design
- π‘ Key Contributions:
- Designed beautiful, intuitive user interfaces
- Built interactive React components for all features
- Implemented responsive design for mobile/desktop
- Created smooth animations and user interactions
- Developed real-time AI response displays
- πΌ GitHub: @Um e Habiba
- π LinkedIn: Um e Habiba
- πΌ GitHub: @safialiaqat
- π LinkedIn: Safia Liaqat
- βοΈ Responsible for: Complete Backend Architecture & AI Integration
- π Tech Stack: Python, Flask, Google Gemini AI, RESTful APIs
- π‘ Key Contributions:
- Built robust Flask REST API backend
- Integrated Google Gemini 2.5 Pro AI model
- Developed all AI-powered features (Notes, Quiz, Health, Search)
- Implemented file upload and cloud storage system
- Created database architecture and data management
- Set up authentication and security features
- π§ Email: ahmadleo498@gmail.com
- πΌ GitHub: @ckahmad
- π LinkedIn: Ahmad
- AI-Enhanced Notes: Automatically improve grammar, formatting, and clarity
- Smart Summarization: Generate concise summaries of all your notes
- Interactive Q&A: Ask questions about your notes and get AI-powered answers
- Flashcard Generation: Auto-create study flashcards from your content
- Voice Notes: Record and transcribe voice notes (optional)
- Search & Filter: Quickly find specific notes by keywords
- Real-time Updates: Instant UI feedback with React
- File Upload: Upload files to cloud storage (Cloudinary) or local storage
- External Links: Add Google Drive, Dropbox, or any web links
- Smart Organization: Organize by semester, degree, and subject
- Search Functionality: Find files across all your materials
- AI Study Plans: Generate personalized study schedules
- Quick Access: Predefined links to common course materials
- Drag & Drop: Modern file upload interface
- Symptom Analysis: Get AI-powered health information (educational only)
- Medical Information: Search for reliable health resources
- Wellness Tips: Get tips for nutrition, exercise, mental health, and more
- First Aid Guides: Quick access to emergency procedures
- Medication Info: Learn about common medications
- Mental Health Support: Resources and coping strategies
- Interactive Forms: Clean, user-friendly health input
- Smart Quiz Generation: Create quizzes from your notes or any topic
- Multiple Question Types: MCQ, True/False, and Short Answer questions
- Difficulty Levels: Easy, Medium, and Hard options
- Instant AI Feedback: Get personalized explanations for each answer
- Performance Tracking: View your quiz history and progress
- Study Recommendations: Get AI suggestions based on your performance
- Interactive Quiz UI: Smooth, engaging quiz-taking experience
- AI Search Suggestions: Get optimized search queries
- Multi-Engine Support: Google, Bing, Scholar, YouTube
- Local File Search: Find files on your computer
- To-Do List Manager: Organize tasks with AI prioritization
- Pomodoro Timer: Built-in study timer
- Study Music Recommendations: AI-curated focus playlists
- Real-time Search: Fast, responsive search interface
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React) β
β Developed by: Safia Liaqat β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β’ React Components β’ State Management β
β β’ Responsive UI β’ API Integration β
β β’ Modern CSS β’ Real-time Updates β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
β REST API Calls
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Backend (Flask + Python) β
β Developed by: Ahmad β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β’ Flask REST API β’ AI Integration β
β β’ Gemini 2.5 pro β’ Data Processing β
β β’ File Management β’ Authentication β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββ΄βββββββββββ
β β
βΌ βΌ
ββββββββββββ ββββββββββββ
β Gemini β βCloudinaryβ
β 2.5 pro β β Storage β
β API β β API β
ββββββββββββ ββββββββββββ
- Framework: React.js 18+
- Styling: Modern CSS3, Flexbox, Grid
- State Management: React Hooks (useState, useEffect)
- HTTP Client: Fetch API / Axios
- UI Features:
- Responsive Design
- Smooth Animations
- Loading States
- Error Handling
- Real-time Updates
- Framework: Flask 3.0+
- Language: Python 3.8+
- AI Model: Google Gemini 2.5 pro
- Translation: Deep Translator
- Storage: Cloudinary (cloud) + Local filesystem
- API Design: RESTful architecture
- Authentication: Flask sessions
- Logging: Comprehensive error tracking
- google-generativeai: Gemini 2.5 pro integration
- deep-translator: Multi-language translation
- speech-recognition: Voice input support
- Cloudinary: Cloud file storage
- Google AI: Gemini API
- Python 3.8 or higher
- Node.js 16+ and npm
- pip (Python package manager)
- Git
- Google account (for Gemini API key)
git clone https://github.com/ck-ahmad/student-ai-assistant.git
cd student-ai-assistantWindows:
python -m venv venv
venv\Scripts\activateMac/Linux:
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txt# Navigate to frontend directory (if separate)
cd frontend
# Install React dependencies
npm install
# Or if using single-page setup
# Frontend is already integrated in templates/Create a .env file in the root directory:
cp .env.example .envEdit .env and add your API keys:
# Required: Google Gemini API Key
GEMINI_API_KEY=your_gemini_api_key_here
# Optional: Cloudinary (for cloud file storage)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Flask Configuration
FLASK_ENV=development
FLASK_DEBUG=True
SECRET_KEY=your_secret_key_here# Make sure virtual environment is activated & can work without it
python app.pyBackend will run on: http://localhost:5000
# If using separate React dev server
npm start
# Or access directly through Flask
# Frontend is served through Flask templatesThe application will be available at: http://localhost:5000
- Visit: https://makersuite.google.com/app/apikey
- Sign in with your Google account
- Click "Create API Key"
- Copy the key and add to
.env
Free Tier Limits:
- β 60 requests per minute
- β 1,500 requests per day
- β 1 million tokens per minute
- β No credit card required!
- Sign up: https://cloudinary.com/users/register/free
- Go to Dashboard
- Copy Cloud Name, API Key, and API Secret
- Add to
.env
Free Tier Includes:
- β 25 GB storage
- β 25 GB bandwidth/month
- β No credit card required
Note: If you skip Cloudinary, the app will use local storage automatically.
1. Navigate to /notes
2. Enter a topic name
3. Write your note
4. Check "Enhance with AI" for automatic improvements
5. Click "Add Note"Frontend (React): Beautiful form with real-time validation
Backend (Flask): AI processing with Gemini 2.5 Pro
1. Navigate to /drive
2. Choose "Upload File" or "Add Link"
3. Select semester, degree, and subject
4. Upload or paste link
5. Add optional descriptionFrontend (React): Drag-and-drop file upload interface
Backend (Flask): File processing and cloud storage integration
1. Navigate to /quiz
2. Enter topic name
3. Choose question count and difficulty
4. Generate quiz
5. Take quiz and get instant feedbackFrontend (React): Interactive quiz UI with smooth transitions
Backend (Flask): AI quiz generation and evaluation
student-ai-assistant/
β
βββ Backend (Ahmad's Work)/
β βββ app.py # Main Flask application
β βββ notes_ai.py # Notes AI with Gemini 1.5 Flash
β βββ drive_manager_ai.py # File management with AI
β βββ health_tracker_ai.py # Health information with AI
β βββ quiz_generator_ai.py # Quiz generation with AI
β βββ search_engine_ai.py # Smart search with AI
β βββ requirements.txt # Python dependencies
β
βββ Frontend (Safia's Work)/
β βββ templates/ # HTML templates with React
β β βββ index.html # Landing page
β β βββ notes.html # Notes interface
β β βββ drive.html # Drive manager
β β βββ health.html # Health tracker
β β βββ quiz.html # Quiz generator
β β βββ search.html # Search engine
β β
β βββ static/ # Frontend assets
β β βββ css/ # Stylesheets
β β βββ js/ # React components
β β βββ images/ # Images and icons
β β
β βββ components/ # React components (if separate)
β
βββ Data Storage/
β βββ uploads/ # Temporary file uploads
β βββ drive_files/ # Local file storage
β βββ notes/ # Notes text files
β βββ *.json # Database files
β
βββ Configuration/
β βββ .env # Environment variables
β βββ .env.example # Environment template
β βββ .gitignore # Git ignore file
β βββ requirements.txt # Python dependencies
β
βββ Documentation/
βββ README.md # This file
βββ LICENSE # MIT License
http://localhost:5000/api
POST /api/notes/create
Content-Type: application/json
{
"topic": "Python Programming",
"note": "Functions are reusable blocks of code",
"use_ai": true
}
Response:
{
"success": true,
"message": "Note added successfully! (AI Enhanced)",
"enhanced_note": "Improved note text..."
}POST /api/notes/view
Content-Type: application/json
{
"topic": "Python Programming"
}
Response:
{
"success": true,
"notes": [
{"id": 1, "text": "Note content..."},
{"id": 2, "text": "Another note..."}
]
}POST /api/notes/summarize
Content-Type: application/json
{
"topic": "Python Programming"
}
Response:
{
"success": true,
"summary": "AI-generated summary..."
}POST /api/quiz/generate-from-topic
Content-Type: application/json
{
"topic": "Machine Learning",
"num_questions": 10,
"difficulty": "medium",
"quiz_type": "mixed"
}
Response:
{
"success": true,
"questions": [...]
}POST /api/quiz/evaluate
Content-Type: application/json
{
"topic": "Machine Learning",
"questions": [...],
"answers": [...]
}
Response:
{
"success": true,
"score": 8,
"total": 10,
"percentage": 80.0,
"results": [...],
"overall_feedback": "Great job! ..."
}// Example: Notes Component
import React, { useState, useEffect } from 'react';
const NotesManager = () => {
const [topic, setTopic] = useState('');
const [note, setNote] = useState('');
const [useAI, setUseAI] = useState(true);
const [notes, setNotes] = useState([]);
const [loading, setLoading] = useState(false);
const createNote = async () => {
setLoading(true);
const response = await fetch('/api/notes/create', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({topic, note, use_ai: useAI})
});
const data = await response.json();
setLoading(false);
// Update UI with response
};
return (
// Beautiful React JSX UI
);
};- Responsive Design: Works on all devices
- Real-time Validation: Instant form feedback
- Loading States: Smooth user experience
- Error Handling: User-friendly error messages
- Animations: Smooth transitions and effects
- Accessibility: ARIA labels and keyboard navigation
# Example: Notes AI Module
class NotesAI:
def __init__(self, gemini_api_key):
genai.configure(api_key=gemini_api_key)
self.model = genai.GenerativeModel('gemini-1.5-flash')
def create_note(self, topic, note_text, use_ai=False):
if use_ai:
note_text = self.enhance_note_with_ai(topic, note_text)
# Save note logic
return {'success': True, 'message': 'Note created'}
def enhance_note_with_ai(self, topic, note_text):
# Gemini AI processing
response = self.model.generate_content(prompt)
return response.text- RESTful API Design: Clean, consistent endpoints
- AI Integration: Gemini 2.5 Pro for responses
- Error Handling: Comprehensive try-catch blocks
- Logging: Track all operations and errors
- Security: Input validation and sanitization
- Scalability: Modular architecture for easy expansion
We welcome contributions! Here's how our team worked:
Safia's Workflow (Frontend):
- Design UI mockups
- Build React components
- Integrate with backend APIs
- Test user interactions
- Optimize performance
Ahmad's Workflow (Backend):
- Design API endpoints
- Implement AI features
- Handle data processing
- Test API responses
- Deploy backend services
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Make your changes (frontend or backend)
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Solution:
1. Check .env file has the correct key
2. Verify key starts with "AIza..."
3. Ensure there are no spaces or quotes around the key
4. Restart app.py after adding or updating the key
Solution:
Switched to model 2.5 pro
Issue: The default translator API failed during runtime.
Solution:
1. Switched to Deep Translator for reliable multilingual support.
2. Installed using:
pip install deep-translator
3. Updated import references in the translation module.
Issue: The pipeline crashed during multiple parallel AI calls.
Solution:
1. Added async handling and error recovery in the Flask backend.
2. Implemented retry logic for unstable API requests.
3. Optimized concurrent request limits to prevent overload.
Solution:
1. Ensure backend is running (python app.py)
2. Check Flask is on http://localhost:5000
3. Verify CORS settings if using separate React serverSolution:
1. Clear browser cache
2. Check console for JavaScript errors
3. Verify all imports are correct
Combined Performance: Frontend + Backend working seamlessly!
β
Complete React UI/UX implementation
β
Responsive design for all devices
β
Interactive components and animations
β
API integration and state management
β
User experience optimization
β
Complete Flask REST API
β
Gemini 2.5 Pro AI integration
β
All 5 AI-powered modules
β
File upload and cloud storage
β
Database and security implementation
Together: A powerful, full-stack AI application! π
Backend Security (Ahmad):
- β Input validation and sanitization
- β Secure file upload handling
- β API rate limiting
- β Environment variable protection
- β SQL injection prevention
Frontend Security (Safia):
- β XSS prevention
- β CSRF token implementation
- β Secure API calls
- β Input validation on client side
- β Secure state management
- Safia Liaqat: For creating an beautiful, intuitive frontend
- Ahmad: For building a robust, AI-powered backend
- Google Gemini AI: For providing free AI API
- Cloudinary: For free cloud storage
- React & Flask Communities: For excellent documentation
- Open Source Contributors: For inspiration and tools
This project is licensed under the MIT License - see the LICENSE file for details.
The Problems I faced wile developing this project are in Problems file with how I solved them.
Safia Liaqat - Frontend Developer
- πΌ GitHub: @safialiaqat
- π LinkedIn: Safia Liaqat
- π― Expertise: React, UI/UX Design, Frontend Architecture
Ahmad - Backend Developer
- π§ Email: ahmadleo498@gmail.com
- πΌ GitHub: @ahmad
- π LinkedIn: Ahmad
- π― Expertise: Python, Flask, AI Integration, Backend Architecture
- π Project Repository: https://github.com/ck-ahmad/Student_AI_Assistant
- π Report Problem: ahmadleo498@gmail.com
Frontend (Safia's Planned Features):
- Progressive Web App (PWA) support
- Dark mode theme
- Advanced animations and transitions
- Mobile app (React Native)
- Real-time collaboration UI
Backend (Ahmad's Planned Features):
- User authentication system
- Advanced AI features
- Integration with more APIs
- Database optimization
- Microservices architecture
If you find this project helpful, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting features
- π Improving documentation
- π€ Contributing code (frontend or backend!)
Made with β€οΈ by Safia Liaqat (Frontend - React) & Ahmad (Backend - Flask/AI)
Frontend: βοΈ React.js | Backend: π Flask + π€ Gemini 2.5 Pro
A Perfect Full-Stack Collaboration π