g-butandClaude Opus 4.7 2df42d77e3 chore(smoke): also fail when error.tsx boundary renders inside a 200
Status-only smoke missed a real failure mode: when a Server Component
throws, Next.js renders src/app/error.tsx ("Something went wrong")
INSIDE a 200 response. The page is broken from the user's perspective,
but smoke would mark it ok.

Refactor into a check_route helper that pages call with body-content
checking enabled. Greps the response body for the error-boundary
marker; failing-when-found means the run page doubles as a sanity
check on every server component, not just the route resolver.

API routes skip the body check (the marker is HTML-only and an API
that returned the literal string would be unusual).

Verified: all 18 routes still pass; the grep would catch a fake
error response if one were served.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 20:53:04 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00

Cockpit

George's private life OS, powered by Ivy. A unified dark-themed mobile-first dashboard for people, money, goals, projects, habits, events, and system health. Built for one person but designed to be replicated for others.

Stack

  • Next.js 16 (App Router, Server Components, Server Actions)
  • TypeScript strict — schema is SSOT for types via Drizzle's $inferSelect / $inferInsert
  • Tailwind CSS 4 + shadcn/ui — always dark mode
  • Drizzle ORM on PostgreSQL 17 (self-hosted, cockpit database)
  • zod validation at every API boundary

Views

Route What's there
/today Calendar, weather, commitments, bills, daily habit check-off
/people 1,286 contacts, search, detail panel, inline name/notes edit
/money Subscriptions, monthly burn
/goals Hierarchical tree, progress, milestones, inline target/progress edit
/projects Projects + GitHub CI, inline editors for name/desc/status/maturity
/habits 30-day heatmap per habit, streak indicator, summary stats
/events Opportunities and deadlines, type-chip filter, archive flow
/prompts Prompt library, run-now via Ivy, schedule as cron job
/system Gateway, memory, disk, uptime, autopilot jobs
/memory Knowledge-graph stats and recent activity

Architecture

src/
├── app/             Pages + API routes (thin, delegate to queries/components)
├── components/
│   ├── ui/          Shared primitives (Card, Modal, Drawer, Field, EmptyState, …)
│   ├── shell/       AppShell, Sidebar, MobileNav, AskIvyModal
│   └── <domain>/    today, people, projects, goals, money, habits, events,
│                    prompts, system — one folder per view
├── config/          SSOT for navigation, channels, prompt-library, subscriptions
├── db/
│   ├── schema/      Drizzle tables (SSOT for all types)
│   └── queries/     Data access functions, one file per domain
├── hooks/           useFetch, useCreateMutation, useInlineEdit
└── lib/             constants, dates, tools, utils, api/* wrappers

Setup

Postgres has to be running locally with the cockpit database created. Set DATABASE_URL in .env.local:

echo 'DATABASE_URL=postgresql://localhost/cockpit' >> .env.local

Push the schema and seed:

DATABASE_URL=$YOUR_URL npx drizzle-kit push
DATABASE_URL=$YOUR_URL npx tsx scripts/seed.ts   # imports knowledge.sqlite + contacts

Dev Commands

npm run dev          # Start the dev server on :3000
npm run build        # Production build (uses real DB connection)
npm run smoke        # Curl every page + DB-backed GET API and assert 2xx/3xx
npm run lint         # ESLint

A husky pre-commit hook runs tsc --noEmit and eslint src/ automatically. Smoke is opt-in (needs the dev server running) — run before opening a PR. CI on push to main and every PR runs the same type+lint checks; a daily Audit workflow surfaces new high-severity CVEs in the dep graph.

Working in the repo

CLAUDE.md at the project root is the contract for AI agents and the rule book for non-obvious decisions: SSOT rules, naming conventions, data-flow boundaries, security patterns. Read it before making substantive changes.

Languages
TypeScript 88.6%
Shell 7.3%
CSS 2.3%
JavaScript 1.6%
Python 0.1%