TypeScript / React
The whole client — web app, mobile start page and extension UI — is written in TypeScript and React. Shared components and hooks keep the three surfaces in sync.
Developer
Z TAB is built as a single product across three surfaces — web, Chrome and Firefox. The notes below are for anyone integrating, auditing or extending it.
Stack
The whole client — web app, mobile start page and extension UI — is written in TypeScript and React. Shared components and hooks keep the three surfaces in sync.
The web app is a TanStack Start application on Vite with file-based routing, server functions for secure backend calls, and SSR for the marketing pages.
Server functions and public API routes run in an edge Worker runtime. All backend calls are fetch-based; there is no long-running Node process.
Styling is token-driven through Tailwind v4. The design system uses semantic variables so light, dark and product themes stay consistent.
Profiling
The new tab must render before the user notices. The clock, search and shortcuts are rendered from local state; network-dependent widgets show placeholders immediately.
Long tasks, layout shifts and memory growth are tracked in development builds. Lists are virtualised, images are lazy-loaded, and animations stay on the compositor.
Every sync round reports duration, retry count and conflict rate. Back-off is exponential with a jittered cap so the browser never spins on a failing connection.
The extension popup and new tab entry points are split into separate chunks. Shared libraries are deduplicated so each surface ships only what it needs.
Database
The authoritative store is Postgres. User data, admin content, audit logs and feature flags live in the public schema with explicit grants and RLS on every user-facing table.
Policies scope reads and writes to auth.uid(). Roles are stored in a separate user_roles table and checked through a security-definer has_role function to avoid recursion.
Each synced row carries a monotonically increasing revision. Clients pull deltas above their cursor and merge last-write-wins per row. Deletes travel as tombstones.
The browser keeps its own copy in IndexedDB. Reads are local; writes queue to an outbox and reconcile with the server delta on a schedule.
Extension
Release cadence
Builds are date-versioned (YYYY.M) and cut from a single commit. The Chrome, CRX and Firefox artifacts share the same manifest version, changelog entry and delta-sync schema. There is no separate backend release for the extension.
All user data stays in the signed-in account. The extension is an application build: installing it does not copy your bookmarks or settings into the package.
Changelog
New tab override, one-click saving from the toolbar popup, right-click menus for pages and links, and background sync with the account you use here.