Skip to content

AI Products · AI · Productivity (SaaS)

The Margin

An AI-native life operating system — tasks, plans, habits, notes, expenses and focus unified, offline-first, beautifully dark.

Founder & Architect/2026/Live (Early Access)
themarginapp.com
LIVE
019Tools in one interface — replacing 5 separate apps
023Fully-realized themes
03Offline-firstPWA — full read/write with no connection
0416HMAC-signed webhook event types
01

THE WORK

The Situation

Personal productivity is fragmented across a dozen single-purpose apps — and the AI is always bolted on afterward, never built into the core.

Tasks live in one tool. Plans in another. Habits, notes, expenses, focus — each its own silo, each its own subscription. The work of staying organized becomes its own job.

When AI does arrive, it arrives late: a chat box stapled to a data model that was never designed for it.

The Job-to-be-Done

THE JOB TO BE DONE

When my tasks, plans, notes and spending are scattered across a dozen apps,

I want to capture and structure everything in one system with AI built into its core,

So I can act with clarity instead of managing my tools.

The Approach

I built The Margin AI-native from the schema up. The agent layer is not a feature on top of the product — it reads and writes the same typed data model the UI does. That decision shapes everything else.

I chose offline-first as a constraint, not an enhancement. A life operating system you can't reach on a plane, on a subway, or on bad hotel wifi is not a system you can trust. So the local database is the source of truth in the browser, and the network is a sync detail.

And I kept it self-hostable. One codebase, one VPS, Docker Compose. No sprawling cloud bill to run your own life.

When the AI shares the same typed data model as the interface, the assistant isn't guessing about your data — it's operating on it directly.

The System

The web app is Next.js 16, React 19 and Tailwind v4, end-to-end typesafe via tRPC v11 with Drizzle ORM and Zod over Postgres. Offline-first is real: PowerSync drives a local SQLite database compiled to WASM in the browser, with a background sync queue reconciling against the server. The AI layer is a separate Python service — Pydantic-AI on FastAPI, exposed over MCP — driving an in-app assistant (Claude-based) that can create boards, move cards and query your data through the same model the UI uses. Real-time collaboration runs over a dedicated Socket.io service: live cursors, presence, and role-based permissions.

The design system is token-driven across three themes — Tailwind v4 @theme plus CSS variables — with pre-paint FOUC prevention so the dark surface never flashes. Production ops are in place: Sentry, Prometheus metrics, S3 presigned uploads, and 16 HMAC-signed webhook event types. The whole thing lives in a Turborepo monorepo with strict workspace boundaries — apps/web, shared packages, the sync worker, and the realtime service — and ships as a self-hostable single-VPS Docker Compose stack on Dokploy and Hetzner.

Status

Live in Early Access. The nine tools, the three themes, the offline PWA and the agent layer are all running today. I'm building it in the open and refining the model as real use surfaces the edges.

02

GALLERY · 07 FRAMES

NEXT EXHIBIT

Building something like this?

Start a Conversation →