plan-ideas #
Summary #
CV/resume generation system with CLI + web UI. Originally a monolithic pdf.js script (~360 lines), now refactored into a modular system on the cli branch with browser-safe core modules, Handlebars templates, and a SvelteKit web UI with live preview. The refactor is extensive but entirely uncommitted -- the working tree has massive changes (7 modified files, 20+ new untracked files/directories). Deployed to Cloudflare Workers. Intent: revival.
Action Items #
Detailed Assessment #
Project Status #
Major refactor in progress. The system has been split from one file into:
pdf.js -> 8-line CLI entry point calling lib/cli.js
lib/cli.js -> CLI orchestration + arg parsing
lib/generate-cv.js -> high-level API (generatePreview, generatePdfFile, generateCv)
lib/client-pdf.js -> browser print-to-PDF via iframe
lib/core/resume.js -> JSON5 parsing + merging (browser-safe)
lib/core/templates.js -> Handlebars template rendering (browser-safe)
lib/core/html.js -> HTML generation from resume + template
lib/core/utils.js -> date/url/experience formatting
lib/core/pdf.js -> Playwright-based PDF generation (Node only)
lib/core/pdf-cloudflare.js -> Cloudflare Browser Rendering API
SvelteKit app added:
src/routes/+page.svelte-- just "Howdy"src/routes/cv/+page.svelte-- JSON5 editor + live preview + PDF downloadsrc/routes/layout.css-- Tailwindsrc/lib/mirrors some core modules for Svelte imports
Profile data moved from data/ to profile/:
profile/Experience.json5,profile/defaults.json5,profile/projects.jsonc,profile/work-projects.md
Templates:
templates/html.hbs-- Handlebars HTML templatetemplates/style.css-- resume CSS
Additional:
pdf.py-- Python alternative for PDF generation- Playwright e2e tests scaffolded
- Wrangler config for Cloudflare Workers deploy
Git Status #
Branch: cli (synced with origin/cli, 0 ahead / 0 behind)
Dirty: massive uncommitted changes
Modified (7 files):
.gitignore(+9/-1),.npmrc(-1 line),pdf.js(360 -> 8 lines)- Deleted:
data/Experience.json5,data/defaults.json5,data/projects.jsonc,data/work-projects.mdUntracked (20+ items): .rules,MODULARIZATION_SUMMARY.md,README.md,SETUP_SUMMARY.mde2e/,jsconfig.json,lib/(entire modular system),logs/package.json,playwright.config.js,pnpm-lock.yaml,pnpm-workspace.yamlprofile/,src/(entire SvelteKit app),static/,svelte.config.js,vite.config.js,wrangler.jsonc
Last Activity #
Last commit: 2025-12-19 ("rearrange" -- on cli branch) Last file edit: 2026-01-02 (logs/pdf-daemon-error.log), 2025-12-19 for source files
Existing Plans & TODOs #
No PLAN.md, no todos/ folder, no TODO/FIXME in source. MODULARIZATION_SUMMARY.md outlines "Next Steps":
- Modularization complete
- Implement Svelte page using lib/generate-cv.js (partially done)
- Create API endpoint for PDF generation (not done)
- Add styling and UX refinements (not done)
SETUP_SUMMARY.md notes Cloudflare Workers PDF generation as optional (can use browser print instead).
Remaining Work #
Immediate (commit the refactor):
- Stage and commit all changes on
clibranch - This is the most critical action -- 2+ months of work is uncommitted
Fix the web UI:
src/routes/cv/+page.svelteuses Svelte 4 syntax ($:reactive,on:click) -- needs migration to Svelte 5 runes- Template files need to be accessible from the web (move to
static/templates/default/or create a server endpoint) - Resume editor should load from
profile/Experience.json5as default instead of placeholder
Consolidate duplicated modules:
lib/core/andsrc/lib/core/appear to be duplicates -- SvelteKit imports from$lib/so onlysrc/lib/matters for the web UIlib/(top-level) is for CLI use -- clarify the boundary
PDF generation strategy:
- CLI: Playwright (works, just needs testing)
- Web: three options documented but none fully wired:
- Browser print dialog via
client-pdf.js(simplest) - Server endpoint with Playwright
- Cloudflare Browser Rendering API
- Browser print dialog via
- Pick one for web and implement it end-to-end
Deployment:
- Wrangler config exists but unclear if it deploys correctly with the new structure
- Need to verify
pnpm run deployworks
Cleanup:
- 6 documentation files created during refactor -- most are redundant. Keep at most a single README
logs/directory with daemon logs -- gitignorepdf.py-- decide if Python PDF path is still needed alongside JS
Ideas & Considerations #
- The modular architecture is well-designed -- browser-safe core with Node-only PDF is the right split
- For revival, the fastest path is: commit, fix Svelte 5 syntax, make templates accessible, verify deploy
- Consider using the profile JSON5 files as the default state in the web editor (load server-side)
- Could add multiple resume versions/templates (the template system supports it)
- A "tailor resume to job posting" feature using LLM could be valuable
- The many git branches (25+) suggest a long history of experiments -- consider cleaning up stale remote branches