Skip to content
mepknPublic

About

Chat with ELIZA, Joseph Weizenbaum's 1966 therapist chatbot, recreated in the browser with a retro typewriter interface.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ELIZA

Chat with ELIZA, Joseph Weizenbaum's 1966 "therapist" chatbot, recreated in the browser with a retro typewriter interface.

Live: https://eliza.pknspace.com

Features

  • The original ELIZA (DOCTOR script), via Norbert Landsteiner's faithful elizabot port.
  • Extra keywords and synonyms for more natural modern conversation.
  • Replies type out letter by letter, like a 1960s terminal.
  • Saying goodbye ends the session, and a new one can be started.

Stack

React 19 · TypeScript · Vite · Tailwind CSS v4 · shadcn/ui · Framer Motion · elizabot · Vitest. No backend.

Development

Requires Node 22.18+ (.nvmrc pins 22).

npm install
npm run dev

Scripts

Command What it does
npm run dev Dev server at http://localhost:5173
npm run build Typecheck and production build into dist/
npm run typecheck TypeScript check (tsc -b)
npm run preview Serve the built dist/ locally
npm run lint ESLint
npm test Unit tests (Vitest): deterministic replies, extra keywords, goodbye
npm run check Typecheck, lint and tests
npm run deploy Checks, builds and uploads to the VPS
npm run deploy:dry Same, but only previews the upload

Deployment

The site is static: npm run build writes dist/, which is synced to a VPS where Caddy serves it directly (no restart needed).

  1. One-time setup: copy .env.example to .env.prod.local (git-ignored) and fill in DEPLOY_HOST, DEPLOY_PORT and DEPLOY_DIR. You also need SSH key access to the server.
  2. Deploy:
    npm run deploy:dry   # preview what would change
    npm run deploy       # checks, build, upload

How it works

  • src/eliza/eliza.ts wraps elizabot without changing its engine. Before the first bot is created it merges the extra keywords and synonyms from extraKeywords.ts into elizabot's data, because elizabot parses that data only once.
  • ELIZA matches keywords in what you type, picks a decomposition rule, and reassembles your own words into a reply ("I feel sad" → "Do you often feel sad?").
  • eliza.test.ts runs the bot in non-random mode so replies are deterministic.
  • UI. shadcn/ui components live in src/components/ui/ (vendored, added with npx shadcn add, not linted). The theme tokens in src/index.css make them green-on-black with an amber input, like a terminal.

About

Chat with ELIZA, Joseph Weizenbaum's 1966 therapist chatbot, recreated in the browser with a retro typewriter interface.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages