How would I go about building this app?

Hi everyone,

I’m interested in having a very simple app coded for Mac desktop. This is to scratch a personal itch but also to use it as an opportunity to learn. hence, why I am asking for advice and ideas here. Anyone is welcome to also code something similar and learn from the project.

I want to code an app that checks whether a user has been away from their computer and count the time away. The moment they return to the computer, it will pop up asking them to log the time away or to discard the time.

The app will wait for an idle time period that can be defined in the settings, the moment it detects mouse or keyboard movement, the background timer will reset and wait for idle time again.

The plan is to have it integrate to time tracking services’ APIs, like Timely, Toggl, etc.

Timing app does this incredibly well.

I would like to expand the use of the time tacking services’ API’s and at a later stage post the time to projects that can be pulled from my preferred service.

Why do I need an app like this? [Use case]

I need to track a lot of time and I use Timely as a service to automatically track what applications or websites I am working on. But the AI doesn’t have the ability to track idle time or away time. Which is all I need to complete the time tracking service me. Timing does a great job of detecting time like that but being a native app it’s not ideal for me. I prefer the SAAS of Timely.

It’s helpful to have an app like this if you get pulled away from your computer by phone calls, walk-in clients, colleagues, and their one-minute meetings.

Any advice, directions, ideas, anything would be appreciated.

Here’s a screenshot of how Timing app prompts you

30

Info that will be helpful

What programming language/ frameworks would be great for this
What Mac interactions would be necessary to determine keyboard/ mouse movements.
How would you structure an app like this?
Would you use something like Electron?

Sounds like you need to get to the os level. Minimum Applescript to get process id’s and such. The ultimate way is native mac os programming like ScreenFlow. It makes something like a screen recording except it tracks all onscreen objects over time and their interaction data so that when you edit you can drag and drop to rearrange windows and change the focus, etc. Electron gets yo onto the disc, but can you use a unix utility to get a timestamped list of process id’s and filter for foreground applications? I think you could track application window focus with applescript.

I can see front end web building an interface instead of interface builder, but how do you get deeper into the OS from there?