@hadoku/resume-bot

中文文档
3.15.77发布于 2026/11/17MITTypeScriptES Module构建来源已验证近 30 天下载 1.4万

AI-powered conversational interface for interactive resume exploration

原始使用文档
文档目录10 节
  1. Overview
  2. Development
  3. Getting access
  4. Local Development Setup
  5. Integration
  6. Props
  7. Mounting
  8. Deployment
  9. Versioning
  10. Architecture

@wolffm/resume-bot

AI-powered conversational interface for interactive resume exploration — chat with an AI about my background, skills, and experience while browsing the resume itself.

See it live: hadoku.me/resume

This repo is the npm package that powers that widget. The rest of this README is for contributors working on the package itself.

Overview

Two-panel UI: a markdown resume viewer on the left, an AI chat interface on the right. The chat uses Groq's LLM to answer questions about the resume. Also exposes a worker API for generating tailored resumes and cover letters.

Development

Getting access

pnpm install and the friend-only API routes need your own credential; pnpm dev needs none. Getting one is the same for every hadoku repo, so the steps live on one page: hadoku.me/docs/contributing/#resume-bot. The identity to ask for is resume-bot-service-key.

Local Development Setup

This package includes a development environment for testing the component locally:

# Install dependencies (outside the fleet: npx @hadoku/dev-vault -- pnpm install)
pnpm install

# Start dev server (opens http://localhost:5173)
pnpm dev

# Build for production
pnpm build

# Lint and format
pnpm lint:fix
pnpm format

The dev server uses index.html which imports and mounts the component directly. You can pass different configurations via URL parameters:

Example URLs:

# Default configuration
http://localhost:5173

# Custom theme
http://localhost:5173?theme=ocean

# Admin user
http://localhost:5173?userType=admin&sessionId=test-123

# Full configuration
http://localhost:5173?theme=ocean&userType=admin&sessionId=dev-session

Integration

This app is a child component of the hadoku_site parent application.

Props

interface ResumeBotAppProps {
  theme?: string // Optional: 'default', 'ocean', 'forest', etc.
  apiBaseUrl: string // Required: API root path or URL (e.g., '/resume/api' or 'https://api.yourapp.com/api')
  ownerName?: string // Optional: name shown in the chat welcome message (default: 'the candidate')
}

Mounting

import { mount, unmount } from '@wolffm/resume-bot'

// Mount the app
const element = document.getElementById('app-root')
mount(element, {
  theme: 'ocean', // optional
  apiBaseUrl: '/resume/api' // required - path to the API root
})

// Unmount when done
unmount(element)

Important: apiBaseUrl is the API root, matching the rest of the hadoku ecosystem (/oss/api, /jobplatform/api). Endpoints are appended to it directly. It can be either:

  • A path (e.g., /resume/api) if the backend is hosted on the same domain
  • A full URL (e.g., https://api.yourapp.com/api) if the backend is on a different domain

Breaking change in 2.0.0. Through 1.x this prop was the app root (/resume) and the package appended /api/... itself; 1.3.14 accepted both spellings. 2.0.0 removes that shim — pass the API root. Passing /resume now requests /resume/chat and 404s. Migration is a one-line change at the mount site: /resume -> /resume/api. This does not affect the ./api worker export — createResumeHandler(basePath) is unchanged.

The backend handles these endpoints (public unless noted; non-public routes are gated in-worker via @wolffm/worker-utils edge-auth — see worker/src/index.ts):

  • ${apiBaseUrl}/chat - POST - Chat with the bot (public, rate-limited)
  • ${apiBaseUrl}/resume - GET - Fetch resume content, incl. ?v={slug} variants (public)
  • ${apiBaseUrl}/system-prompt - GET - Fetch system prompt (admin/friend)
  • ${apiBaseUrl}/tailored-resume - POST - Per-job tailored resume (admin/friend/service)
  • ${apiBaseUrl}/cover-letter - POST - Per-job cover letter (admin/friend/service)
  • ${apiBaseUrl}/variants - POST/GET/DELETE - Variant management (admin/friend)

Deployment

Pushes to main automatically:

  1. Build and publish to GitHub Packages
  2. Notify parent site to update
  3. Parent pulls new version and redeploys

Versioning

Version bumps are handled automatically through two mechanisms:

  1. Pre-commit hook (primary): The .husky/pre-commit hook automatically bumps the version for every commit
  2. Workflow fallback: The publish workflow checks if the current version already exists in the registry and bumps it if needed

This dual approach ensures versions are always incremented, even if commits bypass the pre-commit hook (e.g., web UI edits, --no-verify commits).

Version bumping follows this pattern:

  • Patch version increments on each commit (1.1.8 → 1.1.9)
  • At patch 20, rolls over to next minor (1.1.20 → 1.2.0)

Architecture

This package has two exports:

  • UI component (. export): mount(el, props) / unmount(el) — React app from src/entry.tsx
  • Worker API (./api export): createResumeHandler(basePath, options) — Hono router from worker/src/index.ts (options.ownerName sets the chat owner)

Both are built and published together as @wolffm/resume-bot.

版本与发布记录

@hadoku/resume-bot 共发布 78 个版本,首次发布于 2026/11/01;过去 12 个月发布了 78 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.15.77latest2026/11/17今天
3.15.762026/11/161 天前
3.15.752026/11/161 天前
3.15.742026/11/161 天前
3.15.732026/11/151 天前
3.15.722026/11/134 天前

关于 @hadoku/resume-bot 的常见问题

@hadoku/resume-bot 是什么?

AI-powered conversational interface for interactive resume exploration

如何安装 @hadoku/resume-bot?

在项目目录运行 npm install @hadoku/resume-bot,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.0.0)、react-dom(^19.0.0)、@wolffm/logger(>=1.3.2)、@wolffm/themes(>=5.7.3)、@wolffm/task-ui-components(>=4.7.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@hadoku/resume-bot 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@hadoku/resume-bot 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@hadoku/resume-bot 可以商用吗?

@hadoku/resume-bot 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@hadoku/resume-bot 的下载量有多少?

根据 npm 官方下载统计,@hadoku/resume-bot 在 2026/10/17 – 2026/11/15 这 30 天内被下载 14,125 次,日均约 471 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@hadoku/resume-bot 还在维护吗?

最新版本 3.15.77 发布于 2026/11/17(今天);至今共发布 78 个版本,其中过去 12 个月发布了 78 个;首次发布于 2026/11/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。