@hadoku/resume-bot
v3.15.72
Published
AI-powered conversational interface for interactive resume exploration
Readme
@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 formatThe 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-sessionIntegration
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/resumenow requests/resume/chatand 404s. Migration is a one-line change at the mount site:/resume->/resume/api. This does not affect the./apiworker 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:
- Build and publish to GitHub Packages
- Notify parent site to update
- Parent pulls new version and redeploys
Versioning
Version bumps are handled automatically through two mechanisms:
- Pre-commit hook (primary): The
.husky/pre-commithook automatically bumps the version for every commit - 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 fromsrc/entry.tsx - Worker API (
./apiexport):createResumeHandler(basePath, options)— Hono router fromworker/src/index.ts(options.ownerNamesets the chat owner)
Both are built and published together as @wolffm/resume-bot.
