This document provides context, technical details, and guidelines for AI assistants (like Gemini, Copilot, Claude, etc.) working on the lixa-gallery project.
lixa-gallery is a desktop application built with Tauri 2 and Svelte 5 designed for managing, favoriting, and exporting photos. It allows users to browse a folder, select images as favorites, and export them.
- Framework: Svelte 5 (using Runes)
- Desktop Runtime: Tauri 2
- Build Tool: Vite
- Styling: Tailwind CSS 4
- Language: TypeScript (Frontend), Rust (Backend)
- UI Components: Bits UI, Lucide Svelte
- Package Manager: Yarn (modern)
src/: Svelte frontend source code.src-tauri/: Rust backend and Tauri configuration.assets/: UI assets, screenshots, and demo media.static/: Static files served by the web server.components.json: Configuration for UI components (likely shadcn/ui or similar).
- Development:
npm run dev(starts Vite) ornpm run tauri dev(starts Tauri dev environment). - Build:
npm run build(builds the frontend and Rust binary). - Linting & Formatting:
npm run lint: Checks formatting.npm run lint:fix: Fixes formatting for both TS/Svelte and Rust.npm run format:rs: Formats Rust code.npm run format:ts: Formats TS and Svelte code.
- ALWAYS use Svelte 5 Runes (
$state,$derived,$props,$effect) for reactivity. Avoid legacy Svelte 4 syntax unless modifying legacy files. - Use
Snippetfor reusable UI fragments within components.
- Use the Tauri 2 API for filesystem access, dialogs, and window management.
- Backend logic should be implemented in Rust within
src-tauri/src/main.rs(or modularized) and exposed via#[tauri::command].
- Use Tailwind CSS classes for styling.
- Follow the existing design system for consistency.
- Ensure all file operations are handled safely using Tauri's plugins (e.g.,
plugin-fs,plugin-dialog).