packages/core— TypeScript core library (built withtsup, tested with Vitest).packages/ui— Vue 3 component library used across apps (Vite build, ESLint enabled).packages/web— Vite web app (dev server, public assets inpublic/).packages/extension— Browser extension (Vite build, shares UI components).packages/desktop— Electron app; bundlespackages/web/distviaelectron-builder.packages/mcp-server— MCP server (Express +@modelcontextprotocol/sdk,tsupbuild).- Support:
api/(Vercel serverless functions),docs/&mkdocs/,docker/,scripts/,tests/.
- Install deps (pnpm only):
pnpm install - Web dev:
pnpm dev(builds core/ui, runs web) - Desktop dev:
pnpm dev:desktop - Extension dev:
pnpm dev:ext - Build all:
pnpm build| Desktop build:pnpm build:desktop - Tests (all packages):
pnpm test(Vitest) — per package:pnpm -F @prompt-optimizer/core test - Lint UI:
pnpm lint| fix:pnpm lint:fix
- TypeScript + Vue 3. Use 2-space indentation and explicit typings where practical.
- Vue SFCs in PascalCase (e.g.,
ConversationManager.vue); directories in kebab-case when applicable. - Tests end with
.test.tsand live undertests/unitortests/integration. - Use
pnpmexclusively. Do not addpackage-lock.jsonoryarn.lock(enforced by Husky).
- Framework: Vitest. Run all with
pnpm test; coverage viapnpm -F <pkg> test:coverage. - Prefer fast unit tests; add representative integration tests for cross-package flows.
- Example:
pnpm -F @prompt-optimizer/web testorpnpm -F @prompt-optimizer/core test:unit.
- Follow Conventional Commits:
feat,fix,refactor,buildwith optional scope. Example:feat(ui): add template preview. - PRs must include: clear description, linked issues, test plan/steps; UI changes should include screenshots.
- Ensure
pnpm lintandpnpm testpass before requesting review.
- Do not commit secrets. Use
.env.local(seeenv.local.example). - Node 22.x is required. Local dev and deploy can use Docker/Vercel; see
dev.mdanddocs/.