This is a great idea, and I was looking for something exactly like it the other day, but sending this over the network and storing it in a database? Noooo way.
You should watch this talk by the creator of Pinboard, Maciej Ceglowski. It's all about what harm your data can do to your users if you aren't careful.
I'm looking forward to trying this out.
I was part of a team who designed a time tracking system about 8 years ago, the ultimate goal was this kind of automation with tracking where you were and what you were working on, but it wasn't possible at the time.