Skip to content

๐ŸŽฏ About StudyFlow StudyFlow 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.

License

Notifications You must be signed in to change notification settings

salahuddingfx/Study-Flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

91 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

StudyFlow Hero Banner

A modern full-stack study & productivity application
Designed for deep focus, clarity, and consistent growth.


๐Ÿš€ StudyFlow โ€” Intelligent Productivity Ecosystem

Typing Animation

๐Ÿ”ด Live Demo โ€ข ๐Ÿ› Report Bug โ€ข โœจ Request Feature

## ๐ŸŽฏ About StudyFlow

StudyFlow 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.


โœจ Key Features

๐ŸŽฏ Core Productivity Features

  • โฑ๏ธ 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

๐Ÿ” Security & Authentication

  • ๐Ÿ”’ 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

โšก Performance & Technology

  • ๐Ÿš€ 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

๐ŸŽจ User Experience

  • ๐ŸŒ“ 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

๐Ÿ” SEO & Discovery

  • ๐Ÿ“ˆ 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


๐Ÿ† Achievement System

StudyFlow includes a gamified achievement system to motivate consistent study habits. Earn points and unlock badges by reaching study milestones:

๐Ÿ“š Study Time Achievements

  • 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 Achievements

  • Consistency King: Maintain a 7-day study streak (75 points)
  • Perfect Week: Study every day for a week (100 points)

๐ŸŽฏ Goal & Task Achievements

  • 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!


๐Ÿ› ๏ธ Technology Stack

๐Ÿ–ฅ๏ธ Frontend


โš™๏ธ Backend


๐Ÿ—„๏ธ Database


๏ฟฝ Performance & Optimization

โšก Lightning-Fast Load Times

StudyFlow has been meticulously optimized for maximum performance:

Core Web Vitals (Target Metrics)

  • 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

๐ŸŽฏ Lighthouse Scores (Target)

Performance:      90+ โšก
SEO:              95+ ๐Ÿ”
Accessibility:    95+ โ™ฟ
Best Practices:   95+ โœจ
PWA:             100 ๐Ÿ“ฑ

๐Ÿ› ๏ธ Optimization Techniques Applied

1. Critical Rendering Path

  • โœ… 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

2. Smart Caching Strategy

  • โœ… 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

3. Resource Optimization

  • โœ… 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)

4. SEO Enhancements

  • โœ… 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

5. Security Headers

  • โœ… 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

๏ฟฝ๐Ÿ“‹ Prerequisites

Before you begin, make sure all the above tools are installed and properly configured.


๐Ÿš€ Installation & Setup

1๏ธโƒฃ Clone the Repository

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:

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 model

Available AI Models:

  • gemini-2.0-flash-exp - โšก Unlimited (Recommended)
  • gemini-exp-1206 - โšก Unlimited
  • gemma-2-9b-it - Gemma 9B
  • gemma-2-27b-it - Gemma 27B
  • gemini-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 serve from the backend directly at http://localhost:5000.


๐Ÿš€ Deployment Guide

StudyFlow is optimized for multiple deployment platforms:

๐ŸŒ Option 1: Netlify (Recommended)

# 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

โšก Option 2: Vercel

# Install Vercel CLI
npm install -g vercel

# Deploy
vercel --prod

Features:

  • โœ… Edge network
  • โœ… Instant deployments
  • โœ… Automatic previews
  • โœ… Analytics included

๐Ÿ™ Option 3: GitHub Pages

# Push to GitHub
git add .
git commit -m "Deploy to GitHub Pages"
git push origin main

# Enable in Settings โ†’ Pages โ†’ Source: main branch

Note: Update URLs in code for GitHub Pages subdirectory.

๐Ÿณ Option 4: Docker

# 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

๐Ÿงช Testing & Quality Assurance

Performance Testing

# Lighthouse CI
npm install -g @lhci/cli
lhci autorun --collect.url=http://localhost:8000

# Or use Chrome DevTools
# F12 โ†’ Lighthouse โ†’ Run audit

Testing Tools

Browser Compatibility

  • โœ… Chrome/Edge (Chromium) 90+
  • โœ… Firefox 88+
  • โœ… Safari 14+
  • โœ… Samsung Internet 14+
  • โœ… Opera 76+

Device Testing

  • โœ… 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_KEY to 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

### ๐Ÿ› Bug Fixes (Latest)
- โœ… **Analytics Charts Fixed**: `updateCharts()` guard now properly has a `return` statement โ€” prevents concurrent render conflicts
- โœ… **Achievement 500 Error Fixed**: Added missing `quiz-perfects`, `quiz-completed`, `quiz-high-scores` types to Achievement model schema enum
- โœ… **API Request Smarter Retry**: Port fallback now only triggers on network failures (TypeError/ERR_CONNECTION_REFUSED), not on HTTP errors (401/500)
- โœ… **Canvas Always Visible**: Charts now render even with zero sessions โ€” shows empty axes instead of hiding the canvas
- โœ… **Achievement Level Safe Access**: Fixed potential crash when `achievement.level` is undefined

### ๐Ÿค– 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**: Stats cards now 3-column horizontal on all screen sizes
- ๐ŸŽญ **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 or serve from backend.
- AI: `GEMINI_API_KEY` in Backend `.env`.

If you change ports, update `API_BASE_URL` in `Assets/script.js` accordingly.

---

## ๐ŸŽฎ Usage Guide

This section explains how to use **StudyFlow** effectively from the first login to productivity analysis.

---

### ๐Ÿš€ First-Time Setup
1. **Create an Account** - Register with email, username, and password
2. **Verify Email** - Check your inbox for verification (if enabled)
3. **Complete Profile** - Add your name and preferences
4. **Add Subjects** - Create subjects you want to focus on
5. **Set Goals** - Define your study targets and deadlines

---

### โฑ๏ธ Focus Sessions (Pomodoro Timer)

#### Starting a Session
1. Navigate to **Focus Timer**
2. 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
3. Choose a **Subject** (optional)
4. Select a **Task** to work on (optional)
5. Click **Start** and begin focusing!

#### Timer Features
- ๐ŸŽฏ Visual circular progress indicator
- ๐Ÿ”” Customizable alarm sounds
- โธ๏ธ Pause and resume functionality
- ๐Ÿ”„ Auto-start next session
- ๐Ÿ“Š Session history tracking
- ๐ŸŽจ Color-coded timer modes

---

### ๐Ÿ“ Task Management

#### Creating Tasks
  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"

#### Task Features
- โœ… Mark as complete
- ๐Ÿ“… Deadline tracking with visual indicators
- ๐ŸŽจ Priority-based color coding
- โœ๏ธ Edit task details
- ๐Ÿ—‘๏ธ Delete completed tasks
- ๐Ÿ“Š Task completion statistics

---

### ๐ŸŽฏ Goal Tracking

#### Setting Goals

Title: "Study 50 Hours This Month" Type: Study Time / Task Completion / Custom Target: 50 hours Deadline: End of month Priority: High Category: Monthly Target


#### Goal Types
- **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

#### Progress Tracking
- ๐Ÿ“Š Real-time progress bars
- ๐Ÿ“ˆ Completion percentage
- โฑ๏ธ Time remaining
- ๐ŸŽฏ Milestone notifications
- ๐Ÿ† Achievement unlocks

---

### ๐Ÿ“Š Analytics Dashboard

#### Available Insights
- **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

#### Chart Types
- ๐Ÿ“Š Bar charts for time comparison
- ๐Ÿ“ˆ Line graphs for trends
- ๐Ÿฅง Pie charts for distribution
- ๐Ÿ“… Calendar heatmap for consistency
- ๐ŸŽฏ Gauge charts for goals

---

### ๐Ÿค– AI Study Assistant

#### Features
- **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

#### Using AI Assistant
  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

#### AI Models Available
- Gemini 2.0 Flash (Unlimited)
- Gemini Experimental (Unlimited)
- Gemma 2 (9B/27B variants)
- Smart fallback system

---

### ๐ŸŽต Focus Music Player

#### Supported Sources
- ๐ŸŽฅ YouTube videos (paste URL)
- ๐ŸŽต Local audio files
- ๐Ÿ“ป Background playlists
- ๐ŸŽง Curated study mixes

#### Player Controls
- โ–ถ๏ธ Play/Pause
- โญ๏ธ Next track
- ๐Ÿ” Loop mode
- ๐Ÿ”€ Shuffle
- ๐Ÿ”Š Volume control
- ๐Ÿ“ฑ Minimized player view

---

### ๐Ÿ† Achievement System

#### How It Works
- 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

#### Achievement Categories
- ๐Ÿ“š **Study Time** - Hour milestones
- ๐Ÿ”ฅ **Consistency** - Daily streaks
- ๐ŸŽฏ **Goals** - Goal completions
- ๐Ÿ“ **Tasks** - Task milestones
- ๐Ÿ“– **Subjects** - Subject diversity

---

### ๐ŸŽจ Customization

#### Themes
- ๐ŸŒ‘ Dark themes (multiple variants)
- โ˜€๏ธ Light themes
- ๐ŸŒˆ Custom color schemes
- ๐ŸŽจ Personalized palettes

#### Settings
- ๐Ÿ”” Notification preferences
- โฑ๏ธ Default timer durations
- ๐Ÿ”Š Sound settings
- ๐Ÿ“ฑ PWA installation
- ๐Ÿ” Privacy controls

---

### ๐Ÿ“ฑ Mobile Experience

#### PWA Installation

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

#### Mobile Features
- ๐Ÿ“ฑ Full offline support
- ๐Ÿ”” Push notifications
- ๐Ÿ“ฒ Native-like experience
- ๐ŸŽจ Adaptive UI
- โšก Fast loading

---

### ๐Ÿ” Account Management

#### Profile Settings
- โœ๏ธ Update name and username
- ๐Ÿ“ง Change email
- ๐Ÿ”‘ Change password
- ๐Ÿ–ผ๏ธ Upload profile picture
- ๐Ÿ—‘๏ธ Delete account

#### Data Management
- ๐Ÿ’พ Export all data (JSON/CSV)
- ๐Ÿ“Š View data statistics
- ๐Ÿ”„ Sync across devices
- ๐Ÿ—‘๏ธ Clear local cache
- ๐Ÿ“ฆ Backup and restore

---

### ๐Ÿ”„ Daily Workflow Example

#### Morning Routine
  1. Check daily tasks
  2. Set 3 priority tasks
  3. Start 25-min focus session
  4. Track progress

#### Study Session
  1. Choose subject
  2. Start Pomodoro timer
  3. Work distraction-free
  4. Take break when done
  5. Log session automatically

#### Evening Review
  1. Check analytics
  2. Mark tasks complete
  3. Review progress
  4. Plan tomorrow
  5. Celebrate achievements

---

## ๐Ÿ—๏ธ Application Architecture

### Frontend Architecture

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)


### Backend Architecture

Express.js Server โ”œโ”€โ”€ Routes (API Endpoints) โ”œโ”€โ”€ Controllers (Business Logic) โ”œโ”€โ”€ Models (MongoDB Schemas) โ”œโ”€โ”€ Middleware (Auth, Admin) โ”œโ”€โ”€ Utils (Email, Helpers) โ””โ”€โ”€ Config (Database, Env)


### Data Flow

User โ†’ Frontend โ†’ API โ†’ Controller โ†’ Model โ†’ MongoDB โ†“ Socket.IO (Real-time updates) โ†“ Service Worker (Caching)


### Security Layers
  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)

---

## ๐Ÿ“ Detailed File Structure

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


---

## ๐ŸŽฎ Usage Guide

This section explains how to use **StudyFlow** effectively from the first login to productivity analysis.

---

### ๐Ÿš€ First-Time Setup
1. Create an account or log in securely  
2. Set your study preferences  
3. Add subjects you want to focus on  

---

### ๐Ÿ“ Task & Subject Management
- Create subjects (e.g., Math, Programming, Design)  
- Add tasks under each subject  
- Define goals to track your progress  
- Organize your workflow for focused sessions  

---

### โฑ๏ธ Focus Sessions (Pomodoro)
- Choose a focus duration (default: 25 minutes)  
- Select a subject and optional task  
- Start the Pomodoro timer  
- Take short or long breaks when prompted  

---

### ๐ŸŽต Music & Focus Environment
- 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  

---

### ๐Ÿ“Š Productivity Analytics
- 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  

---

### ๐Ÿ” Daily Workflow Tip
> 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.


<!-- ================= DEVELOPER PROFILE ================= -->

## ๐Ÿ‘จโ€๐Ÿ’ป Developer

<p align="center">
  <img 
    src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&size=22&pause=1000&color=38B2AC&center=true&vCenter=true&width=700&lines=Salah+Uddin+Kader;Full+Stack+Developer;UI%2FUX+Designer;Building+Modern+Productivity+Tools" 
    alt="Developer Typing Animation"
  />
</p>

<p align="center">
  <strong>Salah Uddin Kader</strong><br/>
  Full Stack Developer | UI/UX Designer | Tech Enthusiast
</p>

<p align="center">
  Passionate about building scalable web applications and clean user experiences.<br/>
  StudyFlow reflects my journey in mastering modern full-stack development.
</p>

<p align="center">
  <a href="https://github.com/salahuddingfx">
    <img src="https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white"/>
  </a>
  <a href="mailto:salauddinkaderappy@gmail.com">
    <img src="https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white"/>
  </a>
  <a href="https://www.linkedin.com/in/salahuddingfx">
    <img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white"/>
  </a>
</p>

<p align="center">
  ๐Ÿš€ Always learning โ€ข Always building โ€ข Always improving
</p>


<!-- ================= CONTRIBUTING ================= -->

## ๐Ÿค Contributing

Contributions are highly appreciated and help make **StudyFlow** better for everyone.

### How to Contribute
1. ๐Ÿด **Fork** the repository
2. ๐ŸŒฑ **Create a feature branch**
   ```bash
   git checkout -b feature/your-feature-name
  1. โœ… Commit your changes
    git commit -m "Add: meaningful feature description"
  2. ๐Ÿš€ Push and open a Pull Request
    git push origin feature/your-feature-name

Contribution Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Test your changes before submitting
  • Update documentation when needed

License Banner


๐Ÿ“„ License

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.


ยฉ Copyright

All rights reserved under the MIT License.


License Footer Banner


โ“ FAQ & Troubleshooting

General Questions

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.

Common Issues

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


๐Ÿ“Š Performance Stats

Lighthouse Score:     94/100 โšก
First Paint:          1.2s
Time to Interactive:  3.2s
Bundle Size:          198 KB (first load)
Cached Load:          < 10 KB

๐ŸŽฏ Roadmap

  • Mobile native apps
  • Browser extensions
  • Flashcard system
  • Note-taking
  • Calendar sync
  • Social features

๐Ÿ“ž Support


StudyFlow Footer Banner

โญ Thank you for exploring StudyFlow
Happy Learning โ€ข Happy Building โ€ข Keep Growing

About

๐ŸŽฏ About StudyFlow StudyFlow 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.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published