Repository navigation
Home
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.
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]
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.
PACT OS introduces Server-Authoritative Commitments:
- Binding Deadlines: Commitments carry explicit, non-bypassable deadlines.
- Consequence Sealing: Default consequences are sealed to commitments and triggered automatically upon deadline expiration.
- Integer-Cent Math: Currency is strictly calculated in integer cents to guarantee financial ledger precision.
- Local-First & Offline: Deep work audio and local caching run 100% offline without telemetry.
| 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 |
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]
- 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
-
Integer-Cents Financial Math: Zero floating-point math for currency calculations (
src/lib/money.ts). -
Server-Authoritative Time: Server clock evaluates all deadlines (
deadline_at) to prevent client clock manipulation. -
Row Level Security (RLS): 100% of database tables enforce
auth.uid() = user_id. - Frozen Database Migrations: 26/26 PostgreSQL database migrations are frozen and protected.
- Testing & QA Matrix: Validated against 112 domain test suites with 0 lint or type errors.
| 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 | 112-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, 360+ issues (#52–#752) | 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 |
PACT OS maintains a curated 360+ Beginner & Micro-Task Issue Factory across 9 catalogs (Batches 1–11, including #717–#752) following the Micro-Contribution Standard:
- Single-File Scope: Every micro-task is strictly bounded to 1 file (or a documentation pairing).
- 5–30 Minute Execution: Self-contained, algorithmic, behavioral, or documentation tasks.
- Zero Production Risk: No database migrations, no auth changes, no financial state risk.
-
100% Local Offline Verification: Verified locally with
npm testacross all 112 test suites.
Every merged pull request is permanently honored in CONTRIBUTORS.md and on the GitHub Contributors Graph.
See the Contributing Guide and Contributor Journey to start contributing!
| 🏛️ Project Hub | 🛠️ Developer Docs | 💬 Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | GitHub Discussions |
| Beginner Issue Catalog | Design System | Open Issues |
| Production Deployment | API Reference | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Governance |
- Codebase Tour
- Domain Model
- Database Architecture
- Security Model
- Financial System
- Consequence System
- External Integrations
- Discipline Intelligence
- Data Portability & Sync