Timesheet Application: Smart Time Tracking

Project: A modern time-tracking application with JSON database and n8n automation for optimal insight into time spent

PHP Backend JSON Database n8n Automation Real-time Dashboard Google Sheets Sync

The challenge

As an entrepreneur with multiple businesses (De_Eijk, De_AIjk, Eijkpunt, AI-2-GO), having insight into time spent is essential. Where does the time go? Which projects are billable? How much time goes to administration versus billable work?

Existing time-tracking tools are often too complex, too expensive, or require a subscription. Additionally, full control over my own data was important — without depending on external platforms.

The core question

"How can I build a simple, fast time-tracking tool that is fully under my own control?"

From Google Sheets to JSON: Evolving insights

A great example of continuous development and learning from practical experience.

VERSION 1.0

Direct Google Sheets synchronisation

Approach: Every time entry was written directly to Google Sheets via n8n.

  • Advantage: Data directly in Sheets for analyses
  • Advantage: Automatic backup in Google Drive
  • Disadvantage: Very slow (everything via internet)
  • Disadvantage: User experience not optimal
  • Disadvantage: Dependent on n8n availability
Development
VERSION 2.0

JSON database with nightly sync

Approach: Local JSON database on the website, automatically synced to Sheets at night.

  • Advantage: Lightning-fast processing (local)
  • Advantage: Optimal user experience
  • Advantage: Data preserved during site upgrades
  • Advantage: Backup to Sheets for analyses
  • Advantage: Works even if n8n is temporarily offline
Key learning

This evolution demonstrates the importance of evolving insights. The first version worked, but practice showed that speed and reliability were more important than real-time synchronisation. By introducing the JSON database, we preserve all the benefits of both worlds: speed and backup.

How it works

A smart combination of local storage and automatic synchronisation.

Enter time

JSON storage

Real-time update

Nightly sync

Google Sheets

Technical architecture

  • Frontend: JavaScript ES6+ with in-memory cache for optimal speed
  • Backend: PHP 8.x RESTful API with JSON database for reliable storage
  • Database: Server-side JSON file with .htaccess protection
  • Automation: n8n workflows for sync, backup and AI features
  • Data structure: Goals, Subjects and Entries (time inputs)
  • Backup: Nightly export to Google Sheets at 03:00

Architecture principles: Self-hosted for full control, eventual consistency for speed, and fail-safe design so the app works even when n8n is temporarily offline.

n8n Workflows

  • Nightly Sync: Exports all data to Google Sheets for backup and analyses
  • Tasks CRUD: Manages goals and subjects via API calls
  • Dashboard Data: Collects statistics and generates reports
  • Authentication: Secure token-based access to the API endpoints
  • AI Agent: Chat interface for questions about time spent and analyses

Features

Everything you need for professional time tracking.

Weekly overview Visual display of all time entries per day with colours per goal
Multiple goals Distinction between De_Eijk, De_AIjk, Eijkpunt, AI-2-GO and Private
Subjects Detailed categorisation per subject within each goal
Live Dashboard Real-time overview of hours per goal, week and month
Billable hours Automatic calculation of billable hours and revenue
Quick entry Add time in seconds with visual slider
Responsive Works perfectly on desktop, tablet and smartphone
Secure Session-based authentication with .htaccess protection
Auto-backup Automatically to Google Sheets every night
Super fast JSON database provides instant response
Editable All entries editable and deletable after the fact
Colour coding Each goal and subject has its own colour for clarity

The result

Lightning-fast entry

Thanks to the JSON database and local cache, everything works instantly. No more waiting.

Complete insight

Real-time dashboards show exactly where time goes, per goal and subject.

Billing overview

See immediately how many hours are billable and what the expected revenue is per month.

Data under your own control

All data resides on your own server. No dependency on external parties.

Upgrade-proof

The JSON database is preserved during site updates. No more data loss.

Automatic backup

Every night everything is synced to Google Sheets for extra security.

Want better insight into how you spend your time?

A custom-built time-tracking application can give you insight into where your time goes.
Let's discuss what's possible for your situation.

Schedule a call
Questions about AI?

De_AIjk Assistant

Connecting...
Hello! I'm the AI assistant of De_AIjk. How can I help you?