Skip to content
Vicky Patel edited this page Sep 14, 2026 · 5 revisions

PACT OS — Personal Productivity & Accountability System

Turn Intent Into Discipline. A production-grade, local-first personal productivity and accountability OS built with Next.js 16, React 19, TypeScript, Tailwind CSS v4, and PostgreSQL via Supabase.


⚡ What is PACT OS?

PACT OS is a unified personal operating system designed to bridge the gap between setting ambitious goals and consistently executing daily actions. It provides time-blocked planning, integer-cent financial ledger discipline, habit streak tracking, deep work focus timers, and a server-authoritative commitment engine with real-world consequence bindings.

graph TD
    A[User Intent & Goals] --> B[Time-Blocked Commitment]
    B --> C{Deadline Resolution}
    C -->|Verified Complete| D[Streak Momentum & Analytics]
    C -->|Deadline Missed| E[Activated Consequence State Machine]
Loading

🎯 The Problem

Traditional productivity tools suffer from passive tracking:

  • Tasks can be infinitely postponed without friction or accountability.
  • Financial trackers rely on floating-point approximations causing rounding inaccuracies.
  • Focus tools depend on external streaming audio services causing privacy leaks.
  • Productivity platforms lack proof-of-work integration with real-world developer tools.

🧠 The Idea & Core Philosophy

PACT OS introduces Server-Authoritative Commitments:

  1. Binding Deadlines: Commitments carry explicit, non-bypassable deadlines.
  2. Consequence Sealing: Default consequences are sealed to commitments and triggered automatically upon deadline expiration.
  3. Integer-Cent Math: Currency is strictly calculated in integer cents to guarantee financial ledger precision.
  4. Local-First & Offline: Deep work audio and local caching run 100% offline without telemetry.

✨ Implemented Modules & Capabilities

Module Core Capability Architectural Highlight
🛡️ Accountability & Commitments Binding deadline commitments with consequence state machine Confidential payload masking & resolution engine
📋 Tasks & Timeblocking Speed-first commitment modal (< 5s submission) & day planner Local-to-UTC timezone conversions
🎯 Strategic Goals & Projects Multi-level goal hierarchy with progress tracking Structured parent-child relationships
🔄 Habits & Routines Recurrence loops, streak multipliers & leap-year math Server-side day-boundary calculations
💰 Financial Ledger Zero-float cashflow, expense categories & budget limits Integer-cents arithmetic (amount_cents)
⏱️ Focus Engine Deep work session timer with Web Audio soundscape synth Offline native AudioContext synthesizer
📊 Analytics & Velocity Completion rates, streak velocity & discipline metrics Aggregate server-side metric computation
📅 Calendar & Schedule Bi-directional Google Calendar sync & schedule view External OAuth token refresh handling
📝 Weekly Review Structured Sunday reflection & ritual planning 5-step guided reflection workflow
🔔 Notification Dispatcher Multi-channel notifications & deadline alerts Priority-queued delivery dispatcher
🔗 External Proof Connectors Proof-of-work verification for GitHub, LeetCode & Codeforces Server-validated GraphQL/REST payloads
🔑 Passkey & Security WebAuthn passkey registration & RLS security model Row Level Security on 100% of tables

🏗️ Production Technology Stack

graph LR
    UI[Next.js 16 + React 19] --> Actions[Server Actions + Zod v4]
    Actions --> DB[(Supabase PostgreSQL 15+)]
    Actions --> RLS[Row Level Security]
    UI --> WebAudio[Web Audio Focus Synth]
    DB --> Cron[Vercel & Supabase pg_cron]
Loading
  • Frontend: Next.js 16 (App Router), React 19, TypeScript (Strict Mode)
  • Styling & Motion: Tailwind CSS v4, Glassmorphism token design system, Framer Motion
  • Database & Security: PostgreSQL 15+ via Supabase, Row Level Security (RLS), @supabase/ssr
  • Validation: Zod (v4) strict schema validation on 100% of Server Actions
  • Audio & Offline: Native Web Audio API synthesizer (AudioContext), Service Worker offline caching

🔐 Core Engineering Principles

  1. Integer-Cents Financial Math: Zero floating-point math for currency calculations (src/lib/money.ts).
  2. Server-Authoritative Time: Server clock evaluates all deadlines (deadline_at) to prevent client clock manipulation.
  3. Row Level Security (RLS): 100% of database tables enforce auth.uid() = user_id.
  4. Frozen Database Migrations: 26/26 PostgreSQL database migrations are frozen and protected.
  5. Testing & QA Matrix: Validated against 56 domain test suites with 0 lint or type errors.

🚀 Explore the PACT OS Wiki

Section Description Link
Product Overview Mission, philosophy, and high-level workflows Product Overview
Features & Subsystems Detailed breakdown of all 14 core OS modules Features & Subsystems
System Architecture Technical design, Next.js server actions, boundaries System Architecture
Design System Obsidian dark tokens, glassmorphism, gold accents Design System
Codebase Tour File structure, subsystem locations, conventions Codebase Tour
Domain Model Entity relationships, data schemas, relational models Domain Model
Database Architecture Supabase setup, RLS policies, 26 migration files Database Architecture
Security & Privacy Threat model, authentication, passkeys, RLS Security Model
Financial System Integer-cent arithmetic and cashflow calculations Financial System
Consequence Engine State machine, commitment breaches, and waivers Consequence Engine
External Integrations GitHub, LeetCode, Codeforces, Google Calendar External Integrations
Discipline Velocity Math Velocity scoring formulas and streak multipliers Velocity Math
Data Portability & Sync Offline queue and sanitized account exports Data Portability
Development Guide Prerequisites, setup, commands, offline testing Development Guide
Testing & Quality 56-suite domain test matrix, linting, typechecking Testing & QA Matrix
API & Route Handlers Complete API directory and cron security specs API Reference
Performance Optimization Server components, DB indexes, Web Audio synth Performance Specs
User Flows & UX Speed-first task commitment & Sunday review UX User Flows
CI/CD Pipeline GitHub Actions workflows and quality gates CI/CD Pipeline
Production Deployment Production runbook, Vercel edge deployment Production Deployment
Contributing Open-source onboarding, canonical issues (#52–#71) Contributing Guide
Maintainer Governance Maintainer SLA, PR review rules, issue factory Maintainer Guide
Troubleshooting Common issues, database recursion, setup fixes Troubleshooting
FAQ Frequently asked technical and product questions FAQ

🌱 Open Source & Community

PACT OS maintains a curated 20 Canonical Beginner Issues (#52–#71) catalog following the Micro-Contribution Standard:

  • Single-File Scope: Bounded to 1 file or documentation pairing.
  • 5–30 Minute Execution: Self-contained and beginner-friendly.
  • 100% Local Offline Verification: Verified with npm test.

See the Contributing Guide and Contributor Journey to start contributing.

Clone this wiki locally