Skip to content
Sheikh566Public

About

A Toggl-style time tracker for a single company, built on Cloudflare Workers, D1 and React.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

99 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hourlark

Self-hosted time tracking for your company, on a single Cloudflare Worker

Deploy TypeScript Cloudflare Workers React Hosting: $5/month License: MIT

Why $5 · Features · Screenshots · Quick start · Deploy · Documentation

Hourlark timer list view

Overview

Hourlark is a self-hosted alternative to Toggl Track for a single company. One Cloudflare Worker serves the React application and the same-origin /api/v1 API, with Cloudflare D1 as the authoritative database. Sign-in uses Google or Cloudflare Access, and every permission is enforced on the server.

There are no per-seat fees and no servers to manage: fork the repository, set a few GitHub variables, and every push to main deploys to your own Cloudflare account.

Runs on $5 a month

Hourlark needs no virtual machine, no managed Postgres, no Redis and no container host. The entire app, including its database and scheduled reminders, runs inside the Cloudflare Workers Paid plan, which costs $5 a month for the whole account.

Team of 50 Monthly cost
Hourlark on Cloudflare Workers $5
Toggl Track Starter, billed yearly $450
Toggl Track Starter, billed monthly $600

A 50-person team working 22 days a month uses about 4% of the plan's included CPU time and 3% of its included requests, with D1 reads and writes far below their allowances. Even with every tab open all day, usage stays under 15%. The Workers budget check shows the measurements, and every change that could raise the bill is checked against it before it ships.

Google sign-in adds no cost, and a workers.dev address is free; a custom domain is the only optional extra. Toggl prices are from toggl.com as of October 2026, at $9 and $12 per user per month.

Features

Time tracking

  • Authoritative, idempotent start/stop timers with one running timer per member.
  • Day and week list editing, plus calendar creation, drag and resize.
  • Overlap warnings, duplicate, continue, soft-delete and undo.
  • Long-running timer and tracking reminders, in-app and as browser push notifications.

Reports and exports

  • Summary and detailed reports with timezone-aware clipping, grouping and rounding.
  • Billable amounts, financial redaction by role, and project budget progress.
  • Formula-safe UTF-8 CSV and a Workers-native, client-ready PDF time report.

Workspace management

  • Clients, projects, project assignments, tags and members.
  • Member, Manager and Admin roles enforced by a centralized server policy.
  • Lock policies and an immutable audit history.

Screenshots

Screenshots use made-up sample data.

Calendar week view
Calendar: create, drag and resize entries on a weekly grid.
Timesheet view
Timesheet: weekly totals per project, editable per day.
Summary report
Reports: daily totals, billable amounts and project distribution, exportable to CSV and PDF.
Projects list
Projects: clients, billable defaults and time against budget.

Tech stack

Layer Technologies
Frontend React, Vite, Tailwind CSS, TanStack Query, React Hook Form, FullCalendar, Recharts
Backend Hono on Cloudflare Workers, Zod, jose, pdf-lib, date-fns/date-fns-tz
Data Cloudflare D1 with prepared statements and numbered SQL migrations
Testing Vitest in workerd, React Testing Library, Playwright with axe accessibility checks
Language TypeScript in strict mode throughout

Quick start

Requirements: Node.js 22.22.2+, 24.15.0+ or 26+, and pnpm 12.9.1 (the packageManager pin).

pnpm install --frozen-lockfile
cp .dev.vars.example .dev.vars
pnpm db:setup
pnpm dev

Open http://127.0.0.1:5173. The development seed provides three accounts; switch between them from the user menu:

Account Role
admin@example.com Admin
manager@example.com Manager
member@example.com Member
Installing pnpm 12 alongside an older pnpm

pnpm 12 is a native executable. If an existing pnpm 10 install cannot activate the pin, bootstrap the exact version into a temporary prefix and use that binary:

npm install pnpm@12.9.1 --prefix /tmp/pnpm-12.9.1
export PATH="/tmp/pnpm-12.9.1/node_modules/.bin:$PATH"
pnpm --version
How development sign-in works

Development authentication is enabled only when both AUTH_MODE=dev and ENVIRONMENT=development; otherwise the X-Dev-User-Email header is ignored. If the selected development member is deactivated or otherwise cannot authenticate, the error screen offers a development-only recovery panel: choose Use default development account to return to DEV_DEFAULT_USER_EMAIL, or select another seeded identity. Production builds exclude this panel; production identity recovery remains the responsibility of the identity provider and an active administrator.

Testing

pnpm validate
pnpm test:e2e

pnpm validate checks formatting, ESLint, strict TypeScript, Worker/runtime tests, React component tests and the production build. Worker tests apply the canonical D1 migrations in isolated workerd storage. pnpm test:e2e runs Playwright against a disposable seeded D1 database.

Deploy to Cloudflare

Fork the repository, add a CLOUDFLARE_API_TOKEN secret, a CLOUDFLARE_ACCOUNT_ID variable and your company settings in GitHub, and pushes to main deploy to your own Cloudflare account. No files need editing: pnpm deploy:configure generates the deployment configuration from those settings, and pnpm check:production refuses the example placeholders. Follow the step-by-step deployment guide for every setting, the first secrets, administrator setup and verification.

For a manual deployment with the same variables exported and an existing secret:

pnpm run deploy

Deploy from a release tag so the live Worker version is traceable; see versioning and releases. Never commit .dev.vars. Rotate the CSRF secret on an existing Worker with pnpm exec wrangler secret put CSRF_SECRET. With AUTH_MODE=access, Cloudflare Access must cover the entire production hostname, not only /api.

Documentation

Topic Documents
Deployment Deploy to your Cloudflare account · Versioning and releases · Operations and recovery
Architecture Architecture decisions · Assumptions · API conventions and export contracts
Security Security model · Dependency and Cloudflare review
Cost Workers budget check
Quality Testing
Product Toggl Track replacement scope · UI reference

License

Hourlark is released under the MIT License.

About

A Toggl-style time tracker for a single company, built on Cloudflare Workers, D1 and React.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages