Skip to content

Personalized time tracking spyware written in Rust / Typescript interface for visualizing data

Notifications You must be signed in to change notification settings

Andrew-Pynch/chronomaxi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrono Maxi

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 image image

Features

  • 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.).

Prerequisites

  • Rust programming language
  • Node.js and npm (or Yarn/Bun)
  • SQLite
  • xdotool (for Linux)

Getting Started

  1. Clone the repository:
git clone https://github.com/Andrew-Pynch/time-tracker.git
cd time-tracker
  1. Install xdotool

linux

sudo apt-get xdotool

macos

brew install xdotool
  1. 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 image

linger

sudo loginctl enable-linger $USER

if you need to view logs

journalctl -u chronomaxi-tracker.service

First Terminal (web interface)

cd frontend
cp .env.example .env.local_secrets
bun run local

Second Terminal (tracker)

cd tracker
cargo run

Contributing

Make a PR and if its good or cool I will merge it :-)

About

Personalized time tracking spyware written in Rust / Typescript interface for visualizing data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published