All API through Rust proxy, fix unregistered files null uuid, People enhancements
This commit is contained in:
36
AGENTS.md
Normal file
36
AGENTS.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# 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:3002` directly.
|
||||
- **Rust proxies to external API**: `CORE_API = http://localhost:3002` (hardcoded in `src-tauri/src/main.rs`). This service must be running for the app to function.
|
||||
- **API key**: Hardcoded in `src-tauri/src/main.rs` only (`API_KEY` constant).
|
||||
- **Rust entrypoint**: `src-tauri/src/main.rs` — 10 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` (returns base64 video string)
|
||||
- `update_identity_name`, `delete_identity` (identity management)
|
||||
- **Frontend routes**: `/search`, `/library`, `/people` (redirect `/` → `/search`)
|
||||
- **Frontend entry**: `src/main.ts` → `src/App.vue` → `src/router/index.ts`
|
||||
|
||||
## Key Details
|
||||
- **`withGlobalTauri: true`** in `tauri.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: false` in `tsconfig.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
|
||||
Reference in New Issue
Block a user