e0a5f57793
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
2.3 KiB
2.3 KiB
Repository Guidelines
Project Structure & Module Organization
src/is the Vue 3 library source.src/components/*/contains SFC components (PascalCase folders,*.vuefiles) andindex.tsbarrel exports.src/utils/,src/types/,src/composables/contain shared helpers, types, and composables.- Library entry points and styles are exported via
src/exports.tsandsrc/index.css.
test/contains Vitest specs (e.g.test/index.test.ts,test/plugins/*.test.ts).playground/andplayground-nuxt/are local demo apps for manual testing.docs/is the VitePress documentation site.scripts/contains maintenance utilities (DTS build, peer-deps checks, doc sync scripts).
Build, Test, and Development Commands
Use pnpm (see package.json#packageManager). Key commands:
pnpm dev/pnpm play: run the Vite playground.pnpm build: build the library bundles and generate.d.ts.pnpm test/pnpm test:ui: run tests (CLI/UI).pnpm typecheck: runvue-tsc --noEmit.pnpm lint/pnpm lint:fix: ESLint checks/fixes.pnpm docs:dev/pnpm docs:build: run/build VitePress.
Coding Style & Naming Conventions
- TypeScript-first, Vue 3 SFCs.
- Indentation: 2 spaces, LF endings (see
.editorconfig). - Components:
PascalCasefolder + file names (e.g.src/components/CodeBlockNode/CodeBlockNode.vue). - Helpers:
camelCasefunctions; follow existing file naming insrc/utils/. - Linting uses
@antfu/eslint-configviaeslint.config.mjs.
Testing Guidelines
- Framework: Vitest (
pnpm test). - Prefer small, focused unit tests for parsers/components; name files
*.test.tsundertest/. - Update snapshots with
pnpm test:update.
Commit & Pull Request Guidelines
- Commit messages follow Conventional Commits (e.g.
feat:,fix:,docs:,chore:). - Link issues using GitHub keywords when applicable (e.g.
close: #123). - PRs should include: clear description/rationale, linked issues, and screenshots/GIFs for UI-visible changes.
- Before requesting review: run
pnpm lint,pnpm typecheck, andpnpm test, then sanity-check the playground.
Security & Configuration Tips
- Keep
peerDependenciesaccurate; large integrations (e.g.mermaid,katex) are peers and may be optional. - Verify local peer installs with
pnpm run check:peer-deps.