tpt-hearth

TypeScript

A calm, non-addictive social platform for presence and conversation — persistent chat rooms, ambient co-presence, and async letters. No algorithms, no likes, no infinite scroll. Next.js 15 + TypeScript PWA with E2E encryption.

0 stars0 forks0 watchers
digital-wellbeingend-to-end-encryptionnextjsprivacy-focusedpwareal-time-chatsocial-platformturborepotypescriptwebsocket

Languages

TypeScript98.1%JavaScript1.0%CSS0.9%
README

tpt hearth

A calm web/PWA social platform for presence, conversation, and human bonds.

Built by PhillipC05.

tpt hearth is not optimized for growth, productivity, virality, or attention capture. It is a digital lodge: a place to sit, speak gently, and be together without performance pressure.

Come sit. Stay awhile. Just be.


Features

  • Hearth — intimate persistent chat rooms capped at 12 people
  • Porch — 20-minute low-friction sessions for meeting new people
  • Embers — ambient co-presence spaces with optional audio atmosphere
  • Grove — open room directory searchable by mood and topic
  • Letters — asynchronous long-form messages with scheduled delivery
  • Chronicles — private personal archives, exportable as JSON/Markdown
  • Rituals — optional user-hosted gatherings with gentle summaries
  • E2E Encryption — private rooms use AES-256-GCM via the Web Crypto API
  • PWA — installable, offline-capable shell with encrypted draft storage
  • Real-time presence — native WebSocket server for chat and typing indicators
  • Admin controls — invite management, moderation, and server settings
  • Data portability — full JSON/Markdown export and instant account deletion

What this platform rejects

  • Algorithmic feeds or recommendation engines
  • Likes, shares, follower counts, and virality metrics
  • Infinite scrolling and engagement-optimized UI
  • Ads, tracking pixels, and behavioral analytics
  • Red notification badges and urgency language

Stack

LayerTechnology
Web frameworkNext.js 15 App Router
LanguageTypeScript (strict)
StylingTailwind CSS
Componentsshadcn/ui-style primitives
DatabaseSQLite (Drizzle ORM), PostgreSQL upgrade path
Real-timeNative WebSockets
EncryptionWeb Crypto API (AES-256-GCM, PBKDF2)
PWAManifest + Service Worker
Monorepopnpm workspaces + Turborepo

Quick start

git clone https://github.com/PhillipC05/tpt-hearth.git
cd tpt-hearth
pnpm install
cp .env.example .env
pnpm dev
ServiceURL
Web apphttp://localhost:3000
WebSocket serverws://localhost:4000
SQLite database.data/hearth.sqlite

Environment

Copy the example environment file and edit as needed:

cp .env.example .env

Key variables:

NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_WS_URL=ws://localhost:4000
DATABASE_URL=file:.data/hearth.sqlite
NODE_ENV=development

See .env.example for the full reference.


Scripts

pnpm dev           # Start development server
pnpm build         # Production build
pnpm lint          # Run ESLint
pnpm test          # Unit tests (vitest)
pnpm test:e2e      # End-to-end tests (Playwright)
pnpm db:generate   # Generate Drizzle migrations
pnpm db:migrate    # Run migrations

Documentation

DocumentDescription
SPEC.mdFull product specification
docs/architecture.mdSystem design and component overview
docs/database.mdSchema and relationships
docs/encryption.mdE2E encryption design
docs/moderation.mdModeration workflow
docs/pwa.mdPWA implementation notes
docs/deployment.mdDeployment guide (local, Docker, VPS, Fly.io)
docs/runbook.mdDay-to-day operations runbook

Admin setup

The first admin user must be set directly in the database:

# Using the SQLite CLI
sqlite3 .data/hearth.sqlite \
  "UPDATE users SET is_admin = 1 WHERE handle = 'your-handle';"

From there, admin users can manage invites, moderation, and server settings through the /admin interface.


Contributing

See CONTRIBUTING.md. Read SPEC.md first — contributions must align with the product vision.


License

Apache License 2.0 — see LICENSE.

Copyright 2024 TPT Solutions.