Back to home
Project
Active development

Self-Engine

A personal productivity system for intentional work — time tracking, projects and tasks, finances, calendar, and habits in one offline-first platform, shipped as a web, mobile, and desktop app.

3

apps — web, mobile, desktop

6

shared packages

29

synced tables

51

database migrations

~1,100

tests

34

AI capabilities
Why this exists

Time trackers don't know what an hour is worth. Finance apps don't know where the money comes from. Calendars show what was planned, never what actually happened. Every tool I tried treated work, money, time, and habits as separate worlds — so the connections between them lived in my head.

Self-Engine connects these domains in one system: a tracked hour knows its project, its rate, and its place in the calendar. And because life doesn't pause when the connection drops, it is offline-first by design — every feature works without a network, on every device, and syncs when you're back.

Architecture

Offline-first, actually

Every app writes to a local SQLite database first; a write never waits for the cloud. PowerSync queues the change and uploads it in order to Supabase, where Postgres remains the single source of truth with row-level security on every table. Remote changes flow back through per-user replication buckets into the local database, and the UI updates through live queries — there is no manual cache invalidation anywhere.

The domain lives in one shared package: 29 synced tables, Zod schemas, and typed collections that web and mobile consume identically. Business rules are pure functions — guards derive facts ("this time entry is already paid"), workflows turn them into decisions: proceed, confirm, choose, or block. The same rule protects a tap in the mobile app, a click on the web, and an AI tool call.

Identity is a single Clerk JWT used by both data paths: PowerSync validates it for replication, and Postgres row-level security enforces it on every query. The desktop app is an Electron shell around the web app — same local database, plus a tray timer, quick capture, and signed auto-updates.

App UI

React / React Native

Local SQLite

every write lands here first

PowerSync

ordered upload · per-user buckets

Supabase Postgres

source of truth · row-level security

A look inside
Web — dashboard
Web — dashboard
Web — calendar & time tracking
Web — calendar & time tracking
Mobile — today
Mobile — today
Mobile — habits
Mobile — habits
An assistant with guardrails

A built-in AI assistant exposes 34 typed capabilities across all domains. It works pull-first: the model receives counts and hints instead of user data, and has to ask through typed read tools. Writes follow prepare → approve → execute — a preview built from live data, a single-use approval bound to the exact input, and then the same shared domain mutation a button click would run. Rate limits, cost accounting, and zero-data-retention routing are enforced server-side.

pull-first context
single-use approvals
zero data retention
Hard-won lessons

Swapping the identity provider in place

Migrating every user ID from Supabase Auth to Clerk meant rewriting every row-level-security policy in a single migration and re-pointing two independent data paths at one JWT — without breaking a single offline queue.

Two-way calendar sync on an offline base

The hard part of Google Calendar sync isn't the API, it's identity: deterministic event IDs make creates idempotent, ETags catch concurrent edits, expired sync tokens trigger full resyncs, and recurring-instance reconciliation keeps detached events from duplicating.

Offline privacy is more than availability

A local database that survives logout is a liability. The mobile app verifies who owns the local data before it mounts — and wipes it when the signed-in account doesn't match.

Features

Time tracking

Projects, folders, multiple timers, Pomodoro, rates and salary metadata — every hour knows its context.

Tasks & projects

Six statuses, nested subtasks, due and planned dates, reminders — linked to timers and time entries.

Finances

Accounts, one-off and recurring cashflows, transfers, payouts — connected to the work that earned them.

Calendar

Local and Google-synced events, scheduled-versus-actual comparison, and timers started straight from appointments.

Habits

Goals per day, week, or month, streaks, heatmaps, and sessions — woven into the same system as work and time.

AI assistant

Asks before it acts: typed capabilities, previews from live data, and explicit approval for every write.

Built with
TypeScript
React
TanStack Start
TanStack DB
Expo
Electron
Bun
Turborepo
SQLite
PowerSync
Supabase
Clerk
Zod
Mantine
Vitest
Open source

Self-Engine is currently closed source while in early development. The plan is to open source it as it matures — because good tools should be accessible and community-driven.

Follow on GitHub for updates