← Index
Source: docs/history/2026-06-29-rabbit.md (auto-generated by scripts/generate-docs-html.mjs — edit the .md, not this file)
2026-06-29 — rabbit
Summary
- Wrote
docs/tasks/jun-30-rabbit-design.md and folded in jay's §9 answers (AI Chat keys, Market, Knowledge, MCP = KB retrieval, EIP-7702 + ERC-7715/7710).
- Reworked IA/menu: profile as landing page (
/ → /home), fully public menu, login only for /portfolio (with /chat gating added then reverted).
- Ported 7 linked0.github.io posts into the app (inline bodies,
marked, lib/posts.ts), added dark/light theme toggle with light as default.
- Fixed the first Cloud Run deploy (pnpm ignored builds +
prisma generate in Dockerfile).
- Flattened the repo (
rabbit/ promoted to root, old projects → archive/) and split README into setup/testing + docs/rabbit-design.md.
- Added feature/IA docs: AP2 rabbit-aiaas/x402, Bridge API payment rail, XYZ employer demo, ETC catch-all, AI Chat MCP.
Design: fold jun-30 §9 answers into decisions (ERC = 7702)
- Resolved the Jun-30 design open questions per jay:
- AI Chat keys persisted, encrypted at rest (provider = OpenAI).
- Market REST-first then WS, default BTC perp.
- Knowledge serve
know.html (iframe) + move it and its linked files into public/knowledge/.
- MCP = KB retrieval.
- ETC standards = EIP-7702 + ERC-7715/7710; stack = MetaMask Delegation Toolkit on Sepolia.
- Updated §0/§2/§3/§4/§5/§7/§9/§10 of
docs/tasks/jun-30-rabbit-design.md.
- Source: docs/tasks/jun-30-rabbit.md + jay's §9 answers.
- jay resolved the open question: Home =
/ (logo/profile entry, leads the bar), Verex = trailing external link after ETC.
- Applied to
docs/tasks/jun-30-rabbit-design.md (§1 + struck §9).
- Source: docs/tasks/jun-30-rabbit.md + jay's answer.
Design refine: Local LLM available in local mode (not disabled outright)
- Per jay: Local LLM works when the app runs on his machine (local mode — Ollama at
localhost); only the cloud deployment shows it disabled (no hosted OSS model yet).
- Updated §2 of
docs/tasks/jun-30-rabbit-design.md — resolver keys availability off appMode() (lib/mode.ts).
- Source: docs/tasks/jun-30-rabbit.md + jay's clarification this session.
Design: create jun-30-rabbit-design.md from the Jun-30 task list
- Created
docs/tasks/jun-30-rabbit-design.md — designs for the Jun-30 tasks:
- split Portfolio & Market → Portfolio + Market and reorder the menu;
- auth/LLM gating (Portfolio login-only; AI Chat = bring-your-own proprietary key, Local LLM disabled for now, jay uses the stored key);
- Market page (Hyperliquid orderbook + indices);
- Knowledge serves
know.html + move loose root files;
- AI Chat KB via MCP+RAG (MCP = KB retrieval);
- AP2 Stripe settlement example;
- ETC ERC-7702/7715 session-key demo.
- Source: docs/tasks/jun-30-rabbit.md.
AI Chat: add "call this project's own MCP" feature (content TBD)
- Added an MCP tool-calling feature to
docs/features/ai-chat.md: the chat agent calls an MCP server this project will build.
- What the MCP exposes is undecided (TBD). Added a section, an open question, and Features items.
- Source: none — from jay's instruction this session (no task/design/draft file).
AP2 Test: add rabbit-aiaas / rabbit-agent / rabbit-provider feature items
- Added the Agent-as-a-Service (waiaas / x402) frame to
docs/features/ap2-test.md:
- rabbit-aiaas — a separate project (
/Users/jay/work/task/rabbit-aiaas);
- rabbit-provider — testnet service selling philosophical aphorisms for 0.01 USDC via the x402 402-flow;
- rabbit-agent — new Rabbit top-menu category (wallet + policy + pay→retry).
- Captured the 4 agent components (identity, wallet, spend policy, settlement/audit), personal/business scenarios, the 402-flow, and next steps.
- Source: docs/tasks/jun-26-rabbit-draft.md.
Deploy: fix Cloud Build failure (pnpm ignored builds + prisma generate)
- Root cause: first Cloud Run deploy failed at
pnpm install --frozen-lockfile with ERR_PNPM_IGNORED_BUILDS — pnpm 11 blocks @prisma/* build scripts by default and exits 1. Approved locally via pnpm-workspace.yaml (allowBuilds:), but the Dockerfile copied only package.json + pnpm-lock.yaml before install, so the approval was missing in the container.
- Fix (
Dockerfile):
- also copy
pnpm-workspace.yaml before install;
RUN pnpm exec prisma generate after COPY . . (schema must exist; lib/db.ts instantiates PrismaClient at import).
- Verified: local
docker build --target builder — install + generate + pnpm build all pass. Re-deploy via ./scripts/deploy.sh (--source . uploads the working tree).
- Open: cloud
DATABASE_URL still points at localhost (DB features won't persist until Cloud SQL); add the printed OAuth redirect URI after a successful deploy.
Project detail pages: inline full post bodies (drop external link)
- jay: "I don't want the page link. Copy all the content." Ported the 7 linked0.github.io posts into the app:
- copied markdown →
content/profile/<slug>.md, all images → public/profile/;
- added
marked (v18) + lib/posts.ts (strip front matter, rewrite {{site.baseurl}}/assets/img/ → /profile/, render to HTML);
- rewrote
app/home/[slug]/page.tsx to show the full body via .post-body (styled tables/images/code in globals.css) instead of the "전체 글" sourceUrl link — rendered at build (SSG), no runtime file dependency.
- Verified on
pnpm start: overview, GFM table, body links, Korean section, body images all render; no linked0.github.io link.
- archive/profile is now fully redundant (content lives in content/profile + public/profile) — safe to delete.
- Changed the profile contact email (
lib/home-content.ts) to linked0@me.com; removed the linked0.github.io link from the profile (header links + the "mirrored from" footer in app/home/page.tsx). Verified on dev.
- Left untouched:
ALLOWED_EMAILS in .env.example (changing it could lock out the @gmail Google account); per-project sourceUrl "전체 글" links (still → linked0.github.io, pending jay's call).
- Note: nothing references
archive/profile at runtime — safe to delete unless the full blog-post bodies are wanted in-app later.
Tweaks: light mode default; drop "Rabbit" link from home
- Made light the real default: flipped
globals.css so :root holds the light palette and :root[data-theme="dark"] the dark one; init script + ThemeToggle now default to light.
- Removed the "→ Rabbit (투자 요약)" link from the home jaylabs section (kept Verex).
- Verified on dev: Rabbit link gone, Verex present, light default, profile + toggle intact;
pnpm build ✓.
Dark/light toggle + profile page mirrors linked0.github.io
- Theme toggle (
app/ThemeToggle.tsx, right side of Nav): sets <html data-theme>, persists to localStorage, inline pre-paint script in layout.tsx to avoid flash; globals.css gained a [data-theme="light"] palette (linked0.github.io colors) + a --inset var so hardcoded insets adapt.
- Profile/home mirrors linked0.github.io: copied author photo + 7 project thumbnails from
archive/profile/assets/img → public/profile/, added img/photo/bio to lib/home-content.ts, rendered avatar + thumbnail grid + detail hero images.
- Bug found & fixed:
/profile/* images 302'd because the auth middleware matcher didn't exclude them → added profile/ to the matcher negative-lookahead.
- Verified:
pnpm build passes, images → 200, gating intact, toggle button + theme script in HTML. Full blog-post bodies still link to source (inlining needs a markdown renderer dep — follow-up).
Login gate: add /chat alongside /portfolio
- Follow-up to jay's "and AI chat": re-gated
/chat in middleware.ts so login is required to enter both /portfolio and /chat (the menu items still show to everyone).
- Verified: logged-out menu still lists AI 챗;
/chat & /portfolio → 302 /login; other stubs → 200.
- Per jay's revision:
/ now serves the profile page (linked0.github.io mirror) via a next.config.js rewrite / → /home — URL stays /; the old know.html index still lives at /know.html.
Nav.tsx shows all menu items regardless of login (dropped the authOnly filter).
- Login required only for
/portfolio — made /chat public in middleware.ts (reverting the earlier AI-Chat gating).
- Verified on dev:
/ shows "Hyunjae Lee", all 9 menu items render logged-out, /chat & /knowledge → 200, /portfolio → 302 /login.
- Why: profile as the landing page + a fully browsable menu, with the wall only at personal portfolio data.
- Rewrote
app/Nav.tsx to the Target IA menu (Home, Knowledge, Portfolio·Market, AI Chat, Game, AP2, XYZ, ETC, Verex↗); renders for logged-out users too (shows 로그인); Portfolio·Market + AI Chat login-only (jay's call).
- Created stub pages for the 5 missing routes (
/knowledge, /portfolio, /ap2, /xyz, /etc); made the public ones reachable in middleware.ts (kept /portfolio + /chat gated); added <Nav/> to public /home.
- Verified:
pnpm build passes; logged-out /home shows public items only, /portfolio → 302 /login, /etc → 200.
- Why: make the running app match the planned IA so the demo navigation is real.
Docs: split README into setup/testing README + design doc
- Moved the rich design+deploy README to
docs/rabbit-design.md (git mv, history preserved); wrote a fresh root README.md focused on setup + testing (paths fixed to the new flat root).
- Why: jay asked for a setup/testing README; the old one mixed design notes with run steps and had stale paths.
Repo restructure: rabbit/ contents promoted to task root
- Flattened the task repo:
- moved all
rabbit/ contents up to the repo root (root is now the Next.js app);
- merged
rabbit/docs/ into docs/ (incl. history/, no filename collisions);
- merged the two
.gitignore files;
- moved old project folders (ai, eng, math, nostra, photoshops, sections, unity, examples, images) into a new
archive/.
- Loose root html/md files left in place per jay's call. All moves landed as git renames (history preserved); staged, not committed.
- Why: the old nesting was wrong — the app should be the repo, with prior study material set aside in archive/.
features/README: add "Demo for employer (trade[XYZ] / Unit Labs)" section
- Added a 3-item demo plan to
docs/features/README.md mapped to the Sr. Software Engineer spec (oracle/pricing infra, real-time data, on-chain indexing, Go stack). Items escalate data → monetized data → on-chain data, each plugging into an existing rabbit surface (/portfolio Market zone, AP2/x402 page, Cloud SQL Postgres).
- Why: give jay a concrete, demo-able story that showcases fit instead of generic feature work.
AP2 Test: add a "real payment rail (Korea-usable)" task — Bridge API
- Added a "Real payment rail" section + Open question + Features task to
docs/features/ap2-test.md: evaluate Bridge API (bridge.xyz) for a real (non-mock) payment leg, with KRW on/off-ramp + KYC as an explicit verify-don't-assume risk, and a fallback if it isn't usable from Korea.
- Why: a real rail makes the demo stronger, but Korea's crypto rules make payment-provider coverage uncertain.
- Added an
ETC top-menu row to the Target IA table and a new docs/features/etc.md doc as a bucket for small, low-stakes experiments. First item: SimpleX Chat test.
- Why: gives trivial one-offs a home so they don't clutter the main nav, with a convention to promote any that grow.
- Per jay's call, added a new top-menu row to the Target IA table and a new feature doc
docs/features/xyz-demo.md bundling the three demo items as one employer-facing page, rather than folding them into existing menus.
- Why: a single front door means a reviewer sees the whole data → monetized-data → on-chain-data story in one click, at the cost of one extra top menu.