Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 1.79 KB

File metadata and controls

69 lines (51 loc) · 1.79 KB

MultiBlog

A multi-author blog with post revisions, real-time collaborative editing, and quote-anchored comments. See PLAN.md for the full architecture and design rationale.

Prerequisites

  • Node.js 20+
  • PostgreSQL 14+

Setup

  1. Install dependencies:

    npm install
  2. Create a database and point .env at it — .env is never committed and needs:

    DATABASE_URL="postgresql://user:password@localhost:5432/multiblog?schema=public"
    AUTH_SECRET="<openssl rand -base64 32>"
    APP_URL="http://localhost:3000"
    COLLAB_PORT=1234
    NEXT_PUBLIC_COLLAB_URL="ws://localhost:1234"
    
  3. Generate the Prisma client and apply migrations:

    npx prisma generate
    npx prisma migrate dev

Running

npm run dev:all

Runs the Next.js app (:3000) and the Hocuspocus real-time collab server (:1234) together via concurrently — one Ctrl+C stops both. Individually: npm run dev (web only) or npm run collab (collab only). npm run stop:all stops a dev:all you started elsewhere.

Checks

npx tsc --noEmit   # typecheck
npx eslint .       # lint

No test suite yet.

Documentation

  • PLAN.md — architecture, design decisions, and build progress.
  • TODO.md — open items carrying enough context to act on directly.
  • DEPLOY.md — deploying to a self-managed Linode/Ubuntu box.
  • CACHING.md — caching behavior and trade-offs (ISR, etc.).
  • PERFORMANCE.md — performance findings and the opt-in perf-logging tool.
  • STYLE.md — styling conventions (colors, typography, CSS Modules vs. inline).
  • TIPTAP.md — TipTap/ProseMirror gotchas.
  • CLAUDE.md — notes for AI coding agents working in this repo.