r/git • u/snikolaev • 4d ago
We built a time tracker that uses Git as a database
We've been using Git for version control for years, but recently we decided to try something a bit different: using it as a database for our team's time tracker.
Instead of running a backend and a database, we built a browser extension that stores everything needed for team time tracking in a private GitHub repository.
Here's how it works:
- Time entries are stored as plain JSONL files, grouped by month and user.
- Each team member writes to their own branch.
- Changes are saved locally and synced in the background.
- Git gives us version history, data portability and a way to recover previous versions of our timesheets.
- Reports and invoices are generated directly in the browser.
Our whole team at Manticore Search has been using it for about a month now, and so far it's been working well.
The project is called Clockoli. It's free and open source, with no application backend of its own.
Clockoli relies on the GitHub API, but there's no Clockoli backend, and we don't have access to your time entries.
What I like most about this approach is that even if Clockoli disappears tomorrow, your data is still there. You can clone the repo, inspect its history, analyze the data with your own scripts or build your own tools around it.
10
u/DanLynch 4d ago
I admit I didn't study the code enough to know if you're using any GitHub-specific features, but why make this GitHub-specific? Why not support any Git vendor?
Your write-up seems to suggest you consider this tool "vendor neutral" and that it's a virtue, but it also seems like the user is locked into GitHub. Unless the documentation is just wrong about that.
7
u/sock_dgram 4d ago
Even after reading the README, I have no idea what this is doing.
How does this interact with Git or Github? How does a repository look like if you use it? There's some talk about timers, but I'd imagine that you are not constantly committing timestamps.
4
u/wildjokers 4d ago
I don't see any advantage to this over just using a database. The only thing a DB doesn't give you is "team member writes to their own branch" but that doesn't seem to offer any advantage over writing to a DB table.
Also, this requires github, not just git.
9
u/efalk 4d ago
You'd be surprised what can be a database. I once saw a directory of zero-length files being used as a name=>timestamp database.
2
u/cupcakeheavy 4d ago
this may be one of the first novel things i've seen in a while. While using the git-as-database is nice for this specific application, it would be good to see an abstraction (library) that can be used for other applications too. For example, this may be more interesting to some people who don't track time so granularly, but want more of a Jira-like project management approach. Using the git backend may be a good approach there too, and a separately maintained library could plug in to other use cases