A minimalist time tracking application that monitors your application usage and helps you understand where your time goes.
FocusTrack is a desktop application built with Electron that automatically tracks which applications you use throughout your day. It provides detailed insights into your productivity patterns through an intuitive dashboard and beautiful data visualizations.
Academic Context: This project was developed as a minor project for NTCC (University), demonstrating practical application of modern web technologies in desktop application development.
- Automatic Tracking: Monitors active applications in real-time
- Time Analytics: Detailed breakdown of time spent on each application
- Visual Dashboard: Beautiful pie chart visualizations of your usage patterns
- Session Management: Start, stop, and reset tracking sessions easily
- π Dark Mode: Easy-on-the-eyes dark theme with smooth transitions
- β¨οΈ Keyboard Shortcuts: Quick access to all major functions
Space: Start/Stop trackingR: Reset timerT: Switch between Dashboard and Analytics tabs
- π¨ App Icons: Visual identification with colorful fallback icons
- π Live Updates: Real-time display of active window information
- Minimalist Interface: Clean, distraction-free design
- Responsive Layout: Adapts to different window sizes
- Smooth Animations: Polished transitions and interactions
- Node.js (v18 or higher)
- Cross-platform support: Windows, macOS, and Linux
- macOS: Screen Recording permission required
- Windows: May require administrator privileges for some system access
- Linux: Should work out of the box
- Clone the repository
git clone https://github.com/YOUR_USERNAME/focustrack.git
cd focustrack- Install dependencies
npm install- Grant Required Permissions
macOS:
- Open System Settings β Privacy & Security β Screen Recording
- Add and enable Electron (or the app) to allow window tracking
Windows:
- The application should work without additional permissions
- If you encounter issues, try running as administrator
Linux:
- Should work without additional permissions
npm startCreate distributable installers:
# macOS (DMG + ZIP for Intel and Apple Silicon)
npm run build:mac
# Windows (requires Windows machine or CI/CD)
npm run build:win
# Linux (AppImage + DEB)
npm run build:linuxBuilt files will be in the dist/ folder.
- Electron 27.0.0: Cross-platform desktop application framework
- Node.js: JavaScript runtime
- get-windows: Native module for active window detection (cross-platform)
- HTML5/CSS3: Semantic markup and modern styling
- Vanilla JavaScript: No framework dependencies for lightweight performance
- D3.js v4: Data visualization for pie charts
- Bootstrap: CSS framework (minimal usage)
- electron-builder: Application packaging and distribution
- npm scripts: Development and build automation
FocusTrack/
βββ src/
β βββ main/
β β βββ index.js # Main Electron process
β β βββ createMainWindow.js # Window configuration
β β βββ ipc/
β β βββ windowTracker.js # IPC handlers for window tracking
β βββ renderer/
β βββ index.html # Main UI
β βββ css/
β β βββ style.css # Styles with theming support
β βββ js/
β βββ ui/ # UI-related modules
β β βββ tabs.js # Tab switching
β β βββ theme-toggle.js # Dark mode
β β βββ keyboard-shortcuts.js
β β βββ app-icons.js # Icon generation
β βββ tracker/ # Tracking modules
β β βββ script.js # Main tracking logic
β β βββ timer.js # Timer utilities
β βββ charts/
β βββ piechart.js # D3.js visualizations
βββ build/ # Build resources (icons)
βββ dist/ # Distribution files (generated)
βββ package.json # Project dependencies
βββ BUILD.md # Detailed build instructions
βββ DISTRIBUTION.md # Distribution guide
βββ FEATURES.md # Feature documentation
Uses the get-windows native module to detect the currently active application every 2 seconds. Tracks:
- Application name
- Window title
- Active time duration
- Number of times opened
- Interactive pie chart using D3.js
- Color-coded by application
- Legend with percentages
- Real-time updates
- CSS variables for easy theming
- Light and dark color schemes
- Persists preference to localStorage
- Smooth transitions between themes
- Global event listeners with smart context detection
- Prevents conflicts with text input fields
- Visual hints displayed in the UI
FocusTrack requires Screen Recording permission on macOS to detect active windows. This is a system-level security feature.
Data Privacy:
- All data stays on your local machine
- No cloud sync or external servers
- No analytics or tracking
- No internet connection required
- Institution: NTCC University
- Project Type: Minor Project
- Focus Area: Desktop Application Development with Web Technologies
- Cross-platform Development: Using Electron to build native desktop apps with web technologies
- Process Communication: IPC (Inter-Process Communication) between main and renderer processes
- Native Modules: Integration of Node.js native addons for system-level access
- Data Visualization: Creating interactive charts with D3.js
- UI/UX Design: Implementing modern design patterns and accessibility features
- State Management: Handling application state and data persistence
- Security: Understanding context isolation and secure IPC patterns
- Native module integration and compatibility across architectures
- Secure communication between Electron processes
- Real-time data updates and visualization
- Cross-platform build configuration
- macOS permission handling
- macOS Only: Window tracking currently only works on macOS
- Windows Version: Would require different native module (e.g.,
active-win) - Code Signing: Unsigned builds show security warnings on macOS
- Wine on Apple Silicon: Cannot build Windows installers from M1/M2/M3 Macs
- Windows and Linux support with platform-specific window trackers
- Export data to CSV/JSON
- Custom time range filtering
- Productivity goals and alerts
- Application categorization (Work, Entertainment, etc.)
- Weekly/monthly reports
- Menu bar mode for minimal UI
- Auto-start on system boot
- Idle time detection
This is an academic project, but contributions, issues, and feature requests are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Permission Issues: If the app cannot detect windows, try running as administrator
- GPU Errors: GPU process errors in console are normal and don't affect functionality
- Antivirus: Some antivirus software may flag the app - add it to exclusions if needed
- Screen Recording Permission: Required for window detection
- Notarization: For distribution, the app needs to be notarized by Apple
- Node.js Version: Ensure you're using Node.js v18 or higher
- Module Loading: If you see "get-windows" errors, try reinstalling dependencies
Shuhrat Kobulov
- GitHub: @shuhrat-kobulov
- University: Amity University Tashkent
- Electron team for the excellent framework
- D3.js community for visualization tools
get-windowspackage maintainers- Bootstrap for CSS utilities
- Amity University Tashkent for project support
For issues or questions related to this project:
- Open an issue on GitHub
- Contact: [[email protected]]
Note: This application supports Windows, macOS, and Linux. First-time users on macOS should grant Screen Recording permission in System Settings for full functionality.
Made with β€οΈ for Amity University Tashkent, Minor Project