@hadoku/resume-bot 3.15.83 → 3.15.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -142
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,142 +1,144 @@
|
|
|
1
|
-
# @wolffm/resume-bot
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
>
|
|
99
|
-
> and
|
|
100
|
-
>
|
|
101
|
-
>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
- `${apiBaseUrl}/
|
|
109
|
-
- `${apiBaseUrl}/
|
|
110
|
-
- `${apiBaseUrl}/
|
|
111
|
-
- `${apiBaseUrl}/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
# @wolffm/resume-bot
|
|
2
|
+
|
|
3
|
+
**Guide:** [overview](docs/guide/index.md) · [features](docs/guide/features.md) · [contributing](docs/guide/contributing.md) · [history](docs/guide/history.md) · [trivia](docs/guide/trivia.md)
|
|
4
|
+
|
|
5
|
+
AI-powered conversational interface for interactive resume exploration — chat with an AI about my background, skills, and experience while browsing the resume itself.
|
|
6
|
+
|
|
7
|
+
**See it live:** [hadoku.me/resume](https://hadoku.me/resume)
|
|
8
|
+
|
|
9
|
+
This repo is the npm package that powers that widget. The rest of this README is for contributors working on the package itself.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
## Development
|
|
16
|
+
|
|
17
|
+
### Getting access
|
|
18
|
+
|
|
19
|
+
`pnpm install` and the friend-only API routes need your own credential; `pnpm dev`
|
|
20
|
+
needs none. Getting one is the same for every hadoku repo, so the steps live on one page:
|
|
21
|
+
**[hadoku.me/docs/contributing/#resume-bot](https://hadoku.me/docs/contributing/#resume-bot)**.
|
|
22
|
+
The identity to ask for is `resume-bot-service-key`.
|
|
23
|
+
|
|
24
|
+
### Local Development Setup
|
|
25
|
+
|
|
26
|
+
This package includes a development environment for testing the component locally:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Install dependencies (outside the fleet: npx @hadoku/dev-vault -- pnpm install)
|
|
30
|
+
pnpm install
|
|
31
|
+
|
|
32
|
+
# Start dev server (opens http://localhost:5173)
|
|
33
|
+
pnpm dev
|
|
34
|
+
|
|
35
|
+
# Build for production
|
|
36
|
+
pnpm build
|
|
37
|
+
|
|
38
|
+
# Lint and format
|
|
39
|
+
pnpm lint:fix
|
|
40
|
+
pnpm format
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The dev server uses `index.html` which imports and mounts the component directly. You can pass different configurations via URL parameters:
|
|
44
|
+
|
|
45
|
+
**Example URLs:**
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Default configuration
|
|
49
|
+
http://localhost:5173
|
|
50
|
+
|
|
51
|
+
# Custom theme
|
|
52
|
+
http://localhost:5173?theme=ocean
|
|
53
|
+
|
|
54
|
+
# Admin user
|
|
55
|
+
http://localhost:5173?userType=admin&sessionId=test-123
|
|
56
|
+
|
|
57
|
+
# Full configuration
|
|
58
|
+
http://localhost:5173?theme=ocean&userType=admin&sessionId=dev-session
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Integration
|
|
62
|
+
|
|
63
|
+
This app is a child component of the [hadoku_site](https://github.com/WolffM/hadoku_site) parent application.
|
|
64
|
+
|
|
65
|
+
### Props
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
interface ResumeBotAppProps {
|
|
69
|
+
theme?: string // Optional: 'default', 'ocean', 'forest', etc.
|
|
70
|
+
apiBaseUrl: string // Required: API root path or URL (e.g., '/resume/api' or 'https://api.yourapp.com/api')
|
|
71
|
+
ownerName?: string // Optional: name shown in the chat welcome message (default: 'the candidate')
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Mounting
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import { mount, unmount } from '@wolffm/resume-bot'
|
|
79
|
+
|
|
80
|
+
// Mount the app
|
|
81
|
+
const element = document.getElementById('app-root')
|
|
82
|
+
mount(element, {
|
|
83
|
+
theme: 'ocean', // optional
|
|
84
|
+
apiBaseUrl: '/resume/api' // required - path to the API root
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
// Unmount when done
|
|
88
|
+
unmount(element)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Important:** `apiBaseUrl` is the **API root**, matching the rest of the hadoku
|
|
92
|
+
ecosystem (`/oss/api`, `/jobplatform/api`). Endpoints are appended to it directly.
|
|
93
|
+
It can be either:
|
|
94
|
+
|
|
95
|
+
- A **path** (e.g., `/resume/api`) if the backend is hosted on the same domain
|
|
96
|
+
- A **full URL** (e.g., `https://api.yourapp.com/api`) if the backend is on a different domain
|
|
97
|
+
|
|
98
|
+
> **Breaking change in 2.0.0.** Through 1.x this prop was the _app_ root (`/resume`)
|
|
99
|
+
> and the package appended `/api/...` itself; 1.3.14 accepted both spellings. 2.0.0
|
|
100
|
+
> removes that shim — pass the API root. Passing `/resume` now requests `/resume/chat`
|
|
101
|
+
> and 404s. Migration is a one-line change at the mount site: `/resume` -> `/resume/api`.
|
|
102
|
+
> This does not affect the `./api` worker export — `createResumeHandler(basePath)` is
|
|
103
|
+
> unchanged.
|
|
104
|
+
|
|
105
|
+
The backend handles these endpoints (public unless noted; non-public routes are
|
|
106
|
+
gated in-worker via `@wolffm/worker-utils` edge-auth — see `worker/src/index.ts`):
|
|
107
|
+
|
|
108
|
+
- `${apiBaseUrl}/chat` - POST - Chat with the bot (public, rate-limited)
|
|
109
|
+
- `${apiBaseUrl}/resume` - GET - Fetch resume content, incl. `?v={slug}` variants (public)
|
|
110
|
+
- `${apiBaseUrl}/system-prompt` - GET - Fetch system prompt (admin/friend)
|
|
111
|
+
- `${apiBaseUrl}/tailored-resume` - POST - Per-job tailored resume (admin/friend/service)
|
|
112
|
+
- `${apiBaseUrl}/cover-letter` - POST - Per-job cover letter (admin/friend/service)
|
|
113
|
+
- `${apiBaseUrl}/variants` - POST/GET/DELETE - Variant management (admin/friend)
|
|
114
|
+
|
|
115
|
+
## Deployment
|
|
116
|
+
|
|
117
|
+
Pushes to `main` automatically:
|
|
118
|
+
|
|
119
|
+
1. Build and publish to GitHub Packages
|
|
120
|
+
2. Notify parent site to update
|
|
121
|
+
3. Parent pulls new version and redeploys
|
|
122
|
+
|
|
123
|
+
### Versioning
|
|
124
|
+
|
|
125
|
+
Version bumps are handled automatically through two mechanisms:
|
|
126
|
+
|
|
127
|
+
1. **Pre-commit hook** (primary): The `.husky/pre-commit` hook automatically bumps the version for every commit
|
|
128
|
+
2. **Workflow fallback**: The publish workflow checks if the current version already exists in the registry and bumps it if needed
|
|
129
|
+
|
|
130
|
+
This dual approach ensures versions are always incremented, even if commits bypass the pre-commit hook (e.g., web UI edits, `--no-verify` commits).
|
|
131
|
+
|
|
132
|
+
Version bumping follows this pattern:
|
|
133
|
+
|
|
134
|
+
- Patch version increments on each commit (1.1.8 → 1.1.9)
|
|
135
|
+
- At patch 20, rolls over to next minor (1.1.20 → 1.2.0)
|
|
136
|
+
|
|
137
|
+
## Architecture
|
|
138
|
+
|
|
139
|
+
This package has two exports:
|
|
140
|
+
|
|
141
|
+
- **UI component** (`.` export): `mount(el, props)` / `unmount(el)` — React app from `src/entry.tsx`
|
|
142
|
+
- **Worker API** (`./api` export): `createResumeHandler(basePath, options)` — Hono router from `worker/src/index.ts` (`options.ownerName` sets the chat owner)
|
|
143
|
+
|
|
144
|
+
Both are built and published together as `@wolffm/resume-bot`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/resume-bot",
|
|
3
|
-
"version": "3.15.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "3.15.84",
|
|
4
|
+
"gitHead": "25de2c6d15fc50a0556b92fecfd256d0603de7d5",
|
|
5
5
|
"description": "AI-powered conversational interface for interactive resume exploration",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|