A fully featured, modern, open-source productivity web app built with React + TypeScript
Created by Sudhir Kumar • @SudhirDevOps1
- About
- Who Is This For?
- Features Overview
- Page-by-Page Feature Details
- Advanced Features
- Gamification System (XP & Levels)
- Smart Insights & AI Suggestions
- PiP (Picture-in-Picture) Timer
- Keyboard Shortcuts
- JSON Data System
- UI/UX Design System
- Technical Architecture
- Performance Optimizations
- How to Use — Complete Guide
- Rules & Behavior
- Project Structure
- Tech Stack
- Getting Started
- Browser Support
- FAQ
RoutineFlow is a frontend-only, open-source daily routine and study tracking web application designed specifically for students. It helps you:
- 📅 Plan daily routines with time blocks
- 📚 Track study sessions subject-wise
- 🔥 Maintain streaks like school attendance
- 🎯 Set goals and track progress
- 🧘 Focus with Pomodoro timer
- 📊 Analyze your productivity patterns
- 💾 Export/import all data as JSON
No backend. No login. No server. No internet required.
Everything runs in your browser. All data is stored in localStorage — your data stays on YOUR device.
| Target User | Why RoutineFlow |
|---|---|
| 🎓 BTech / BCA / MCA Students | Track college study hours, manage subjects, maintain consistency |
| 💻 Self-Learners & Coders | DSA practice tracking, project time logging, coding routine |
| 📝 Exam Preparation Students | Intensive study schedules, subject-wise time tracking |
| 🏋️ Anyone Wanting Routine | Track any daily routine with categories |
| # | Feature | Description |
|---|---|---|
| 1 | 🏠 Dashboard | Hero stats, daily overview, mood tracking, habit tracker |
| 2 | 📋 Routine Builder | Create/edit daily routine blocks with time, category, color |
| 3 | 📖 Study Tracking | Log sessions with subject, time, status, rating, notes |
| 4 | 🔥 Streaks | School-style attendance, calendar heatmap, streak counter |
| 5 | 📊 Smart Analytics | Charts, best focus time, subject difficulty, weekly change |
| 6 | 🎯 Goals | Weekly/monthly/custom goals with progress tracking |
| 7 | 📁 Templates | Pre-built routines (Student, Coding, Exam, Library) |
| 8 | 🧘 Focus Timer | Normal + Pomodoro timer, Deep Focus mode, PiP floating |
| 9 | 📝 Weekly Review | 7-day performance review with export |
| 10 | 💾 Data Manager | JSON export/import, backup, reset |
| 11 | ⚡ XP & Levels | Gamification with 8 levels |
| 12 | 🧠 Smart Insights | AI-like suggestions based on your patterns |
| 13 | 📺 PiP Timer | Floating timer window — works outside browser |
| 14 | ⌨️ Command Palette | Ctrl+K quick commands |
| 15 | 🌓 Dark/Light Mode | Toggle anytime |
| 16 | ↩️ Undo System | Undo deleted items |
| 17 | 👤 Multiple Profiles | Study/Coding/Exam profiles |
| 18 | 🔄 Habit Tracker | Track daily habits |
| 19 | ⏰ Time Conflict Detection | Warns overlapping tasks |
| 20 | 📱 Mobile Responsive | Works on phone, tablet, desktop |
The home screen shows everything at a glance.
- App branding: RoutineFlow by Sudhir Kumar
- Current date displayed in full format
- Streak badge with fire animation (🔥)
- Best streak displayed
| Card | What it shows |
|---|---|
| 📅 Planned | Total planned study hours for today |
| ✅ Completed | How many hours you've completed today |
| ⏳ Pending | Number of tasks not yet done |
| 💪 Score | Productivity percentage (0–100%) |
- Shows current Level (1–8) with level name
- XP progress bar towards next level
- XP remaining to next level
| Field | Description |
|---|---|
| ⏰ Wake Up | Set what time you woke up today |
| 🌙 Sleep Time | Set what time you plan to sleep |
| 😊 Mood | Pick from 5 emojis: 😢 😐 🙂 😊 🤩 |
- Shows AI-like suggestions based on your data
- 4 types: Warning 🚨, Suggestion 💡, Achievement 🏆, Info 🧠
- Examples:
- "Your best focus time is around 7:00 PM"
- "Math completion rate is only 45%"
- "No break between DSA and OS. Add a short break!"
- "🔥 Amazing! 7 day streak!"
For each task today:
- Shows task name, time slot, category emoji, duration
- Color bar on left matching task color
- 3 status buttons:
- ✅ = Completed
- ⚡ = Partial
- ❌ = Missed
- Completed tasks show strikethrough
- Visual bar showing % of tasks done
- Changes color: 🟢 Green (80%+), 🟡 Yellow (50%+), 🔴 Red (<50%)
- Motivational message based on score:
- 90%+ → "🎉 Outstanding! You crushed it!"
- 70%+ → "💪 Great work! Keep pushing!"
- 40%+ → "👍 Good progress, keep going!"
- <40% → "🏃 Just getting started!"
- 0% → "⏳ Start your tasks to see progress!"
- Add daily habits with emoji icons (💧🏃📚🧘💊🍎✍️🎵😴🚿)
- Click to toggle done/not done for today
- Shows total days completed
- Green highlight when done today
Build your daily schedule block by block.
| Field | Type | Description |
|---|---|---|
| Task Name | Text | e.g., "DSA Practice" |
| Start Time | Time picker | When task starts |
| End Time | Time picker | When task ends |
| Category | Dropdown | Study 📚 / Coding 💻 / Exercise 💪 / Personal 🧘 / Break ☕ |
| Color Label | Color picker | 8 colors to choose from |
| Subject Link | Dropdown | Link to a subject (only for Study/Coding) |
| Notes | Text | Optional notes |
| Recurring | Checkbox | Repeat weekly |
| Days | Day buttons | Sun–Sat, select which days |
- Duration is auto-calculated from start/end time
- Time conflict detection — warns if new task overlaps existing ones
| Action | Icon | Description |
|---|---|---|
| Deep Focus | 🔲 | Opens task in full-screen focus mode |
| Duplicate | 📋 | Creates a copy of the task |
| Edit | ✏️ | Opens edit form with pre-filled data |
| Delete | 🗑️ | Deletes task (with undo support) |
- Add subjects with: Name, Color (12 options), Icon (15 emoji options)
- View all subjects as tags
- Delete subjects inline
- Subject icons: 📘📗📕📙💻🔬🧮📐🧪📊🌍⚡🎨📝🏛️
- Filter tasks by day: All / Sun / Mon / Tue / Wed / Thu / Fri / Sat
- Multiple profiles: Study 📚, Coding 💻, Exam 🎯
- Switch between profiles to see different task sets
- Create new profiles with custom name and emoji
- Each profile can have different routine tasks
Log and review your study sessions.
| Field | Description |
|---|---|
| Subject | Select from your subjects list |
| Date | Date picker (defaults to today) |
| Start Time | Session start |
| End Time | Session end |
| Status | ✅ Completed / ⚡ Partial / ❌ Missed |
| Rating | 1–5 stars (⭐⭐⭐⭐⭐) |
| Notes | What you studied (chapter, topic, etc.) |
- Filterable by date and subject
- Shows: Subject icon/name, status badge, time range, duration, rating stars, notes
- Total time calculated at top
- Delete sessions (with undo)
| Status | Color | Badge |
|---|---|---|
| Completed | 🟢 Green | ✅ completed |
| Partial | 🟡 Yellow | ⚡ partial |
| Missed | 🔴 Red | ❌ missed |
Track consistency like school attendance.
| Stat | Description |
|---|---|
| 🔥 Current Streak | How many consecutive days you've been active |
| 🏆 Longest Streak | Your all-time best streak |
| 📊 Weekly Consistency | Percentage of active days in last 7 days |
| 📅 Total Active Days | Total number of days with activity |
- Monthly calendar view with color-coded cells
- Navigate months with ◀ ▶ arrows
- Each cell shows:
- Day number
- Mood emoji (if set)
| Color | Meaning |
|---|---|
| 🟢 Green | Completed — at least one task completed |
| 🟡 Yellow | Partial — partial tasks but no completed |
| 🔴 Red | Missed — only missed tasks |
| ⬜ Gray | No data recorded |
| 🔵 Blue ring | Today's date |
- A day counts as "active" if you have completed tasks OR completed sessions
- Streak = consecutive active days counting backwards from today (or yesterday)
- If today has no data, streak counts from yesterday
- Missing a single day resets the current streak
- Longest streak remembers your all-time best
- Weekly consistency = (active days in last 7) ÷ 7 × 100%
Deep analysis of your study patterns.
| Stat | Description |
|---|---|
| ⏱️ Total Study | All-time total study minutes |
| 📈 Avg Daily | Average study time per active day |
| ⏳ Avg Session | Average length of one session |
| ⚡ Weekly Change | % improvement vs previous week |
- Analyzes all completed sessions by hour
- Tells you: "You study best around 7:00 PM"
- Based on which hour has the most completed study minutes
- Visual bar chart showing last 7 days of study
- Each bar shows:
- Day name (Mon, Tue, etc.)
- Study minutes on top
- Height proportional to study time
- Gradient colored bars (indigo → purple)
For each subject:
- Completion rate (completed ÷ total sessions × 100%)
- Total time spent
- Progress bar colored with subject's color
- Acts as a difficulty indicator — low completion rate = harder subject
Weekly Change = ((This week total - Last week total) / Last week total) × 100%
- Positive = improvement 📈
- Negative = decline 📉
Set and track short-term and long-term goals.
| Field | Options |
|---|---|
| Title | Free text |
| Description | Free text (optional) |
| Type | Weekly / Monthly / Custom |
| Category | Study / Fitness / Coding / Career / Personal |
| Target Date | Date picker |
| Target Hours | Number (for hour-based goals) |
- ✅ Completion toggle (circle checkbox)
- Title (strikethrough when done)
- Description
- Tags: type, category
- Days remaining countdown (or "Overdue!" in red)
- Progress bar if target hours set (current/target)
- Delete button
- All — show everything
- Active — only incomplete goals
- Completed — only finished goals
| Stat | Description |
|---|---|
| 🎯 Total | Total number of goals |
| 🏆 Done | Completed goals count |
| 🔥 Active | Goals still in progress |
Pre-built routine schedules you can load with one click.
"BTech / BCA / MCA students ke liye perfect"
| Time | Task |
|---|---|
| 6:00–6:30 | 🌅 Morning Exercise |
| 6:30–6:45 | 🧘 Meditation |
| 7:00–9:00 | 📚 Subject 1 Study |
| 9:00–9:30 | ☕ Breakfast Break |
| 9:30–11:30 | 📖 Subject 2 Study |
| 12:00–13:00 | 🍽️ Lunch Break |
| 14:00–16:00 | 📝 Assignment Work |
| 17:00–17:30 | 🏃 Evening Walk |
| 20:00–22:00 | 📚 Revision |
"Coders & developers ke liye"
| Time | Task |
|---|---|
| 7:00–7:30 | ☀️ Wake Up + Stretch |
| 8:00–10:00 | 💻 DSA Practice |
| 10:00–10:30 | ☕ Break |
| 10:30–13:00 | 🔧 Project Work |
| 13:00–14:00 | 🍽️ Lunch |
| 14:00–16:00 | 📖 Tech Learning |
| 17:00–19:00 | 💻 Open Source / Side Project |
| 21:00–22:00 | 📝 Blog / Notes |
"Exam preparation ke liye intensive schedule"
| Time | Task |
|---|---|
| 5:30–8:00 | 📚 Subject 1 - Deep Study |
| 8:00–8:30 | ☕ Quick Break |
| 8:30–11:00 | 📖 Subject 2 - Theory |
| 11:00–12:00 | 🍽️ Lunch |
| 12:00–14:30 | 📝 Subject 3 - Practice |
| 14:30–15:00 | 🧘 Power Nap |
| 15:00–17:00 | 📚 Subject 4 - MCQs |
| 17:00–17:30 | 🏃 Short Walk |
| 18:00–20:00 | 📖 Revision & Notes |
| 20:30–22:30 | 📝 Previous Year Papers |
"Library mein padhai ke liye"
| Time | Task |
|---|---|
| 8:00–8:30 | 🚶 Go to Library |
| 8:30–11:00 | 📚 Session 1 - Focus Study |
| 11:00–11:15 | ☕ Tea Break |
| 11:15–13:00 | 📖 Session 2 - Practice |
| 13:00–14:00 | 🍽️ Lunch Break |
| 14:00–16:30 | 📝 Session 3 - Notes |
| 16:30–16:45 | ☕ Short Break |
| 16:45–18:30 | 📚 Session 4 - Revision |
- Click "Load Template" on any template
- All tasks from that template are ADDED to your existing routine
- Tasks are set as recurring Mon–Fri by default
- You can edit/delete individual tasks after loading
- Templates don't overwrite — they add on top
A dedicated focus page with timer, Pomodoro, and distraction-free modes.
- Simple count-up timer
- Start → Pause → Resume → Reset
- No time limit — runs until you stop
- Work phase → Break phase → Work phase → ...
- Default: 25 minutes work, 5 minutes break
- Configurable in settings (5–120 min work, 1–30 min break)
- Shows current phase: 🔥 FOCUS TIME / ☕ BREAK TIME
- Progress bar for current phase
- Pomodoro count (how many completed)
- Browser notification when phase changes (if permissions granted)
- Large monospace digits:
00:00 - Animated pulse glow when running
- Direct DOM updates (no React re-renders)
- Link timer to any today's task from dropdown
- When you reset timer with >1 minute elapsed, linked task auto-marks as ✅ completed
- Full-screen black overlay (z-index: 9999)
- Only shows: current task, timer, play/pause/reset
- No distractions — all other UI hidden
- Press ESC or click exit to leave
- PiP button also available in deep focus
See PiP Timer section for full details.
| Setting | Range | Default |
|---|---|---|
| Work duration | 5–120 minutes | 25 min |
| Break duration | 1–30 minutes | 5 min |
Automatic weekly performance analysis.
| Stat | Description |
|---|---|
| 📚 Total Study | Study minutes in last 7 days |
| ✅ Tasks Done | Completed tasks this week |
| ❌ Missed | Missed tasks this week |
| 😊 Avg Mood | Average mood emoji |
| 📖 Sessions | Total study sessions |
| 📊 Consistency | Weekly consistency percentage |
- Shows which subject had the most study time
- Subject icon, name, and total time
For each of the last 7 days:
- Day name (Mon 15 Jan)
- Progress bar (filled based on study time vs planned)
- Total study time
- ✅/❌ status
- Mood emoji
- Click "Export Weekly Report" button
- Downloads a
.txtfile with:ROUTINEFLOW WEEKLY REPORT ======================================== by Sudhir Kumar (@SudhirDevOps1) Week: 2025-01-13 to 2025-01-19 Total Study: 14h 30m Tasks Completed: 28 Tasks Missed: 5 Consistency: 85% Streak: 12 days Avg Mood: 😊 Best Subject: Data Structures (4h 20m)
Complete control over your data.
6 cards showing counts:
- Subjects, Sessions, Tasks, Logs, Goals, Habits
- Total items stored
- Click "Download JSON"
- Downloads
routineflow-backup-YYYY-MM-DD.json - Contains ALL app data
- Click "Upload JSON"
- Select a previously exported
.jsonfile - All data is restored/overwritten
- Shows success/error alert
- Double confirmation required:
- First confirm: "
⚠️ Delete ALL data?" - Second confirm: "🚨 LAST CHANCE!"
- First confirm: "
- Clears everything permanently
- Developer info
- Storage type: 100% localStorage
- Keyboard shortcut reminder
- When you delete a task, session, or goal, it goes to undo stack
- Last 20 deletions are stored
- Undo via:
- Command palette (Ctrl+K → "↩️ Undo Last Action")
- Restores the deleted item
- Default profiles: Study 📚
- Create custom: Coding 💻, Exam 🎯, etc.
- Each profile can filter which routine tasks are shown
- Switch profiles from Routine page
- All profiles stored locally
- Add habits with custom emoji icons
- 10 pre-set icons: 💧🏃📚🧘💊🍎✍️🎵😴🚿
- Toggle completion per day
- Track total days completed
- Visible on Dashboard
- When adding/editing a routine task
- If the new time overlaps with existing task:
- Shows: "
⚠️ Time conflict detected!" - Still allows saving (warning only)
- Shows: "
- Checks:
newStart < existingEnd AND newEnd > existingStart
- Toggle from sidebar (desktop) or header (mobile)
- Keyboard: Ctrl+K → "🌙 Toggle Dark Mode"
- Persisted in localStorage
- Applies to entire UI including forms, cards, calendar
- Pomodoro phase changes trigger notifications:
- Work → Break: "🍅 Break time! Great focus session!"
- Break → Work: "🔥 Focus time! Get back to work!"
- PiP popup also sends notifications
- Requires browser notification permission
| Action | XP Earned |
|---|---|
| Complete a task | 10 XP per task |
| Study 5 minutes | 2 XP |
| Each streak day | 5 XP bonus |
Total XP = (Completed Tasks × 10) + (Study Minutes ÷ 5 × 2) + (Streak × 5)
| Level | XP Required | Title |
|---|---|---|
| 1 | 0 XP | 🌱 Beginner |
| 2 | 100 XP | 📗 Learner |
| 3 | 300 XP | 📘 Consistent |
| 4 | 600 XP | ⚡ Focused |
| 5 | 1000 XP | 🔥 Dedicated |
| 6 | 1500 XP | 💎 Expert |
| 7 | 2500 XP | 🏆 Master |
| 8 | 4000 XP | 👑 Legend |
- Sidebar (desktop): Level badge + XP bar + XP count
- Dashboard: Dedicated XP card with progress bar
- Mobile sidebar: Level and name
- Each level requires 500 XP to progress
- Progress = (XP % 500) / 5 → percentage
The app analyzes your data and generates intelligent insights.
| Type | Color | Example |
|---|---|---|
| 🧠 Info | Blue | "Your best focus time is around 7:00 PM" |
| Red | "Math completion rate is only 45%" | |
| 💡 Suggestion | Blue | "You missed 'Java' 3 times. Try a different time slot" |
| 🏆 Achievement | Green | "🔥 Amazing! 7 day streak!" |
-
Best Focus Time Detection
- Groups completed sessions by hour
- Finds the hour with most productive minutes
- Tells you when you study best
-
Subject Difficulty Score
- Calculates completion rate per subject
- If <50% completion with 3+ sessions → warns you
- Suggests breaking into smaller sessions
-
Missed Task Pattern Detection
- Checks last 7 days for repeatedly missed tasks
- If same task missed 3+ times → suggests time change
-
Streak Achievements
- 7+ days → "🔥 Amazing!"
- 30+ days → "👑 Legendary!"
-
Overload Warning
- If study/coding tasks total >8 hours → warns about burnout
- Suggests adding more breaks
-
No-Break Detection
- If two study tasks are back-to-back (<5 min gap)
- Suggests adding a short break
The most unique feature — float your timer outside the browser!
- Click "📺 PiP Mode" button on Focus page
- A popup window opens with the timer
- Popup is small (380×320px), positioned top-right
- You can drag, resize, and move the popup
- Switch to VS Code, YouTube, anything — timer stays visible!
| Feature | Description |
|---|---|
| ▶ Start / ⏸ Pause | Control timer from popup |
| ↺ Reset | Reset timer from popup |
| Timer Display | Large monospace digits with glow animation |
| Status Indicator | Green dot = running, Red dot = paused |
| Phase Display | Shows 🔥 FOCUS or ☕ BREAK in Pomodoro |
| Progress Bar | Pomodoro phase progress |
| Pomodoro Count | Shows "🍅 3 pomodoros" |
| Task Name | Shows linked task name |
| Title Bar | Timer shown in window title (00:00 — RoutineFlow) |
| Mode | Background |
|---|---|
| Normal (Dark) | Indigo gradient |
| Normal (Light) | Light blue gradient |
| Pomodoro Work | Dark red gradient |
| Pomodoro Break | Dark green gradient |
- Main App → Popup: Timer state syncs in real-time
- Popup → Main App: Play/pause/reset actions sync back via
postMessage() - On popup close: Final state synced to main app
- ✅ Focus page — main PiP button
- ✅ Deep Focus overlay — "Float Timer (PiP)" button
- ✅ Command palette — "📺 Toggle PiP Timer" command
- ✅ Desktop sidebar — PiP active indicator with close button
- ✅ Mobile header — PiP badge when active
| Browser | Support |
|---|---|
| Chrome | ✅ Works |
| Edge | ✅ Works |
| Brave | ✅ Works (popup approach) |
| Firefox | ✅ Works (popup approach) |
| Safari | ✅ Works (popup approach) |
| Opera | ✅ Works |
Note: If popups are blocked, you'll see a warning. Allow popups for the site.
- Purple glowing badge in mobile header
- Purple button in desktop sidebar
- Active status banner on Focus page with "Close PiP" button
| Shortcut | Action |
|---|---|
Ctrl + K |
Open Command Palette |
ESC |
Close Command Palette / Exit Deep Focus |
| Command | Action |
|---|---|
| 🏠 Go to Dashboard | Switch to Dashboard tab |
| 📋 Go to Routine | Switch to Routine tab |
| 📖 Go to Study | Switch to Study tab |
| 🔥 Go to Streaks | Switch to Streaks tab |
| 📊 Go to Analytics | Switch to Analytics tab |
| 🎯 Go to Goals | Switch to Goals tab |
| 🧘 Go to Focus Mode | Switch to Focus tab |
| 💾 Export Data | Download JSON backup |
| 🌙 Toggle Dark Mode | Switch dark/light |
| ↩️ Undo Last Action | Restore last deleted item |
| 📺 Toggle PiP Timer | Open/close PiP window |
- Fuzzy search — type to filter commands
- Keyboard accessible
- Click outside to close
- ESC to close
{
"subjects": [
{
"id": "unique-id",
"name": "Data Structures",
"color": "#3B82F6",
"icon": "📘"
}
],
"sessions": [
{
"id": "unique-id",
"subjectId": "subject-id",
"date": "2025-01-15",
"startTime": "09:00",
"endTime": "10:30",
"status": "completed",
"notes": "Binary Trees chapter completed",
"rating": 4
}
],
"routineTasks": [
{
"id": "unique-id",
"title": "DSA Practice",
"startTime": "08:00",
"endTime": "10:00",
"duration": 120,
"category": "coding",
"subjectId": "subject-id",
"colorLabel": "#8B5CF6",
"isRecurring": true,
"recurringDays": [1, 2, 3, 4, 5],
"notes": "Focus on graphs",
"order": 0
}
],
"dailyLogs": [
{
"date": "2025-01-15",
"completedTasks": ["task-id-1", "task-id-2"],
"partialTasks": ["task-id-3"],
"missedTasks": [],
"completedSessions": ["session-id-1"],
"mood": 4,
"notes": "",
"wakeUpTime": "06:30",
"sleepTime": "22:30",
"totalStudyMinutes": 240,
"productivityScore": 85,
"distractionMinutes": 15
}
],
"goals": [
{
"id": "unique-id",
"title": "Complete DSA in 30 days",
"description": "All topics from arrays to DP",
"targetDate": "2025-02-15",
"completed": false,
"createdAt": "2025-01-15",
"category": "Coding",
"type": "monthly",
"targetHours": 60,
"currentHours": 12
}
],
"habits": [
{
"id": "unique-id",
"name": "Drink Water",
"icon": "💧",
"streak": 5,
"completedDates": ["2025-01-13", "2025-01-14", "2025-01-15"],
"createdAt": "2025-01-10"
}
],
"profiles": [
{
"id": "default",
"name": "Study",
"icon": "📚",
"routineTaskIds": []
}
],
"activeProfileId": "default",
"streakData": {
"currentStreak": 7,
"longestStreak": 15,
"totalActiveDays": 23,
"lastActiveDate": "2025-01-15",
"weeklyConsistency": 85
},
"xpData": {
"totalXP": 1250,
"level": 6,
"levelName": "💎 Expert",
"todayXP": 1250,
"streakBonus": 35
},
"settings": {
"darkMode": false,
"theme": "indigo",
"pomodoroWork": 25,
"pomodoroBreak": 5,
"notificationsEnabled": false
}
}| Key | Data |
|---|---|
rf-subjects |
Subjects array |
rf-sessions |
Study sessions array |
rf-tasks |
Routine tasks array |
rf-logs |
Daily logs array |
rf-goals |
Goals array |
rf-habits |
Habits array |
rf-profiles |
Profiles array |
rf-profile |
Active profile ID |
rf-settings |
App settings |
rf-undo |
Undo stack |
- Export downloads the complete state of the app
- Import overwrites existing data with imported data
- Partial imports work — missing keys are kept as-is
- Invalid JSON shows error alert
- File must be
.jsonextension - File input resets after each import
- Semi-transparent background (
rgba(255, 255, 255, 0.85)) - Backdrop blur (
blur(12px)) - Subtle border (
rgba(255, 255, 255, 0.4)) - Soft shadow (
0 8px 32px rgba(0, 0, 0, 0.06)) - Hover: lift up 2px + indigo glow shadow
| Animation | Used For |
|---|---|
fadeInUp |
Page transitions (0.5s) |
fadeIn |
Modal appearances |
scaleIn |
Card appearances |
float |
Floating elements (3s loop) |
pulse-glow |
Timer when running |
streak-fire |
🔥 streak badge (1s loop) |
shimmer |
Loading/shimmer effects |
pip-glow |
PiP active indicator |
| Element | Light | Dark |
|---|---|---|
| Background | #F9FAFB |
#0F0F23 |
| Card BG | rgba(255,255,255,0.85) |
rgba(30,41,59,0.85) |
| Text | #111827 |
#E2E8F0 |
| Primary | #6366F1 (Indigo) |
#6366F1 |
| Success | #10B981 |
#10B981 |
| Warning | #F59E0B |
#F59E0B |
| Error | #EF4444 |
#EF4444 |
- App name "RoutineFlow" uses gradient: Indigo → Purple → Pink
- CSS:
linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899)
| Screen | Layout |
|---|---|
| Desktop (≥1024px) | Fixed left sidebar (256px) + content area |
| Mobile (<1024px) | Hamburger menu + bottom tab bar |
Shows 5 quick tabs + "More" button:
- 🏠 Dashboard
- 📋 Routine
- 📖 Study
- 🔥 Streaks
- 📊 Analytics
- ⋯ More (opens sidebar drawer)
- Thin (5px)
- Indigo gradient thumb
- Transparent track
App (Main Container)
├── State Management (useLocalStorage hooks)
├── Timer Engine (useTimerEngine — ref-based)
├── Deep Focus Overlay
├── Command Palette
├── Mobile Header
├── Mobile Sidebar Drawer
├── Desktop Sidebar
├── Page Router (switch/case)
│ ├── DashboardPage (memo)
│ │ └── HabitAddButton
│ ├── RoutinePage (memo)
│ ├── StudyPage (memo)
│ ├── StreakPage (memo)
│ ├── AnalyticsPage (memo)
│ ├── GoalsPage (memo)
│ ├── TemplatesPage (memo)
│ ├── FocusPage (memo)
│ │ └── TimerDisplay (memo)
│ ├── ReviewPage (memo)
│ └── DataPage (memo)
└── Mobile Bottom Nav
- No Redux, no Zustand, no Context API
- Pure
useState+useLocalStorage(custom hook) - Timer uses
useReffor zero-render updates useMemofor expensive calculationsuseCallbackfor stable function referencesReact.memo()on all page components
useTimerEngine (custom hook)
├── stateRef (useRef) — NO useState for elapsed
├── intervalRef (useRef) — setInterval handle
├── listenersRef (useRef) — pub-sub subscribers
├── toggle() — play/pause
├── reset() — reset to 0
├── setMode() — normal/pomodoro
├── setTaskId() — link to task
├── subscribe() — register listener (for TimerDisplay)
├── syncFromPip() — receive state from popup
└── getState() — read current state
setInterval+setStateevery second = entire app re-renders- With 10+ pages defined inside App, each re-render recreates all components
- This causes blinking/flickering
- Solution: Store elapsed in
useRef, update DOM directly via subscription - React state only updates on meaningful events (play/pause/reset/phase-change)
- Subscribes to timer engine's pub-sub
- Updates
textContentdirectly on DOM element viaref - Zero React re-renders for digit updates
React.memo()prevents parent re-renders from affecting it
| Optimization | Description |
|---|---|
| Ref-based timer | Timer elapsed stored in useRef, not useState — zero re-renders per second |
| Direct DOM updates | Timer digits updated via ref.textContent, not React state |
| React.memo() | All 10 page components wrapped in memo() |
| useMemo() | Heavy calculations (streak, XP, insights, tasks) memoized |
| useCallback() | Event handlers have stable references |
| Lazy filtering | Data filtered only when dependencies change |
| External page components | Defined outside App to prevent recreation |
| Pub-sub pattern | Timer uses subscription pattern instead of React state propagation |
| No external state library | Zero bundle size overhead from state management |
| Single file architecture | No unnecessary module boundaries for hot code |
- Go to 📋 Routine tab
- Click "📚 Subjects" button
- Add your subjects: Name, Color, Icon
- Examples: Data Structures (📘 Blue), OS (📗 Green), DBMS (📕 Red)
- Click "+ Add Task"
- Fill in: Name, Start Time, End Time, Category
- Link to a subject if it's Study/Coding
- Choose colors and recurring days
- OR use 📁 Templates to load a pre-built routine
- Go to 🏠 Dashboard
- Set your Wake Up time and Mood
- For each task:
- ✅ if completed
- ⚡ if partially done
- ❌ if missed
- Watch your progress bar fill up!
- Go to 📖 Study tab
- Click "+ Log Session"
- Select subject, set times, rate yourself
- Add notes about what you studied
- Go to 🧘 Focus tab
- Choose Normal or Pomodoro mode
- Link a task from dropdown
- Click Start — timer begins
- Use Deep Focus for distraction-free mode
- Use PiP to float timer while coding
- Go to 🔥 Streaks tab
- See your calendar heatmap
- Green = great day, Yellow = partial, Red = missed
- Keep the streak alive!
- 📊 Analytics — see your patterns and weak areas
- 📝 Review — weekly summary of your performance
- Follow Smart Insights on Dashboard
- Go to 💾 Data tab
- Click "Download JSON" regularly
- Keep backups safe — all data is local only!
| Status | Meaning | Dashboard Color | Calendar Color |
|---|---|---|---|
| ✅ Completed | Task fully done | Green bg | Green cell |
| ⚡ Partial | Task partially done | Yellow bg | Yellow cell |
| ❌ Missed | Task not done | Red bg | Red cell |
| — No status | Not marked yet | Default bg | Gray cell |
- A day is "active" if it has ANY completed tasks or completed sessions
- Current streak counts consecutive active days backwards from today
- If today is not active, streak counts from yesterday
- Missing one day breaks the current streak (but longest streak is preserved)
- Streak resets to 0 after a gap
- You can rebuild by being active again
Score = ((completed_count + partial_count × 0.5) / total_tasks) × 100%
- Completed tasks = 1.0 weight
- Partial tasks = 0.5 weight
- Missed tasks = 0 weight
- No tasks = 0%
- Duration = End Time − Start Time (in minutes)
- Negative durations are treated as 0
- Times are in 24-hour format internally, displayed as 12-hour AM/PM
- All data auto-saves to localStorage on every change
- No manual save button needed
- Data persists across page refreshes
- Data is cleared only by:
- Browser clear site data
- App reset (Data → Danger Zone)
- Manual localStorage clearing
- Data is device-specific — won't sync across devices
- Use JSON export/import to transfer between devices
- Templates ADD tasks — they don't replace existing ones
- Each loaded task gets a unique ID
- All template tasks default to Mon–Fri recurring
- Template tasks can be edited/deleted individually after loading
- Only deletions are undoable (tasks, sessions, goals)
- Last 20 deletions stored
- Edits are NOT undoable
- Undo stack is persisted in localStorage
- Each undo restores one item at a time
- Default profile "Study" always exists
- New profiles start with empty task filter
- Switching profiles changes which tasks are visible
- Tasks themselves are shared — profiles only filter view
- Deleting a profile doesn't delete tasks
routineflow/
├── index.html # Entry HTML with meta tags
├── package.json # Dependencies
├── tsconfig.json # TypeScript config
├── vite.config.ts # Vite + Tailwind + SingleFile config
├── README.md # This file
└── src/
├── main.tsx # React root mount
├── index.css # Global CSS, animations, glassmorphism
├── App.tsx # Main app component + all pages
├── types.ts # TypeScript interfaces
├── hooks/
│ └── useLocalStorage.ts # localStorage persistence hook
└── utils/
├── helpers.ts # All utility functions
└── cn.ts # Tailwind class merger
| File | Purpose | Lines |
|---|---|---|
App.tsx |
All components + logic | ~1200 |
helpers.ts |
Utilities + templates | ~350 |
types.ts |
TypeScript types | ~110 |
index.css |
Styles + animations | ~250 |
useLocalStorage.ts |
Hook | ~25 |
| Technology | Version | Purpose |
|---|---|---|
| React | 19.2 | UI framework |
| TypeScript | 5.9 | Type safety |
| Vite | 7.2 | Build tool (fast!) |
| Tailwind CSS | 4.1 | Utility-first CSS |
| Lucide React | 0.563 | Icon library (30+ icons used) |
| clsx | 2.1 | Conditional classnames |
| tailwind-merge | 3.4 | Tailwind class deduplication |
| vite-plugin-singlefile | 2.3 | Bundle into single HTML |
BookOpen, Clock, Menu, X, Plus, Trash2, Edit2, Check, Copy, ChevronLeft, ChevronRight, Sun, Moon, Play, Pause, RotateCcw, Download, Upload, AlertTriangle, Search, Zap, Trophy, Flame, TrendingUp, Timer, Brain, Command, Maximize2, FileText, Target, MonitorSmartphone, Minimize2, ExternalLink
- Node.js 18+ installed
- npm or yarn
# Clone the repository
git clone https://github.com/SudhirDevOps1/routineflow.git
cd routineflow
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewnpm run dev
# Opens at http://localhost:5173npm run build
# Output: dist/index.html (single file!)The build uses vite-plugin-singlefile to bundle everything into a single index.html file that you can:
- Host on any static server
- Open directly in a browser
- Share as a single file
- Deploy to GitHub Pages
| Browser | Version | Status |
|---|---|---|
| Chrome | 90+ | ✅ Full support |
| Edge | 90+ | ✅ Full support |
| Firefox | 90+ | ✅ Full support |
| Brave | Latest | ✅ Full support |
| Safari | 15+ | ✅ Full support |
| Opera | Latest | ✅ Full support |
| Mobile Chrome | Latest | ✅ Full support |
| Mobile Safari | Latest | ✅ Full support |
PiP Timer uses popup windows — works in ALL browsers. May need popup permission.
Q: Where is my data stored? A: Everything is in your browser's localStorage. Nothing is sent to any server.
Q: Will I lose data if I clear browser cache? A: Yes! Always export JSON backups regularly.
Q: Can I use this on mobile? A: Yes! Fully responsive with bottom navigation on mobile.
Q: Can I transfer data between devices? A: Yes — Export JSON on one device, Import on another.
Q: Does it work offline? A: Yes! Once loaded, it works completely offline. All data is local.
Q: Is there a login/signup? A: No. No authentication needed. Open and use.
Q: Can multiple people use it? A: Use multiple profiles on the same device, or export/import between devices.
Q: The PiP timer popup is blocked? A: Allow popups for the site in your browser settings.
Q: How do I reset everything? A: Data tab → Danger Zone → Reset All (requires double confirmation).
Q: Can I contribute? A: Yes! This is open-source. Fork, improve, and submit PRs.
Open-source. Free to use, modify, and distribute.
Sudhir Kumar
- GitHub: @SudhirDevOps1
- Project: RoutineFlow
Built with ❤️ for students who want to track their routine and study consistently.
🚀 RoutineFlow — Plan. Track. Grow.