How eroge-abyss/tadoku works
Project type and purpose
• Tadoku is a full‑stack, cross‑platform desktop application built with Tauri (Rust) for the backend and SvelteKit (TypeScript/Svelte) for the frontend.
• Its purpose is to let users manage and track their Visual Novel (VN) library, record playtime, and integrate with external services (VNDB API, Discord Rich Presence).
File structure
• Top‑level:
• package.json / bun.lock / svelte.config.js / vite.config.js: frontend build/config.
• src/: SvelteKit app (routes, components).
• src-tauri/src/commands: exposes Tauri commands for opener (launching games), storage (persistence), vndb (searching via VNDB API), scripts.
• src-tauri/src/services: encapsulates domain logic (playtime tracking, Discord RPC, store adapter, VNDB wrappers).
• Persistence: likely via local filesystem or embedded DB via store.rs.
• Configuration: tauri.conf.json defines allowed APIs and privileges.
README for additional insights
• Tech stack: Tauri + SvelteKit.
• Features: playtime tracking, game CRUD, NSFW filter, pinning, character info, Discord Rich Presence.
• External dependencies: VNDB API, Discord RPC, local OS for launching executables.
a. Main components
• Frontend (SvelteKit WebView)
• Tauri Core (Rust binary + embedded webview)
• IPC Layer (Tauri invoke / event system)
• Command Handlers (opener, storage, vndb, etc.)
• Services Layer (playtime monitor, Discord RPC, VNDB client, local storage adapter)
• OS (filesystem, process launcher)
• External Services (VNDB API, Discord RPC endpoint)
b. Relationships and interactions
1. User interacts with SvelteKit UI
2. UI invokes Tauri commands via IPC
3. IPC routes to specific command handler in Rust
4. Command delegates to one or more services
• Storage service ↔ local filesystem or embedded DB
• Playtime service ↔ OS process watcher
• Discord service ↔ Discord RPC endpoint over network or named pipe
• VNDB service ↔ VNDB REST API over HTTPS
5. Services return data to command handler → IPC callback → UI updates
c. Architectural patterns & principles
• MVVM‑style separation: UI <→> Commands <→> Services
• Single Rust binary (monolith) backing multiple domain services
• IPC boundary isolates UI (JavaScript) from OS‑level actions (Rust)
• Dependency injection at service layer for testability
d. Key technologies & libraries
• Frontend: SvelteKit, Vite, Bun
• IPC: @tauri-apps/api
• Backend: Tauri (Rust), serde (JSON), reqwest (HTTP), discord‑rpc crate
• Persistence: custom store.rs (file or embedded DB)
Essential details checklist
• Data persistence layer inside or adjacent to Storage Service