As a full time developer who manages multiple client projects on a daily basis, I have to keep track of time spent on each project/site. I have to fill out a timesheet daily and submit it at the end of the week. I have to admit that I am a bit of a procrastinator and I would often forget to enter my time until half way through the week. By that point I had of course forgotten some of the things I had spent time on. Additionally, I have some clients that would prefer a more detailed breakdown of my time, like time per ticket/task instead of just how much time was spent working on the site overall.
I have used some other time tracking apps in the past (Upwork, Hubstaff, etc) but none of them are free and easily customizable. So I did what any good developer does in my position and I set out to hone my skills by trying something new. I have some experience working with Vue but i’ve never built a full SPA with it. I chose Vue for the same reason a lot of people choose Vue, it is an up and coming framework at the moment with a lot of flexibility and low learning curve/barrier to entry.
Here are the criteria I set out for the functionality of my app:
- Free with no signup/account required. I believe that simple tools like this should ACTUALLY be free and not syphon off all of your personal information behind your back.
- Ability to easily add/remove tasks and write simple descriptions.
- Easily track time spent on each task.
- Simple/Clean interface
- No database (SQL or NoSQL) required.
- Easily/freely self hosted on Github
Admittedly some of these requirements were easier than others. Building a simple To-do list in Vue is fairly trivial. Persisting your data to LocalStorage is also fairly trivial as long as you have worked with it before and understand the constraints. LocalStorage can only store strings so any JSON as to be stringified before being inserted/updated and parsed when being read. I have worked with LocalStorage a lot in the past so that was no issue.
The solution I found to this problem is a wonderful package called worker-timers. I did some testing in both Chrome and Firefox over several weeks to make sure that this functionality was consistent. I will talk more about this process and maybe share some walk throughs of the code. For now you can try it out for yourself (and email me about any bugs). Also, here is a quick teaser/demo video I made to demonstrate the functionality.