2.1 KiB
2.1 KiB
AGENTS.md
Stack
- Frontend: Vue 3 + TypeScript + Vite (port 5173)
- Desktop: Tauri 2 (Rust backend in
src-tauri/) - Runtime: Node.js + npm + Rust/Cargo all required
Commands
npm run dev # Vite dev server (port 5173)
npm run build # vue-tsc --noEmit && vite build (typecheck + bundle)
npm run preview # Preview production build
npm run tauri # Alias for `cargo tauri`
cargo tauri dev # Full Tauri desktop dev (builds frontend + opens native window)
cargo tauri build # Full native app build (outputs to src-tauri/target/release/bundle/)
Architecture
- All Core API calls go through Rust Tauri commands — frontend NEVER contacts
localhost:3002directly. - Rust proxies to external API:
CORE_API = http://localhost:3002(hardcoded insrc-tauri/src/main.rs). This service must be running for the app to function. - API key: Hardcoded in
src-tauri/src/main.rsonly (API_KEYconstant). - Rust entrypoint:
src-tauri/src/main.rs— 15 Tauri commands:search_llm_smart,get_files,get_people,get_faces,get_traces(data APIs)get_thumbnail,get_identity_profile(return base64 image strings)get_video_stream(returnsfile://URL to temp MP4)update_identity_name,delete_identity(identity management)search_identities,get_face_candidates(search)merge_identities,bind_face,unbind_face(identity ops)
- Frontend routes:
/search,/library,/people(redirect/→/search) - Frontend entry:
src/main.ts→src/App.vue→src/router/index.ts
Key Details
withGlobalTauri: trueintauri.conf.json—window.__TAURI__is available in the webview.- No linter, formatter, or tests configured — do not invent them unless asked.
- TypeScript is non-strict (
strict: falseintsconfig.json). - CI/CD: Shell scripts only (
ci-cd.sh,local-ci-cd.sh,setup-gitea-ci.sh). No GitHub Actions. - Full native build order:
npm install→npm run build→cargo tauri build - Rust deps: sqlx (postgres), reqwest, tokio, tauri-plugin-shell, base64