I created a GitHub repository and decided to build this as a desktop app that runs in the background. After researching my options, I chose Electron because it lets me build the UI with HTML and CSS and create the backend/frontend with JavaScript while still allowing it to be used as an application. I used Electron Forge as a project template to start the application. For tracking the screentime, I used the paymoapp/active-window package, which checks the active window every 5 seconds and logs the time to a local JSON file with the app name, date, and time. The app automatically saves every 30 seconds and clears out any data older than 14 days.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.