Skip to content

Latest commit

 

History

History

prm

README.md

Personal Relationship Manager (app/prm)

A deployable, multi-user Personal Relationship Manager (PRM) built on TanStack CMS, TanStack Start, TanStack DB, TanStack Search, and TanStack AI.

Built for individuals, small teams, and families — ideal for running on a home machine or mini-PC and accessing from your phone or laptop over Tailscale.

Highlights

  • Self-contained instance data directory (PRM_DATA_DIR) — stores configuration (prm.json), secrets (secrets.env), SQLite database (cms.db), uploaded photos (uploads/), and snapshots (backups/) in one directory outside the repo.
  • Multi-user DB authentication — first-run /setup creates the owner account; invite family or teammates via one-time /invite/$token links from /prm-settings.
  • Owner direct, agent review — the PRM's document state strategy, ownerDirectAgentReview in src/document-state.ts: people who may publish (owners, members) commit their own saves, and agent and import writes go through review.
  • Optional approval workflow (off by default) — approvalRequired: false auto-approves agent and import writes while preserving full revision and audit history; flip it on in /prm-settings to stage changes into /review.
  • Groups & Events — organize people into recurring circles (TanStack, Creators, Founders, Oak St & School Parents) or time-bounded events (Timmy's Birthday Party, AI Coding Summit 2026) with start/end times, location, per-event roles/talks, and a talked-with progress bar.
  • Rich person profiles — multiple names (aliases / AKAs), pronouns, human-only personal contact fields (phone, email, birthday, address), per-field provenance (personSource), and deep-snoop enrichment.
  • Light & dark themes — warm paper palette in light mode and warm obsidian in dark mode, synced with the CMS admin theme.
  • Mobile-first — bottom navigation bar with a center + pocket capture sheet for logging people, notes, and photos on the go.

Data Directory Layout

~/prm-data/jack-herrington/
  prm.json        # instance settings (name, tagline, approvalRequired, defaultTheme, ...)
  secrets.env     # API keys + session HMAC secret (chmod 0600)
  cms.db          # SQLite database (documents, users, revisions, audit, FTS)
  uploads/        # uploaded photos and media assets
  backups/        # timestamped snapshots from `prm backup`

Quick Start

1. Run in development (demo seed)

pnpm --filter prm dev

2. Run against a personal data directory (e.g. Jack Herrington's PRM)

PRM_DATA_DIR=~/prm-data/jack-herrington pnpm --filter prm dev

3. CLI (prm)

# Initialize a new instance directory
pnpm --filter prm prm init ~/prm-data/family --name "Herrington Family PRM"

# Create a timestamped backup of cms.db + uploads/
pnpm --filter prm prm backup --data ~/prm-data/jack-herrington

# Build and run the production server against a data directory
pnpm --filter prm build
pnpm --filter prm prm start --data ~/prm-data/jack-herrington --port 3024

Deploying on a Home Machine with Tailscale

Expose your local PRM to your tailnet with automatic HTTPS certificates:

tailscale serve --bg 3024

Now any device on your tailnet (your phone at a conference or at the playground) can open https://<machine>.<tailnet>.ts.net and sign in.