Skip to content

Rebuild as a monorepo: Ralph assistant landing, admin panel, RAG chat server - #20

Merged
ykdhan merged 5 commits into
masterfrom
claude/loving-tesla-8gvi1c
Nov 15, 2026
Merged

ykdhan merged 5 commits into
masterfrom
claude/loving-tesla-8gvi1c

Conversation

@ykdhan

@ykdhan ykdhan commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Turns the static portfolio into a conversation with Ralph, an AI assistant drawn as an ASCII spider robot in a green-on-black terminal. Visitors ask about YK; Ralph answers from YK's own data. Unanswered questions, contact requests and collaboration proposals go to Slack.

apps/landing   Vite + React: one-screen terminal with the ASCII avatar      → Vercel
apps/admin     Vite + React: profile, entries, memory, GitHub import, inbox → Vercel
apps/server    Node + Hono: Claude chat, RAG memory, Slack, admin API       → Railway
packages/shared  shared types

Server (apps/server)

  • POST /api/chat streams SSE. Hybrid retrieval (pgvector plus fuzzy keyword search via pg_trgm, merged with RRF) feeds context to Claude Haiku 5.5. The system prompt is prompt-cached.
  • Tools the model can call:
    • show_panel: shows a project, experience, stack or contact panel.
    • report_unanswered: when the data doesn't answer a question, Ralph says so and the question goes to Slack (❓) and the inbox.
    • leave_message: contact or collaboration requests go to the same Slack webhook (✉️ / 🤝) and the inbox.
  • Embeddings run in-process (multilingual-e5-small, no API key needed); Voyage AI is optional. If embeddings are unavailable, search falls back to keywords.
  • Admin API uses single-password auth with signed tokens. Includes per-IP and global rate limits and a daily usage record.
  • First boot migrates the schema and seeds the previous site's content.

Landing (apps/landing)

  • DOS-style terminal: scanlines, Galmuri Mono pixel font (self-hosted, OFL), BIOS boot lines, numbered quick menu, HELP / CLS / LANG / VOICE commands. Panels render as DOS boxes in the log.
  • Ralph is redrawn at ~15 fps from a pure state, time, level → lines function:
    • idle: blinks and shifts a leg now and then
    • listening: a leg taps on each keystroke
    • thinking: legs drum, with a spinner above
    • speaking: scuttles side to side; eyes and mouth follow the voice
    • offline: legs folded
  • Streamed text becomes a speech-like amplitude envelope that keeps the avatar and the typing in sync. Browser TTS is optional.
  • English by default. Writing in Korean (or asking for Korean) switches the UI and the answers to Korean.
  • Offline fallback shows the contact details.

Admin (apps/admin)

  • Dashboard with estimated AI cost, Slack test and reindex.
  • Inbox: answering an unanswered question saves it as an FAQ entry, so Ralph knows the answer next time.
  • Profile, entries, memory (with a retrieval test), and GitHub repository import.

Repo

  • npm workspaces; Dockerfile and railway.json for the server; vercel.json for both frontends.
  • New CI: typecheck, build, and server integration tests against a pgvector service container.
  • Removes the GitHub Pages deploy workflow. After merge, ykdhan.github.io keeps serving the last deployed (old) site until a new hosting decision is made (see PLAN.md).

Testing

  • npm run typecheck and npm run build pass for all workspaces.
  • Server integration tests (real Postgres + pgvector, mocked Claude and Slack): 6/6 pass. They cover retrieval context, prompt caching params, unanswered → inbox + Slack, collaboration → Slack with contact details, admin auth, and inbox answer → searchable FAQ.
  • Driven in a headless browser against a local server with a mock Claude:
    • question → answer with a project panel
    • unanswered question → Slack and inbox
    • Korean question → UI switches to Korean
    • mobile layout
    • every admin page
  • Production-only install of the server workspace boots.

Not verified here

  • Real Claude answers (no API key in this environment).
  • Embedding model download and GitHub API calls (blocked by this environment's network).
  • An actual docker build (no Docker daemon).
  • Browser TTS.

Before deploying

Set ANTHROPIC_API_KEY, SLACK_WEBHOOK_URL, ADMIN_PASSWORD, SESSION_SECRET and CORS_ORIGINS on the server, and VITE_API_URL on both frontends. Steps are in the README.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Mt8dK6c9YprA4L9rSgTmY
Canvas renderer with five states: calm breathing at idle; waveform,
spectrum, shockwaves, particle bursts and arcs while speaking.
Simulated speech envelope drives core and caption; optional browser TTS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Mt8dK6c9YprA4L9rSgTmY
- apps/server (Railway): Hono API with Postgres/pgvector memory, hybrid
  retrieval, streaming Claude chat with panel/unanswered/message tools,
  Slack notifications for unanswered questions, contact and collaboration
  requests, admin API, GitHub import, rate limits, integration tests
- apps/landing (Vercel): one-screen site with a WebGL light core driven by
  a speech envelope, streaming conversation, panels, offline fallback
- apps/admin (Vercel): profile, entries, memory with retrieval test,
  GitHub import, inbox that turns answers into FAQ entries, usage/cost
- packages/shared: shared types
- CI with pgvector service; GitHub Pages deploy removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Mt8dK6c9YprA4L9rSgTmY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Mt8dK6c9YprA4L9rSgTmY
- Landing: green-on-black DOS terminal (scanlines, Galmuri Mono pixel font),
  boot lines, numbered quick menu, HELP/CLS/LANG/VOICE commands, panels as
  DOS boxes in the log
- Avatar: six-legged ASCII spider robot redrawn at ~15 fps; idle blink and
  weight shifts, listening taps, thinking drum + spinner, speaking scuttle
  with voice-driven eyes and mouth, offline folded legs
- English by default; writing in or asking for Korean switches UI and
  answers to Korean (client locale is sent to the prompt)
- Rename kai/core in code to assistant/avatar (useAssistant, Avatar)
- Seed and fallback profile use the name Ralph; admin keeps its theme

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Mt8dK6c9YprA4L9rSgTmY
@ykdhan
ykdhan merged commit 6fe946c into master Nov 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants