An open API service indexing awesome lists of open source software.

https://github.com/severmanolescu/prism

A modern Electron-based desktop application for tracking application usage time with a Steam-inspired UI. Features automatic tracking, custom collections, daily statistics, and detailed session history.
https://github.com/severmanolescu/prism

activity-tracker application-monitoring desktop-app electron javascript nodejs productivity productivity-tool time-management time-tracker time-tracking usage-statistics

Last synced: about 1 month ago
JSON representation

A modern Electron-based desktop application for tracking application usage time with a Steam-inspired UI. Features automatic tracking, custom collections, daily statistics, and detailed session history.

Awesome Lists containing this project

README

          

# Prism


Prism Banner


Electron
JavaScript
HTML5
CSS3
SQLite
Status
License

A modern desktop application for tracking application usage time, built with Electron and inspired by Steam's UI design.

## Why "Prism"?

Just like a prism breaks white light into a beautiful spectrum of colors, **Prism** breaks down your raw application usage data into colorful, actionable insights. The name reflects the app's core purpose: transforming simple time tracking into detailed analytics, trends, and productivity metricsβ€”making the invisible visible.

## Features

### πŸ“š Library (Main Page)
- **Automatic Time Tracking** - Tracks all running applications automatically in the background
- **Steam-Inspired UI** - Clean, modern interface with familiar navigation patterns
- **Collections/Categories** - Organize apps into custom collections with colors and icons
- **Favorites System** - Quick access to your most-used applications
- **Daily Statistics** - View today's total usage time and app count at a glance
- **Search & Filter** - Find apps quickly with built-in search
- **Context Menus** - Right-click any app for quick actions (launch, favorite, hide, manage collections)
- **Hidden Apps** - Hide apps from your library while still tracking them
- **Real-time Updates** - Live updates as you use applications
- **Multiple Views** - Home, Collections, and Hidden apps views

### πŸ“Š Analytics
- **Daily Usage Charts** - Visualize your app usage over time with interactive charts
- **Top Applications** - See your most-used apps ranked by time spent
- **All Apps Overview** - Complete list with usage time, sessions, and last used info
- **Category Breakdown** - Time distribution across different app categories
- **AI-Powered Insights** - Smart suggestions based on your usage patterns
- **Hourly Activity Heatmap** - Hour-by-hour breakdown of which apps you use when
- **Custom Date Ranges** - View data for today, week, month, year, or custom periods
- **Export Functionality** - Export analytics data to CSV, JSON or PDF

### 🎯 Productivity
- **Productivity Score** - Overall score (0-100) based on productive, neutral, and unproductive time
- **Time Breakdown** - Visual breakdown of productive vs neutral vs unproductive time
- **Key Metrics Dashboard**:
- Focus Time tracking
- Distraction Time monitoring
- Context Switches counter
- Deep Work Sessions (25+ min sessions)
- Peak Productivity hours
- Most Productive Day
- **Productivity Trend Chart** - Track your score over time
- **Category Distribution** - See how productive time is distributed across categories
- **Top Apps Lists** - Most productive and most distracting apps
- **Session Analytics**:
- Session length distribution
- App switching frequency
- Productivity by time of day
- **Productivity Heatmap** - Hour-by-hour productivity breakdown
- **Custom Productivity Levels** - Mark apps as productive, neutral, or unproductive
- **Export Functionality** - Export productivity data to CSV, JSON or PDF

### 🎯 Goals
- **5 Goal Types**:
- **Productivity Score** - Target overall productivity score
- **Focus Time** - Track productive/neutral/unproductive time
- **Work Sessions** - Count deep work sessions (customizable duration)
- **App-Specific** - Track time on specific applications
- **Category Goals** - Track time spent on app categories
- **Flexible Frequencies** - Daily, weekly, or monthly goals
- **Real-Time Progress** - Live updates as you work towards goals
- **Goal Status Tracking** - Pending, in progress, achieved, or failed
- **Streak System** - Track consecutive days of goal achievement
- **Success Rate Analytics** - 7-day success rate chart and 30-day activity calendar
- **Goal Templates** - Pre-made templates for common productivity goals
- **Historical Data** - View goal progress for past dates
- **Auto-Save & Backfill** - Automatic progress tracking even when app was closed
- **Export Functionality** - Export goals data to CSV, JSON or PDF
- **Quick Stats** - Active goals, achieved today, current streak, and success rate

### πŸ“± App Details
- **Comprehensive Statistics**:
- Total time spent
- Session count
- Average session length
- Last used timestamp
- First tracked date
- **Usage Trends** - Visual chart showing usage over time
- **Calendar Heatmap** - 30-day activity visualization
- **Productivity Settings** - Override productivity level per app
- **Recent Sessions** - Detailed list of recent usage sessions with duration
- **Milestones** - Celebrate usage achievements (10h, 50h, 100h, etc.)
- **Insights & Recommendations** - Smart analysis of your usage patterns
- **Quick Actions** - Launch app, manage favorites, change productivity level

### Usage
- **Keyboard Shortcuts**
– Press ? anytime in the app to view all available shortcuts

### Images
- **Home View:**

Logo
- **Category Insights:**

Logo
- **Analytics Page:**

Logo
- **Productivity Page:**

Logo
- **Goals Page:**

Logo

## Installation
### Prerequisites
- Node.js 16 or higher
- npm or yarn
### Setup
1. Clone the repository

```bash
git clone https://github.com/severmanolescu/prism.git
cd prism
```
2. Install dependencies
```bash
npm install
```
3. Run the application
```bash
npm start
```
### Build
To create a distributable package:
```bash
npm run build
```
## Project Structure
```bash
prism/
β”œβ”€β”€ scripts/ # Useful scripts
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ main/ # Main process (Electron/Node.js)
β”‚ β”‚ β”œβ”€β”€ ipc/ # IPC handlers organized by domain
β”‚ β”‚ β”‚ └── exporters/ # IPC handlers for exporting PDF files
β”‚ β”‚ β”œβ”€β”€ services/ # Business logic (tracking, database, storage)
β”‚ β”‚ β”‚ └── data_access/ # Database access handlers
β”‚ β”‚ └── utils/ # Helper functions
β”‚ β”œβ”€β”€ preload/ # Preload script for IPC bridge
β”‚ └── renderer/ # Renderer process (UI)
β”‚ β”œβ”€β”€ styles/ # Modular CSS files
β”‚ β”‚ β”œβ”€β”€ analytics/ # Analytics page styles
β”‚ β”‚ β”œβ”€β”€ app-details/ # App details page styles
β”‚ β”‚ β”œβ”€β”€ category-insights/ # Category Insights page styles
β”‚ β”‚ β”œβ”€β”€ global/ # Global page styles
β”‚ β”‚ β”œβ”€β”€ goals/ # Goals page styles
β”‚ β”‚ β”œβ”€β”€ index-page/ # Main page styles
β”‚ β”‚ β”œβ”€β”€ productivity/ # Productivity page styles
β”‚ β”‚ └── shared/ # Shared page styles
β”‚ └── js/ # Frontend JavaScript modules
β”‚ β”œβ”€β”€ analytics/ # Analytics page logic
β”‚ β”œβ”€β”€ app-details/ # App details page logic
β”‚ β”œβ”€β”€ category-insights/ # Category Insights page logic
β”‚ β”œβ”€β”€ goals/ # Goals page logic
β”‚ β”œβ”€β”€ index-page/ # Main page logic
β”‚ β”œβ”€β”€ productivity/ # Productivity page Logic
β”‚ └── shared/ # Shared src
β”œβ”€β”€ assets/ # Images and icons
└── main.js # Main Electron entry point
```

## Usage
### Basic Operations
- **Launch apps** - Click any app card or right-click and select "Launch Application"
- **View details** - Click an app to see detailed usage statistics
- **Organize apps** - Create collections and drag apps into them
- **Search** - Use the search bar to filter applications
- **Today's stats** - View in the top-right corner of the window

### Collections
1. Click the grid icon in the sidebar to view collections
2. Click "Create New Collection" to add a new category
3. Right-click any app and select "Add to" to move it to a collection

### Hidden Apps
Apps can be hidden from the main view while still being tracked:
- Right-click an app β†’ More β†’ Hide from Library
- Access hidden apps via Library β†’ Hidden in the top menu

### Goals System
Set and track productivity goals with different frequencies (daily, weekly, monthly):
- **5 Goal Types**: Productivity score, focus time, work sessions, app-specific, category goals
- **Smart Tracking**: Real-time progress for current periods, historical data for past periods
- **Streak System**: Track consecutive days of goal achievement
- **Auto-Save**: Automatic backfill for missed days when app was closed

πŸ“š **[View Complete Goals System Documentation](src/main/services/GOALS_SYSTEM_README.md)**

### Data Storage
The application uses SQLite database for efficient data management
SQLite database provides better performance for queries and analytics while maintaining data integrity.

## Development
### Tech Stack
- **Electron** - Desktop app framework
- **Node.js** - Backend runtime
- **Vanilla JavaScript** - No framework dependencies
- **CSS3** - Custom styling with modular architecture

### Key Dependencies
- `electron` - Desktop application framework
- `active-win` - Get active window information (Windows/macOS/Linux)
- `better-sqlite3` - Better SQLite database for data persistence
- `auto-launch` - Auto-start on system boot

## Roadmap
- βœ… ~~Weekly/Monthly statistics view~~ - Implemented
- βœ… ~~Export data to CSV/JSON~~ - Implemented for Analytics, Productivity, and Goals
- βœ… ~~Application goals and limits~~ - Implemented with comprehensive Goals system
- βœ… ~~Productivity insights and analytics~~ - Implemented with dedicated Productivity page
- 🚧 Settings page - In progress
- πŸ“‹ Custom themes
- πŸ“‹ Notifications for goal achievements
- πŸ“‹ Desktop widgets for quick stats
- πŸ“‹ Multi-language support

## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/TestBranch`)
3. Commit your changes (`git commit -m 'Add some TestBranch'`)
4. Push to the branch (`git push origin feature/TestBranch`)
5. Open a Pull Request

## Acknowledgments
- UI design inspired by Steam's client interface
- Built with Electron for cross-platform compatibility

## Support
If you encounter any issues or have questions, please open an issue on GitHub.