Chrono Maxi is a personal time tracking software that helps you monitor and analyze how you spend your time on your computer. It consists of a Rust backend that captures your activity data and a Next.js frontend for visualizing and interacting with the data.
Use it to generate stats like the real time stats that chronomaxi powers on my personal website, andrewpynch.com
- Captures active window titles and timestamps using system-specific libraries.
- Stores activity data in a SQLite database.
- Calculates time spent on different activities and programs.
- Provides a RESTful API for the frontend to fetch activity data.
- Offers a user-friendly frontend interface to view and analyze time tracking data.
- Supports different time frames for data visualization (daily, weekly, etc.).
- Rust programming language
- Node.js and npm (or Yarn/Bun)
- SQLite
- xdotool (for Linux)
- Clone the repository:
git clone https://github.com/Andrew-Pynch/time-tracker.git
cd time-tracker
- Install xdotool
linux
sudo apt-get xdotool
macos
brew install xdotool
- Run the tracker / web interface
3.5 Run the tracker as a service (optional) Optionally, if you are on linux, you can run the tracker as a system service that runs on startup with an auto retry policy. Here is how you do it:
mkdir -p ~/.config/systemd/user
Copy the service template file to the user config directory: (Make sure to replace the path to your chronomaxi installation dir / tracker binary. You might have to run cargo build --release)
cp ./chronomaxi-tracker.service ~/.config/systemd/user
reload systemd after adding service file
systemctl --user daemon-reload
enable
systemctl --user enable chronomaxi-tracker.service
start
systemctl --user start chronomaxi-tracker.service
status
systemctl --user status chronomaxi-tracker.service
if its working the status should look something like this
linger
sudo loginctl enable-linger $USER
if you need to view logs
journalctl -u chronomaxi-tracker.service
cd frontend
cp .env.example .env.local_secrets
bun run local
cd tracker
cargo run
Make a PR and if its good or cool I will merge it :-)