- Workspace root holds Rust crates and JS tooling; see
Cargo.tomlfor members. - Desktop app (React + Tauri):
clipper/withsrc/for UI andsrc-tauri/for backend bindings. - Server (Axum + SurrealDB):
clipper-server/with bundled web UI inclipper-server/web/. - Core libraries and tooling:
clipper-indexer/,clipper-client/,clipper-cli/,packages/clipper-ui/, and WIPclipper-slint/. - Docs and supporting assets:
docs/,docker/,cloud-services/,data/.
- Rust workspace build:
cargo build --workspace(add--releasefor production). - Rust tests:
cargo test --workspaceor package-specific (cargo test -p clipper-server -- --test-threads=1for sequential runs). - Desktop app:
npm installinclipper/, thennpm run tauri:devfor live dev ornpm run tauri:buildfor bundles. - Shared UI package type check:
npm run build:ui(invokestsc --noEmitunderpackages/clipper-ui). - Server web UI:
npm run dev:webfor Vite dev server;npm run build:webto emit production assets.
- Rust: use
cargo fmtbefore committing; keep modules small and prefer explicitpubsurfaces. Runcargo clippyfor linting. - TypeScript/React: type-first, prefer
functioncomponents, hooks over classes. PascalCase for components, camelCase for variables/functions, kebab-case for file names unless React component file. - Tests and fixtures live beside sources when possible; name test files with
_test.rsfor Rust and.test.ts(x)for UI.
- Prioritize unit tests in crates and component tests in the web/desktop UI. Add integration tests for API/DB boundaries.
- Use deterministic data; avoid real network calls. For server/client crates, keep long-running tests gated and default to sequential when hitting the database.
- Document any new env vars or feature flags in test descriptions and ensure they have sensible defaults.
- Commit messages follow short, imperative summaries (e.g., “Fix clipboard sync retry”); group related changes per commit.
- PRs should describe scope, motivation, and risks; link issues when applicable and note manual test steps (commands, platforms). Include screenshots for UI changes and mention breaking changes explicitly.
- Keep changes minimal per PR; update docs (
README.md,docs/) and configuration samples when behavior or flags change.
- Server defaults bind to
0.0.0.0; setCLIPPER_LISTEN_ADDR=127.0.0.1for local-only use. - Always set
CLIPPER_BEARER_TOKENwhen exposing the server and prefer TLS builds (--features tlsoracme) on untrusted networks. - Treat clipboard data and exports as sensitive; ensure storage paths are permissioned per-user and short URLs are used only for non-sensitive clips.