FocusBubble helps you track your deep work, visualize your focus habits, and get AI-generated feedback on how to improve your productivity.
β Star if you lose focus easily β let's build better habits together! β
Live Demo Β· Report Bug Β· Request Feature
Made with focus by the Krubles Team π«§
Beautiful, distraction-free timer with breathing animations and auto-hiding controls
Full-featured timer with all controls visible for quick access
7-day focus statistics with beautiful Recharts visualizations
Personalized productivity tips powered by OpenAI GPT-4 & Claude 3.5
Context-aware motivation based on your performance
- 500x500px centered bubble with glassmorphism design
- Breathing animations (4-second cycle) for meditation-like focus
- Pulsing glow effect when timer is active
- Auto-hiding controls (fade after 3 seconds)
- Floating ambient orbs with figure-8 motion
- Confetti celebration when sessions complete
- Zero distractions β just you and the timer
- All controls always visible
- Quick access to 25/50/90 minute presets
- Start/Pause/Reset buttons with icons
- Linear progress bar
- Perfect for quick pomodoros
- Page Visibility API integration
- Automatically pauses when you switch tabs
- Tracks distraction count per session
- Warning banner with resume button
- Helps build awareness of focus breaks
- 7-day rolling statistics
- 4 metric cards:
- Total Focus Time
- Total Sessions
- Average Session Length
- Total Distractions
- 3 interactive charts:
- Area Chart: Daily focus time trends
- Bar Chart: Sessions per day
- Line Chart: Distraction patterns
- 3 AI providers:
- π Local Analysis β Rule-based, instant, free
- π§ OpenAI GPT-4 β Advanced pattern recognition
- π― Anthropic Claude 3.5 Sonnet β Deep analysis
- Performance tiers: Excellent, Good, Needs Improvement
- Pattern detection: Improving, Declining, Consistent
- Personalized suggestions based on your data
- Regenerate anytime for fresh perspectives
- 50+ unique tips across 8 categories
- Smart algorithm adapts to your performance
- Context-aware messaging:
- Celebrate achievements
- Encourage improvement
- Provide actionable advice
- Inspirational quotes for variety
- localStorage β All data stays on your device
- 100% private β No server uploads
- Automatic saving β Sessions saved on completion
- Survives refreshes β Data persists across sessions
- Soft gradients (indigo β purple β pink)
- Smooth animations with Framer Motion
- Glassmorphism effects for modern UI
- Responsive layout β Works on all screen sizes
- Dark mode ready β Easy to customize
- React 18.2.0 β Modern hooks and functional components
- React Router β (Optional) Multi-page navigation
- TailwindCSS 3.4.1 β Utility-first CSS framework
- Framer Motion 10+ β Production-ready animation library
- Custom CSS β Glassmorphism and gradient effects
- Recharts 2.x β Beautiful, composable charts
- Custom SVG β Circular progress rings
- Custom Hooks:
useTimerβ Core timer logic with distraction detectionuseFocusStatsβ Session tracking and statisticsuseLocalStorageβ Data persistence wrapper
- OpenAI API β GPT-4 for advanced insights (optional)
- Anthropic API β Claude 3.5 Sonnet (optional)
- Local Analysis β Rule-based fallback (free)
- Page Visibility API β Tab/window focus detection
- localStorage API β Client-side data persistence
- Web Animations API β Enhanced animation performance
- Create React App β Zero-config setup
- PostCSS β CSS processing
- ESLint β Code quality
- npm β Package management
The rule-based local analyzer evaluates your focus data using predefined criteria:
// Example: Performance tier calculation
if (completionRate > 80 && avgDistractions < 2) {
tier = "Excellent"; // π
} else if (completionRate > 60 && avgDistractions < 4) {
tier = "Good"; // π
} else {
tier = "Needs Improvement"; // πͺ
}Pattern Detection:
- Compares recent vs. previous sessions
- Identifies improving/declining trends
- Provides specific, actionable feedback
No API Key Required!
When configured, FocusBubble sends your session statistics to OpenAI's GPT-4 model:
Request Format:
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a productivity coach..."
},
{
"role": "user",
"content": "Sessions: 12, Total time: 3.2h, Avg distractions: 2.5..."
}
],
"max_tokens": 150,
"temperature": 0.7
}Response Example:
"You're making solid progress with 12 sessions completed! Your distraction count of 2.5 per session is good, but there's room for improvement. Try using website blockers during your focus time and schedule specific times to check messages. Your consistency is building a strong habitβkeep it up!"
Claude provides deeper analysis with nuanced understanding:
Request Format:
{
"model": "claude-3-5-sonnet-20241022",
"messages": [
{
"role": "user",
"content": "Analyze focus data: [statistics]..."
}
],
"max_tokens": 200
}Response Example:
"Your 12 sessions over 3.2 hours show commendable consistency. The 2.5 average distractions suggest you're building focus stamina, though there's potential to reduce interruptions further. Consider the 'two-minute rule': if a distraction takes less than 2 minutes, handle it immediately; otherwise, note it for later. This reduces mental load while maintaining flow."
β
Your data never leaves your device unless you explicitly enable AI features
β
API keys stored locally in browser (not on servers)
β
You control when to send data to AI providers
β
No tracking β We don't collect analytics
β
Open source β Review the code yourself
# 1. Clone the repository
git clone https://github.com/C-Elkins/focusbubble.git
cd focusbubble
# 2. Install dependencies
npm install
# 3. Start the development server
npm start
# 4. Open in browser
# App will automatically open at http://localhost:3000- Get an API key from OpenAI Platform
- Open FocusBubble β Dashboard β AI Insights
- Click the settings icon
- Select "OpenAI" provider
- Paste your API key
- Generate insights!
- Get an API key from Anthropic Console
- Open FocusBubble β Dashboard β AI Insights
- Click the settings icon
- Select "Claude" provider
- Paste your API key
- Generate insights!
Note: Local analysis works without any API keys!
Option A: Minimal Bubble (Recommended)
- Click "Focus Bubble" tab
- Select duration (25, 50, or 90 minutes)
- Click Start
- Stay still β controls auto-hide after 3 seconds
- Focus deeply π§
Option B: Traditional Timer
- Click "Focus Timer" tab
- Select duration
- Click Start
- All controls remain visible
- Timer runs in background
- Switching tabs = distraction detected
β οΈ - Resume anytime with the banner button
- Completion = confetti celebration! π
- Click "Dashboard" tab
- See your statistics:
- π 7-day trends
- β±οΈ Total focus time
- π― Session count
- ποΈ Distractions tracked
- In Dashboard, scroll to AI Insights Card
- Choose provider (Local, OpenAI, or Claude)
- Click "Generate Insight"
- Read personalized feedback
- Regenerate anytime for fresh perspectives
- Motivational tips appear automatically in Dashboard
- Tips adapt to your performance
- Click refresh icon for variety
- Celebrate wins, learn from setbacks
focusbubble/
βββ public/
β βββ index.html # Main HTML
β βββ favicon.ico # App icon
β βββ logo.svg # FocusBubble logo
β
βββ src/
β βββ components/
β β βββ FocusBubble.jsx # β Minimal timer interface
β β βββ Timer.jsx # Traditional timer
β β βββ Dashboard.jsx # Analytics dashboard
β β βββ AIInsightsCard.jsx # AI insights widget
β β βββ MotivationalTip.jsx # Motivational tips display
β β βββ ...
β β
β βββ hooks/
β β βββ useTimer.js # Timer logic + visibility API
β β βββ useFocusStats.js # Statistics management
β β βββ useLocalStorage.js # Data persistence
β β
β βββ utils/
β β βββ aiInsights.js # AI integration (285 lines)
β β βββ motivationalTips.js # Tip generation (285 lines)
β β βββ formatTime.js # Time formatting
β β
β βββ pages/
β β βββ FocusApp.jsx # Main app with navigation
β β
β βββ App.jsx # Root component
β βββ index.js # React entry point
β βββ index.css # Global styles + Tailwind
β
βββ documentation/
β βββ FOCUSBUBBLE_DESIGN.md # Design philosophy
β βββ INTERFACE_COMPARISON.md # Timer comparison
β βββ AI_INSIGHTS_GUIDE.md # AI setup (450+ lines)
β βββ MOTIVATIONAL_TIPS_GUIDE.md # Tips system
β βββ LOCALSTORAGE_PERSISTENCE.md # Data persistence
β βββ PROJECT_COMPLETE.md # Project summary
β
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind configuration
βββ postcss.config.js # PostCSS setup
βββ README.md # You are here!
Edit src/components/FocusBubble.jsx:
// Current gradient: indigo β purple β pink
className="bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50"
// Change to: blue β teal β green
className="bg-gradient-to-br from-blue-50 via-teal-50 to-green-50"Edit src/components/Timer.jsx:
const presetDurations = [
{ label: '15 min', minutes: 15 }, // Short sprints
{ label: '25 min', minutes: 25 }, // Classic pomodoro
{ label: '45 min', minutes: 45 }, // Deep work
{ label: '90 min', minutes: 90 }, // Flow state
];Edit src/utils/motivationalTips.js:
if (totalHours >= 20) {
tips.push({
category: 'hours',
message: "π 20+ hours! You're a productivity machine!",
weight: 10
});
}Edit src/components/FocusBubble.jsx:
// Breathing animation (current: 4 seconds)
breathe: {
scale: [1, 1.05, 1],
transition: {
duration: 4, // Change to 6 for slower
repeat: Infinity,
ease: "easeInOut"
}
}# 1. Install Vercel CLI
npm install -g vercel
# 2. Deploy
vercel
# 3. Follow prompts
# Your app will be live at: https://focusbubble.vercel.app# 1. Build the app
npm run build
# 2. Deploy the 'build' folder
# Drag & drop to Netlify or use CLI
netlify deploy --prod --dir=build# 1. Install gh-pages
npm install --save-dev gh-pages
# 2. Add to package.json
"homepage": "https://C-Elkins.github.io/focusbubble",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
# 3. Deploy
npm run deployWe love contributions! Whether it's:
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ Design enhancements
- π Translations
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Commit with descriptive messages
git commit -m "Add: Amazing new feature" - Push to your fork
git push origin feature/amazing-feature
- Open a Pull Request
- Add sound effects (timer complete, distraction alert)
- Implement keyboard shortcuts (Space = pause/play)
- Create dark mode toggle
- Add export to CSV feature
- Build mobile app (React Native)
- Integrate with Notion/Todoist
- Add team/social features
- Create browser extension
- Support for custom backgrounds
- Pomodoro break reminders
This project is licensed under the MIT License β see the LICENSE file for details.
You're free to:
- β Use commercially
- β Modify
- β Distribute
- β Private use
Just include the original license!
- Cal Newport's "Deep Work"
- Pomodoro Technique by Francesco Cirillo
- Be Focused app design principles
- Flow State research
- React β UI library
- TailwindCSS β Styling
- Framer Motion β Animations
- Recharts β Data visualization
- OpenAI β AI insights
- Anthropic β Claude AI
- Emoji icons from Unicode Consortium
- SVG icons custom-designed
- GitHub: @C-Elkins
- Team: Krubles Team
- Email: Contact info coming soon
- Social: Links will be updated
If FocusBubble helps you stay productive, give it a β and share it with friends!
Made with β€οΈ by the Krubles Team Β· C-Elkins
Happy Focusing! π«§β±οΈπ§
Initial Release
β¨ Features:
- Dual timer interfaces (Bubble + Traditional)
- Page Visibility API distraction detection
- 7-day analytics dashboard
- AI insights (Local, OpenAI, Claude)
- Motivational tips system
- localStorage persistence
- Beautiful animations with Framer Motion
π Documentation:
- Complete setup guide
- AI integration tutorial
- Customization examples
- Contribution guidelines
π¨ Design:
- Glassmorphism UI
- Soft gradients
- Responsive layout
- Smooth animations
- Sound effects
- Keyboard shortcuts
- Dark mode
- Export data
- Custom themes
- Break reminders




