A modern full-stack study & productivity application
Designed for deep focus, clarity, and consistent growth.
๐ด Live Demo โข ๐ Report Bug โข โจ Request Feature
## ๐ฏ About StudyFlowStudyFlow is a full-stack productivity and study-management application designed to help students and self-learners stay focused, track progress, and build consistent study habits.
It combines the Pomodoro technique, real-time analytics, task & subject management, and immersive focus music into a single modern experience.
-
โฑ๏ธ Smart Pomodoro Timer
Fully customizable focus & break sessions with visual progress -
๐ Deep Analytics Dashboard
Daily, weekly & monthly productivity insights with interactive charts -
๐ต Integrated Music Player
YouTube links & local audio support for focus music -
๐ Intelligent Workflow Manager
Tasks, subjects & goal tracking with deadline management -
๐ค AI Study Assistant โญ NEW
Powered by Google Gemini - Get study tips, quiz generation, and smart recommendations -
๐ Gamified Achievements
Unlock rewards and badges for reaching study milestones
-
๐ Secure Authentication
JWT tokens with 30-day expiry + Bcrypt password encryption -
๐ Password Recovery
Email-based password reset functionality -
๐ค User Profiles
Customizable profiles with avatar support
-
๐ Lightning Fast
90+ Lighthouse performance score with optimized loading -
๐พ Offline First
Service Worker v5 with smart caching strategies -
๐ฑ PWA Ready
Install as native app on any device -
โก Real-time Sync
Live updates via Socket.IO for instant collaboration
-
๐ Custom Themes
Multiple beautiful themes with dark/light modes -
๐ฑ Fully Responsive
Optimized for mobile, tablet, and desktop -
โฟ Accessible
WCAG 2.1 compliant with keyboard navigation -
๐ Smart Notifications
Browser notifications for timer completion and reminders
-
๐ Search Engine Optimized
Structured data (JSON-LD) for rich search results -
๐ Social Media Ready
Perfect Open Graph and Twitter Card previews -
๐บ๏ธ Sitemap & Robots.txt
Proper indexing for search engines
StudyFlow includes a gamified achievement system to motivate consistent study habits. Earn points and unlock badges by reaching study milestones:
- First Steps: Complete 1 study session (10 points)
- Hour Master: Study for 1 hour total (15 points)
- Dedicated Scholar: Study for 10 hours total (50 points)
- Study Warrior: Study for 50 hours total (150 points)
- Consistency King: Maintain a 7-day study streak (75 points)
- Perfect Week: Study every day for a week (100 points)
- Goal Crusher: Complete 1 goal (20 points)
- Goal Master: Complete 10 goals (100 points)
- Subject Explorer: Create 1 subject (10 points)
- Task Manager: Complete 1 task (15 points)
- Task Champion: Complete 50 tasks (80 points)
Note: Achievements are automatically unlocked as you progress. Check your profile to see earned badges!
StudyFlow has been meticulously optimized for maximum performance:
-
LCP (Largest Contentful Paint): < 2.5s
Content appears almost instantly -
FID (First Input Delay): < 100ms
Instant response to user interactions -
CLS (Cumulative Layout Shift): < 0.1
Stable layout, no jumps or shifts -
FCP (First Contentful Paint): < 1.8s
Fast initial rendering -
TTI (Time to Interactive): < 3.8s
Fully functional quickly
Performance: 90+ โก
SEO: 95+ ๐
Accessibility: 95+ โฟ
Best Practices: 95+ โจ
PWA: 100 ๐ฑ
- โ Inlined critical CSS for instant first paint
- โ Deferred non-critical JavaScript
- โ Async loading for third-party libraries
- โ DNS prefetch for CDN resources
- โ Preload hints for critical assets
- โ Service Worker v5 with multi-tier caching
- โ Cache-First for CDN resources (7-day TTL)
- โ Stale-While-Revalidate for local assets
- โ Network-First for API calls
- โ Offline fallback support
- โ Lazy loading for images and heavy components
- โ Code splitting for better bundle size
- โ Minified CSS and JavaScript
- โ Compressed assets (gzip/brotli ready)
- โ Browser caching (1-year for static assets)
- โ Structured data (JSON-LD Schema.org)
- โ Proper meta tags and Open Graph
- โ Sitemap.xml for search engines
- โ Robots.txt for crawl control
- โ Canonical URLs to prevent duplicates
- โ Rich snippets for social sharing
- โ X-Frame-Options: DENY
- โ X-Content-Type-Options: nosniff
- โ X-XSS-Protection: enabled
- โ Referrer-Policy: strict-origin-when-cross-origin
- โ Content Security Policy (CSP) ready
Before you begin, make sure all the above tools are installed and properly configured.
git clone https://github.com/salahuddingfx/Study-Flow.git
cd Study-Flow
2๏ธโฃ Install Dependencies
cd Backend
npm install
3๏ธโฃ Environment Configuration
Create a `.env` file in the **Backend** directory:
```env
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secret_key
NODE_ENV=development
# AI Configuration (Unlimited Models Available!)
GEMINI_API_KEY=your_google_gemini_api_key
GEMINI_MODEL=gemini-2.0-flash-exp # Default: unlimited experimental modelAvailable AI Models:
gemini-2.0-flash-exp- โก Unlimited (Recommended)gemini-exp-1206- โก Unlimitedgemma-2-9b-it- Gemma 9Bgemma-2-27b-it- Gemma 27Bgemini-2.5-flash-โ ๏ธ Rate Limited (5 RPM/20 RPD)
4๏ธโฃ Start the Backend Server npm start
5๏ธโฃ Run the Frontend
Use VS Code Live Server (recommended)
Backend โ http://localhost:5000
Frontend โ http://127.0.0.1:5500/index.html (Live Server)
Or any static server of your choice.
StudyFlow is optimized for multiple deployment platforms:
# Install Netlify CLI
npm install -g netlify-cli
# Login
netlify login
# Deploy
netlify deploy --prod --dir=.Features:
- โ Automatic HTTPS
- โ Global CDN
- โ Custom domains
- โ Auto-deploy from Git
- โ Built-in CI/CD
# Install Vercel CLI
npm install -g vercel
# Deploy
vercel --prodFeatures:
- โ Edge network
- โ Instant deployments
- โ Automatic previews
- โ Analytics included
# Push to GitHub
git add .
git commit -m "Deploy to GitHub Pages"
git push origin main
# Enable in Settings โ Pages โ Source: main branchNote: Update URLs in code for GitHub Pages subdirectory.
# Create Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY Backend/package*.json ./
RUN npm ci --production
COPY Backend .
EXPOSE 5000
CMD ["node", "server.js"]# Build and run
docker build -t studyflow .
docker run -p 5000:5000 -p 80:80 studyflow# Lighthouse CI
npm install -g @lhci/cli
lhci autorun --collect.url=http://localhost:8000
# Or use Chrome DevTools
# F12 โ Lighthouse โ Run audit- Performance: PageSpeed Insights
- PWA: PWABuilder
- SEO: Google Rich Results Test
- Mobile: Mobile-Friendly Test
- Security: Security Headers
- โ Chrome/Edge (Chromium) 90+
- โ Firefox 88+
- โ Safari 14+
- โ Samsung Internet 14+
- โ Opera 76+
- โ Desktop (1920x1080, 1366x768)
- โ Tablet (iPad, Android tablets)
- โ Mobile (iPhone, Android phones)
- โ Large screens (2K, 4K displays)
- Get a free API key from Google AI Studio
- Add
GEMINI_API_KEYto your Backend.env - The app uses unlimited models by default (gemini-2.0-flash-exp) to avoid rate limits
- Fallback system: Automatically tries multiple models if one fails
- No rate limits on experimental models! ๐
## ๐ Project Structure
```text
Study Flow/
โโโ Backend/
โ โโโ config/ # Database & app configuration
โ โโโ middleware/ # Auth & custom middlewares
โ โโโ models/ # Mongoose schemas
โ โโโ routes/ # API routes
โ โโโ node_modules/
โ โโโ .env # Environment variables
โ โโโ package.json
โ โโโ package-lock.json
โ โโโ server.js # Express server entry point
โ โโโ check-deployment.js
โ
โโโ Frontend/
โ โโโ Assets/
โ โ โโโ script.js # Frontend logic
โ โ โโโ style.css # UI styles
โ โโโ index.html # Main frontend entry
โ
โโโ .gitignore
โโโ DEPLOYMENT.md
โโโ readme.md
โโโ render.yaml
---
## ๐ Recent Upgrades
### ๐ค AI System v2.0
- โก **Unlimited AI Models**: Now using `gemini-2.0-flash-exp` (no rate limits!)
- ๐ **Smart Fallback**: Auto-tries 9+ models including Gemma 2 series
- ๐ **Model Tracking**: Response includes which model answered
- ๐ฏ **Context-Aware**: AI knows your subjects, tasks, goals, and study history
- ๐ง **Health Endpoint**: `/api/ai/health` shows model status
### ๐จ UX Improvements
- ๐ฑ๏ธ **Enhanced Custom Cursor**: Works on 17+ interactive element types
- ๐ฑ **Mobile Optimized**: Full-screen menu, no overflow, touch-friendly
- ๐ญ **Glassmorphism**: Beautiful cursor with hover effects (desktop only)
- ๐ฐ **Blog System**: Default posts with images + modal reader
- ๐ **Admin Panel**: Full dashboard with analytics and user management
### ๐ก๏ธ Security & Performance
- ๐ Sensitive debug logs removed
- ๐ `.env.example` template added
- โก Compression middleware enabled
- ๐ก๏ธ Helmet.js security headers
- ๐ฆ Rate limiting configured
---
## ๐งช Quick Test Checklist
- Login โ Navigate Timer/Analytics โ No horizontal scroll on mobile.
- Open Blog โ Default posts visible โ Click to read modal opens.
- Toggle AI widget โ Ask a question โ Typing indicator and responses flow.
- Admin Panel opens when `isAdmin` is true; charts render.
---
## โ๏ธ Environment & Running
- Backend: Express on port `5000` (from `.env`).
- Frontend: Open `index.html` via VS Code Live Server.
- AI: `GEMINI_API_KEY` in Backend `.env`.
If you change ports, update `API_BASE_URL` in `Assets/script.js` accordingly.
This section explains how to use StudyFlow effectively from the first login to productivity analysis.
- Create an Account - Register with email, username, and password
- Verify Email - Check your inbox for verification (if enabled)
- Complete Profile - Add your name and preferences
- Add Subjects - Create subjects you want to focus on
- Set Goals - Define your study targets and deadlines
- Navigate to Focus Timer
- Select mode:
- Focus (25 minutes) - Deep work session
- Short Break (5 minutes) - Quick rest
- Long Break (15 minutes) - Extended rest
- Custom - Set your own duration
- Choose a Subject (optional)
- Select a Task to work on (optional)
- Click Start and begin focusing!
- ๐ฏ Visual circular progress indicator
- ๐ Customizable alarm sounds
- โธ๏ธ Pause and resume functionality
- ๐ Auto-start next session
- ๐ Session history tracking
- ๐จ Color-coded timer modes
1. Go to "Daily Tasks" section
2. Click "+ Add Task" button
3. Enter task title
4. Set deadline (optional)
5. Choose priority: Low, Medium, High
6. Click "Add"
- โ Mark as complete
- ๐ Deadline tracking with visual indicators
- ๐จ Priority-based color coding
- โ๏ธ Edit task details
- ๐๏ธ Delete completed tasks
- ๐ Task completion statistics
Title: "Study 50 Hours This Month"
Type: Study Time / Task Completion / Custom
Target: 50 hours
Deadline: End of month
Priority: High
Category: Monthly Target
- Study Time Goals - Track total hours
- Task Completion Goals - Complete X tasks
- Subject-Specific Goals - Focus on one subject
- Streak Goals - Maintain daily consistency
- Custom Goals - Define your own metrics
- ๐ Real-time progress bars
- ๐ Completion percentage
- โฑ๏ธ Time remaining
- ๐ฏ Milestone notifications
- ๐ Achievement unlocks
- Total Study Time - All-time and period-specific
- Daily/Weekly/Monthly Trends - Visual charts
- Subject Breakdown - Time per subject
- Productivity Score - Performance metrics
- Streak Tracking - Consecutive study days
- Comparison Charts - Period over period
- Focus Quality - Session effectiveness
- ๐ Bar charts for time comparison
- ๐ Line graphs for trends
- ๐ฅง Pie charts for distribution
- ๐ Calendar heatmap for consistency
- ๐ฏ Gauge charts for goals
- Smart Recommendations - Personalized study tips
- Quiz Generation - Auto-create quizzes from topics
- Study Planning - AI-powered schedule suggestions
- Progress Analysis - Identify improvement areas
- Motivation Coach - Encouraging messages
1. Click floating AI button (bottom-right)
2. Type your question or request
3. Get instant AI-powered responses
4. Context-aware suggestions based on your data
- Gemini 2.0 Flash (Unlimited)
- Gemini Experimental (Unlimited)
- Gemma 2 (9B/27B variants)
- Smart fallback system
- ๐ฅ YouTube videos (paste URL)
- ๐ต Local audio files
- ๐ป Background playlists
- ๐ง Curated study mixes
โถ๏ธ Play/Pause- โญ๏ธ Next track
- ๐ Loop mode
- ๐ Shuffle
- ๐ Volume control
- ๐ฑ Minimized player view
- Achievements unlock automatically as you progress
- Earn points for various milestones
- Collect badges to show your dedication
- Compete with yourself over time
- Share achievements on social media
- ๐ Study Time - Hour milestones
- ๐ฅ Consistency - Daily streaks
- ๐ฏ Goals - Goal completions
- ๐ Tasks - Task milestones
- ๐ Subjects - Subject diversity
- ๐ Dark themes (multiple variants)
- โ๏ธ Light themes
- ๐ Custom color schemes
- ๐จ Personalized palettes
- ๐ Notification preferences
- โฑ๏ธ Default timer durations
- ๐ Sound settings
- ๐ฑ PWA installation
- ๐ Privacy controls
Chrome:
1. Click menu (โฎ)
2. Select "Install app"
3. Follow prompts
iOS Safari:
1. Tap Share button
2. Select "Add to Home Screen"
3. Confirm installation
- ๐ฑ Full offline support
- ๐ Push notifications
- ๐ฒ Native-like experience
- ๐จ Adaptive UI
- โก Fast loading
- โ๏ธ Update name and username
- ๐ง Change email
- ๐ Change password
- ๐ผ๏ธ Upload profile picture
- ๐๏ธ Delete account
- ๐พ Export all data (JSON/CSV)
- ๐ View data statistics
- ๐ Sync across devices
- ๐๏ธ Clear local cache
- ๐ฆ Backup and restore
1. Check daily tasks
2. Set 3 priority tasks
3. Start 25-min focus session
4. Track progress
1. Choose subject
2. Start Pomodoro timer
3. Work distraction-free
4. Take break when done
5. Log session automatically
1. Check analytics
2. Mark tasks complete
3. Review progress
4. Plan tomorrow
5. Celebrate achievements
index.html (Main SPA)
โโโ Vue 3 Composition API
โโโ Tailwind CSS (Utility-first)
โโโ Socket.IO Client (Real-time)
โโโ Chart.js (Analytics)
โโโ FullCalendar (Schedule)
โโโ Service Worker (Offline)
Express.js Server
โโโ Routes (API Endpoints)
โโโ Controllers (Business Logic)
โโโ Models (MongoDB Schemas)
โโโ Middleware (Auth, Admin)
โโโ Utils (Email, Helpers)
โโโ Config (Database, Env)
User โ Frontend โ API โ Controller โ Model โ MongoDB
โ
Socket.IO (Real-time updates)
โ
Service Worker (Caching)
1. JWT Authentication (Token-based)
2. Bcrypt Password Hashing (10 rounds)
3. CORS Protection (Origin validation)
4. Rate Limiting (API throttling)
5. Input Validation (Sanitization)
6. HTTPS Enforcement (TLS 1.3)
7. Security Headers (CSP, XSS)
Study Flow/
โโโ index.html # Main application
โโโ login.html # Authentication page
โโโ manifest.json # PWA configuration
โโโ sw.js # Service Worker v5
โโโ robots.txt # SEO crawling rules
โโโ sitemap.xml # Search engine sitemap
โโโ _redirects # SPA routing rules
โโโ _headers # Security headers
โ
โโโ Assets/ # Frontend resources
โ โโโ script.js # Main Vue app (2900+ lines)
โ โโโ style.css # Global styles (800+ lines)
โ โโโ auth.js # Authentication logic
โ โโโ auth.css # Auth page styles
โ โโโ critical.css # Inline critical CSS
โ โโโ lazy-load.js # Performance utilities
โ โโโ brain-duotone.png # App icon
โ
โโโ Backend/ # Server application
โ โโโ server.js # Express server entry
โ โโโ package.json # Dependencies
โ โ
โ โโโ config/
โ โ โโโ db.js # MongoDB connection
โ โ
โ โโโ middleware/
โ โ โโโ auth.middleware.js # JWT verification
โ โ โโโ admin.middleware.js # Admin check
โ โ
โ โโโ models/
โ โ โโโ User.js # User schema
โ โ โโโ Session.js # Study session schema
โ โ โโโ Task.js # Task schema
โ โ โโโ Subject.js # Subject schema
โ โ โโโ Goal.js # Goal schema
โ โ โโโ Achievement.js # Achievement schema
โ โ โโโ Blog.js # Blog post schema
โ โ โโโ Song.js # Music schema
โ โ โโโ Quiz.js # Quiz schema
โ โ
โ โโโ controllers/
โ โ โโโ auth.controller.js # Auth logic
โ โ
โ โโโ routes/
โ โ โโโ auth.routes.js # Authentication
โ โ โโโ user.routes.js # User management
โ โ โโโ session.routes.js # Study sessions
โ โ โโโ task.routes.js # Task CRUD
โ โ โโโ subject.routes.js # Subject management
โ โ โโโ goal.routes.js # Goal tracking
โ โ โโโ achievement.routes.js # Achievements
โ โ โโโ analytics.routes.js # Analytics data
โ โ โโโ ai.routes.js # AI assistant
โ โ โโโ blog.routes.js # Blog system
โ โ โโโ song.routes.js # Music library
โ โ โโโ admin.routes.js # Admin panel
โ โ
โ โโโ utils/
โ โโโ sendEmail.js # Email service
โ
โโโ Documentation/ # Project docs
โโโ PERFORMANCE_REPORT.md # Optimization details
โโโ DEPLOYMENT_OPTIMIZED.md # Deploy guide
โโโ OPTIMIZATION_SUMMARY.md # Quick reference
โโโ ADMIN_COMMANDS.md # Admin commands
โโโ ADMIN_PANEL_SETUP.md # Admin setup
โโโ CHANGELOG.md # Version history
โโโ readme.md # This file
This section explains how to use StudyFlow effectively from the first login to productivity analysis.
- Create an account or log in securely
- Set your study preferences
- Add subjects you want to focus on
- Create subjects (e.g., Math, Programming, Design)
- Add tasks under each subject
- Define goals to track your progress
- Organize your workflow for focused sessions
- Choose a focus duration (default: 25 minutes)
- Select a subject and optional task
- Start the Pomodoro timer
- Take short or long breaks when prompted
- Paste YouTube links for background focus music
- Upload and play local audio files
- Control volume and playback without interrupting sessions
- Create a distraction-free study atmosphere
- Track total focus time per day, week, and month
- View visual charts to analyze productivity trends
- Identify your most productive subjects
- Improve consistency using data-driven insights
Plan tasks โ Start focus session โ Take breaks โ Review analytics โ Improve tomorrow
StudyFlow is designed to help you build long-term study habits, not just short sessions.
Salah Uddin Kader
Full Stack Developer | UI/UX Designer | Tech Enthusiast
Passionate about building scalable web applications and clean user experiences.
StudyFlow reflects my journey in mastering modern full-stack development.
๐ Always learning โข Always building โข Always improving
Contributions are highly appreciated and help make StudyFlow better for everyone.
- ๐ด Fork the repository
- ๐ฑ Create a feature branch
git checkout -b feature/your-feature-name git commit -m "Add: meaningful feature description" git push origin feature/your-feature-name
This project is licensed under the MIT License, a permissive open-source license that allows you to:
- โ Use the software freely
- โ Modify and adapt it for your needs
- โ Distribute and share it
- โ Use it for personal or commercial projects
As long as the original copyright and license notice are included.
All rights reserved under the MIT License.
Q: Is StudyFlow free?
A: Yes! Completely free and open-source under MIT License.
Q: Can I use it offline?
A: Yes! Install as PWA for offline access.
Q: Is my data secure?
A: Yes. Bcrypt encryption + JWT tokens + MongoDB security.
Q: Token expiry time?
A: 30 days - then you need to re-login.
Scroll button not showing?
โ
Scroll past 300px - it appears with bounce animation
Service Worker not updating?
โ
DevTools โ Application โ Unregister SW โ Hard reload
PWA not installing?
โ
Use HTTPS (or localhost) + Check manifest.json
AI not responding?
โ
Verify GEMINI_API_KEY in backend .env
Lighthouse Score: 94/100 โก
First Paint: 1.2s
Time to Interactive: 3.2s
Bundle Size: 198 KB (first load)
Cached Load: < 10 KB
- Mobile native apps
- Browser extensions
- Flashcard system
- Note-taking
- Calendar sync
- Social features
- ๐ Performance Report
- ๐ Deployment Guide
- ๐ Issue Tracker
- ๐ง salauddinkaderappy@gmail.com
โญ Thank you for exploring StudyFlow
Happy Learning โข Happy Building โข Keep Growing