A modern, secure desktop companion built on Electron and React/TypeScript for browsing and organizing booru-style imageboard content via its public API. Designed for performance and maintainability.
- Disclaimer & Risk Assessment
- Features
- Quick Start
- Documentation
- Architecture Overview
- Product Structure
- Core UX Principles
- Sync & Background
- Settings
- Current Status
- Active Roadmap
- Development Setup
- License & Legal
This project is unofficial and not affiliated with any external website or company.
- Content Risk: The application does not host, redistribute, or bundle any media. All content is loaded directly from the original website's API or CDN. Users are responsible for adhering to local laws regarding NSFW content and the target websiteβs API Terms of Service (ToS).
- API Risk (Polling): The Core Services are implemented with strict Exponential Backoff and Rate Limiting to minimize the risk of IP/key bans due to abusive polling behavior.
- Security Posture: The application is configured with mandatory Electron security hardening (Context Isolation, Preload Scripts) to prevent any potential Remote Code Execution (RCE) via the renderer process.
| Feature | Description |
|---|---|
| π API Authentication | Secure onboarding flow for Rule34.xxx API credentials (User ID and API Key). Credentials encrypted using Electron's safeStorage API and stored securely. Decryption only happens in Main Process when needed for API calls. |
| π€ Artist Tracking | Track artists/uploaders by tag or username. Add, view, and delete tracked artists. Supports tag-based tracking with autocomplete search (local and remote Rule34.xxx API). Tag normalization automatically strips metadata like "(123)" from tag names. |
| π Background Synchronization | Sync service fetches new posts from Rule34.xxx API with rate limiting (1.5s delay between artists, 0.5s between pages). Implements exponential backoff and proper error handling. Real-time sync progress updates via IPC events. |
| πΎ Local Metadata Database | Uses SQLite via Drizzle ORM (TypeScript mandatory). Direct synchronous access via better-sqlite3 in Main Process. Stores artists, posts metadata (tags, ratings, URLs, sample URLs), and settings. WAL mode enabled for concurrent reads. |
| πΌοΈ Artist Gallery | View cached posts for each tracked artist in a responsive grid layout. Shows preview images, ratings, and metadata. Click to open external link to Rule34.xxx. Supports pagination and artist repair/resync functionality. Mark posts as viewed for better organization. |
| π¨ Progressive Image Loading | Stills: PostCard loads preview first, then upgrades to sample when the card is in the viewport. Viewer uses file URL for full quality. Video posts use sample/file for hover preview as applicable. |
| π Rule34 CDN Selection | Main Process probes Rule34 CDN hosts on startup (rule34.xxx, us.rule34.xxx, wimg.rule34.xxx, api-cdn.rule34.xxx) and rewrites Rule34 media URLs to the fastest reachable host. Probing is non-blocking and safely falls back to rule34.xxx if selection has not completed or fails. |
| π Post Metadata | Cached posts include file URLs, preview URLs, sample URLs, tags, ratings, and publication timestamps. Enables offline browsing and fast filtering. |
| π§ Artist Repair | Repair/resync functionality to update low-quality previews or fix synchronization issues. Resets artist's last post ID and re-fetches initial pages. |
| πΎ Backup & Restore | Manual database backup and restore. Timestamped backups in the user data directory; after each successful backup, older files are pruned to keep the last five copies. Restore replaces the live DB (with checks) and reloads the app. |
| π Search Functionality | Search for artists locally, search for tags remotely via booru autocomplete API, and search posts directly on booru (searchBooru). Tag resolution methods (resolveTags, resolveCharacterTags, resolveCopyrightTags, resolveTagsByType) for identifying artist, character, and copyright tags. Multi-provider support (Rule34.xxx, Gelbooru). |
| β Favorites System | Mark posts as favorites and manage your favorite collection. Toggle favorite status with keyboard shortcut (F) in viewer or via UI controls. Favorites are stored locally in the database. |
| β¬οΈ Download Manager | Download full-resolution media files to your local file system. Download individual posts or manage download queue. Files are saved to user-selected directory with progress tracking. |
| π₯οΈ Full-Screen Viewer | Immersive viewer with keyboard shortcuts, download controls, favorite toggling, and tag management. Auto-hide controls, navigation between posts, and comprehensive media viewing experience. |
| π§ Navigation & Layout | π‘ PARTIAL β Sidebar and top bar are functional; section labels/structure and some filter controls still differ from the original spec on a few pages. Updates sidebar item includes an unread badge (polling-based) that clears when the user explicitly opens Updates. |
| π Playlists & Collections | Create curated collections of posts independent of Artists/Trackers. Create, rename, delete, export, and import playlists. Add posts via quick menu on Post Cards or in viewer. View playlist galleries with filtering/sorting, drag-and-drop reorder for manual playlists, and smart playlists with hybrid local+remote tag queries. |
| π Statistics | Statistics page (/stats): extended aggregates via getExtendedStats IPC β totals (artists/posts/favorites/unviewed), rating/media/viewed/favorites pie charts, provider split (rule34 artists, gelbooru artists), top artists/tags, and DB file size. Service placeholder Artist 0 is excluded from Top Artists. |
| π Auto-Updater | Built-in automatic update checker using electron-updater. Notifies users of available updates, supports manual download, and provides seamless installation on app restart. |
| π Clean English UI | Fully localized English interface using i18next. All UI components and logs use English language for consistency and maintainability. |
| π Multi-Source Ready | Provider pattern abstraction for multi-booru support. Current implementations: Rule34.xxx, Gelbooru. IBooruProvider interface allows adding new sources (Danbooru, etc.) without core database changes. |
The application adheres to a strict Separation of Concerns (SoC) model:
This is the secure Node.js environment. It handles all I/O, persistence, and secrets.
- Desktop Runtime: Electron (desktop runtime for secure Main/Renderer process separation).
- Database: SQLite (via
better-sqlite3driver) with direct synchronous access in Main Process. WAL mode enabled for concurrent reads. - Data Layer: Drizzle ORM (TypeScript type-safety for queries, raw SQL timestamps in milliseconds).
- Security: Secure Storage using Electron's
safeStorageAPI for encrypting API credentials at rest. - API: Custom wrapper based on
axioswith retry and backoff logic. - CDN Routing (Rule34 media):
CdnSelectorServiceprobes Rule34 CDN nodes in background and rewrites only Rule34 media URLs (fileUrl,sampleUrl,previewUrl) to the selected host. - Background Jobs: Node.js timers and asynchronous operations.
This is the sandboxed browser environment. It handles presentation.
- Frontend: React + TypeScript
- Styling: Tailwind CSS + shadcn/ui (modern UI, good baseline A11y).
- State Management: Zustand (minimalistic state layer, aligned with KISS/YAGNI).
- Data Fetching: TanStack Query (React Query) (caching, loading states, API boundary).
- IPC Architecture: Controller-based IPC handlers with
BaseControllerfor centralized error handling and validation. Type-safe dependency injection via DI Container. - IPC Bridge: Strictly typed TypeScript interface (
bridge.ts) used by the Renderer to communicate with the Main Process. - Security: Context Isolation enforced globally; no direct Node.js access from the Renderer.
- Encryption: API credentials encrypted using Electron's
safeStorageAPI. Decryption only occurs in Main Process when needed for API calls. - Provider Pattern: Multi-booru support via
IBooruProviderinterface. Current implementations: Rule34.xxx, Gelbooru.
π For detailed architecture information, see Architecture Documentation.
The application is organized into the following main sections accessible via the Sidebar:
- Updates (Subscriptions) - View new posts from tracked artists and tag subscriptions
- Browse (All posts) - Browse all cached posts with advanced filtering and search
- Favorites (Account favorites) - Access your account favorites synced from the booru
- Playlists (Collections) - Create and manage curated collections of posts
- Statistics - Extended local metrics and distribution charts via
getExtendedStats(counts, pie charts, top artists/tags, provider artist split, DB size) - Tracked (Artists/Tags management) - Manage tracked artists, tags, and subscriptions
- Settings - Configure downloads, sync behavior, appearance, account key, and backup/restore
A unified Top Bar appears on all content pages providing:
- Search - Chip-based search with automatic updates while typing/selecting tags
- Search syntax help -
CircleHelppopover next to search input with supported Rule34 syntax examples - Filters - AI, media type, source (per
FiltersPanel) - Sort - Newest/oldest (
sortOrderon date-oriented lists) - View Toggle - Switch between grid, list, and masonry layouts
- Sync Status - Real-time sync progress indicator with last sync timestamp
β
SyncStatusBadgeis in the top bar. Sorting is handled by the dedicated date sort control in the top bar (outside Filters).
The full-screen viewer provides a polished media viewing experience:
- Full-screen Mode - Immersive viewing with auto-hide controls
- Navigation - Arrow keys (β/β) for previous/next post
- Hotkeys:
Esc- Close viewerβ/β- Navigate between postsF- Toggle favoriteV- Mark as viewedT- Toggle tags drawer
- Auto-hide Bars - Top and bottom bars automatically hide after inactivity
- Tags Drawer - Right-side sheet with tags grouped by type:
- Click tag to add to search (include)
- Right-click to add exclude (
-tag); state shown with green (include) / red (exclude) ring styling β Implemented inViewerDialog/TagsDrawerviauseSearchStore(addIncludeTag/addExcludeTag).
Optimized image loading strategy for performance:
- Preview URL - Low-resolution blurred preview (instant display)
- Sample URL - Medium-resolution sample (loaded in gallery)
- File URL - Full-resolution original (loaded only in viewer)
This ensures fast initial page loads while maintaining high-quality viewing experience. Gallery cards upgrade still images from preview to sample when scrolled into view (PostCard viewport + image decode).
Post cards in gallery views include informative overlays:
- Viewed Badge - Indicator for already viewed posts
- Favorite Badge - Star icon for favorited posts
- Rating Badge - Visual indicator (Safe/Questionable/Explicit)
- Media Type Badge - Icon indicating image or video content β Rating label (S/Q/Explicit) appears in the card hover overlay; video type is indicated where applicable.
When enabled in Settings β Sync, the app starts a full Sync All after the main window is ready (if no sync is already running). Progress uses the same sync pipeline as manual sync.
Settings β Sync β Sync interval controls how often a background full sync runs (Disabled, 15 / 30 / 60 / 120 minutes). The main process enforces a minimum interval; values below that are treated as disabled. Rate limiting and backoff in SyncService apply to scheduled runs as well as manual ones.
A lightweight maintenance scheduler runs PRAGMA wal_checkpoint(PASSIVE) and PRAGMA optimize after a short post-startup delay and on a daily timer. This is separate from user-initiated VACUUM/backup operations.
Settings are organized into tabs for faster scanning and lower cognitive load:
- Default download folder - Choose or reset destination folder
- Duplicate behavior -
skiporoverwritefor existing files - Folder structure -
flator{artist_id}subfolder mode - Proxy URL - Optional HTTP/HTTPS proxy for outbound requests/downloads
- Sync on startup - Toggle automatic sync when app opens
- Sync interval - Disabled, 15 / 30 / 60 / 120 minutes
- Sync now - Manual trigger in the sidebar with live
Last syncrelative time
- Theme -
System,Light,Dark
- Create backup - Manual timestamped backup
- Restore backup - Restore from backup file and reload app
- Integrity check - Run
PRAGMA integrity_check - Auto-backup schedule -
Never/Daily/Weekly(evaluated on app startup) - Automatic backup rotation - Keep approximately the last five backups (not configurable in UI)
- API key update - Password-style input with show/hide toggle
- Key status badge -
Configured/Not configuredvia safehasApiKeycontract
- Settings success/error badges auto-hide after ~5 seconds to avoid stale status indicators.
The application is stable and production-ready (see package.json β version for the current release number) with the following features implemented:
- β Electron Version: 39.2.7 with latest security features
- β Build System: electron-vite for optimal build performance
- β
Database Architecture: Direct synchronous access via
better-sqlite3in Main Process with WAL mode for concurrent reads - β Portable Mode: Support for portable executables with data folder next to executable
- β Testing Architecture: Unified testing setup with Vitest for Unit/Integration tests, Playwright for E2E tests
- β
Dual ABI Support: Automatic switching between Node.js and Electron ABI for
better-sqlite3during testing β οΈ HMR Status: Renderer process has full HMR support. Main process requires manual restart (no auto-restart on file changes)
- β
Schema: Core tables
artists,posts,settings; additionaltag_metadata,playlists,playlist_entries, and FTS5 external content for posts - β
Migrations: Fully functional migration system using
drizzle-kitwith idempotent migration handling - β
Media Type Support:
media_typecolumn inpoststable for efficient image/video filtering (image,video) - β
Indexes: Optimized indexes on
artistId,isViewed,publishedAt,isFavorited,lastChecked,createdAt,mediaType - β
Composite Indexes: Composite indexes on
(artist_id, rating, is_viewed)and(artist_id, media_type)for optimized multi-column filter queries - β
FTS5 Full-Text Search: FTS5 virtual table
posts_ftswithunicode61tokenizer for fast tag searching - β
Provider Support: Multi-booru support with
providerfield in artists table (rule34, gelbooru) - β
Artist Types: Support for
tag,uploader, andquerytypes
- β
Secure Storage: API credentials encrypted using Electron's
safeStorageAPI (Windows Credential Manager, macOS Keychain, Linux libsecret). Credentials encrypted at rest, decryption only in Main Process - β Database Backup/Restore: Manual backup and restore functionality implemented with integrity checks. Create timestamped backups and restore from files
- β
Input Validation: Zod validation implemented per IPC handler via
BaseController - β Context Isolation: Enabled globally with sandbox mode for maximum security
- β CSP (Content Security Policy): Strict CSP in production, relaxed for development (HMR support)
- β
Portable Mode: Fully implemented - automatically detects portable mode and uses
data/folder - β
Age Gate: Age gate component implemented with legal confirmation (
confirmLegalmethod)
- β Tag Normalization: Inputs like "tag (123)" are automatically stripped to "tag" before saving/syncing
- β
Sync Service: Handles
ON CONFLICTcorrectly and populates the gallery with proper upsert logic - β Timestamp Handling: All timestamps use Drizzle timestamp mode with proper milliseconds precision
- β
Provider Pattern: Multi-booru support via
IBooruProviderinterface (Rule34, Gelbooru) - β Rate Limiting: Intelligent rate limiting with 1.5s delay between artists, 0.5s between pages
- π‘ Anti-Bot Measures: Implemented in Rule34Provider. Not symmetric across all providers.
- β
Progressive image loading (stills):
PostCardupgrades preview β sample in viewport; original in viewer - β
Virtualization:
react-virtuosoimplemented for efficient large list rendering - β
Search Functionality: Local artist search, remote tag search via booru autocomplete API, and direct booru search (
searchBoorumethod) with tag resolution (resolveTags,resolveCharacterTags,resolveCopyrightTags,resolveTagsByType) - π‘ Sidebar Navigation: Persistent sidebar with main navigation sections (Updates, Browse, Favorites, Playlists, Tracked, Settings) Functional but item labels/structure differ from roadmap spec. Tracked vs Artists distinction not explicit.
- β
Global Top Bar: Search (chip-based include/exclude with OR-group tokens), syntax-help popover,
FiltersPanel(AI, media, source), dedicated date sort control, view toggle,SyncStatusBadge - β Advanced Filtering: Filter by AI-generated tags, media type (image/video), and source (all/favorites/subscriptions)
- β Sorting: Sort by date order (newest/oldest) across main feeds
- π‘ View Modes: Grid (virtualized) and masonry (CSS columns) with responsive design Masonry trades full list virtualization for column layout on very large feeds.
- β Updates feed: Per-post viewed state, Mark all read for the feed, and a Creators tab with new-post counts and navigation to artist galleries
- β Full-Screen Viewer: Immersive viewer with keyboard shortcuts, download, favorites, and tag management
- β
Video Support:
.mp4,.webm,.mov,.avi,.mkv,.flv,.wmv,.m4vvideo formats supported with native<video>element - β Download Manager: Download full-resolution files with progress tracking and queue management
- β
Favorites System: Complete implementation with
isFavoriteddatabase field, toggle functionality, and keyboard shortcuts - β Backup Controls: UI component for creating and restoring database backups with integrity checks
- β Credential Verification: Verify API credentials before saving and during sync operations
- β
Age Gate Component: Fully implemented with legal confirmation (
AgeGate.tsxcomponent andconfirmLegalIPC method) - β Content Security Policy: Strict CSP with support for Rule34.xxx and Gelbooru.com media sources
- β
Rule34 CDN Selector: Startup probe and runtime URL rewrite for Rule34 media with fallback to
rule34.xxx - β
Safe Mode / NSFW blur: When Safe Mode is enabled, gallery cards and the full-screen viewer apply configurable blur to sensitive ratings (
PostCard,ViewerDialog,safeModeStore)
-
Get API Credentials:
- Visit https://rule34.xxx/index.php?page=account&s=options
- Copy your User ID and API Key from the API Access section
-
Onboarding:
- Launch the application
- Enter your User ID and API Key in the onboarding screen
- Click "Save and Login"
-
Add Artists:
- Click "Add Artist" button
- Enter artist name and tag
- Select type (tag or uploader)
- Click "Add"
-
Sync Posts:
- Click "Sync All" to fetch posts from Rule34.xxx
- Wait for synchronization to complete (progress updates shown in real-time)
- Click on an artist to view their gallery
- Use "Repair" button in gallery to resync and update preview quality if needed
Comprehensive documentation is available in the docs/ directory:
- User Guide - Complete guide for end users (installation, usage, troubleshooting)
- Documentation Index - Complete navigation guide to all documentation
- Glossary - Key terms and concepts (booru, tags, sync, cache, etc.)
π‘ New to RuleDesk?
- Start here: Open the User Guide for the full end-user walkthrough.
- Need a map of docs? Use the Documentation Index.
- Quick Start - First launch and basic setup (this document)
- Features - Complete feature list (this document)
- Settings - Application configuration (this document)
- Sync & Background - Synchronization guide (this document)
- Roadmap - Development roadmap and planned features
- Features.md - Short internal priority list (P1 / P2)
- Product Strategy - Long-term positioning and research pillars
- Architecture Documentation - System architecture and boundaries
- API Documentation - IPC API reference and usage patterns
- Database Documentation - Schema, migrations, and operational notes
- Rule34 API Reference - Unofficial Rule34.xxx API documentation
- .cursorrules - Code standards and development principles
- .ai/LESSONS.txt - Canonical short lessons (
Problem -> Root Cause -> Invariant Rule)
π‘ Tip: If you're new to RuleDesk, start with the Documentation Index for structured navigation.
Current priority is roadmap parity and UX polish on top of already shipped core modules:
Goal: Allow users to refine the gallery view.
- β
Global top bar β
GlobalTopBar.tsx+FiltersPanel(AI, media, source) and separate date sort control - β
AI / media / source β Backed by
searchStoreand post queries - β
Source on Browse β Favorites/Subscriptions require a tag query when using those modes (
SourceSwitcher); intentional (see roadmap) - π‘ View modes β Grid (
VirtuosoGrid) vs masonry (CSS columns); different scaling behavior on huge lists - β FTS5 β Tag search where integrated in browse/search flows
Status: Day-to-day filtering works with current scope (AI/media/source + date sort).
Goal: Allow saving full-resolution files to the local file system.
- β "Download Original" button on post view (implemented in ViewerDialog)
- β Download Handler: Downloads run in Main Process with progress tracking
- β
Progress Events: Real-time download progress via IPC events (
onDownloadProgress) - β
File Management: Open downloaded file in folder (
openFileInFolder) - β Batch download: "Download all" flows for galleries and lists (rate-limited; see Settings for folder behavior)
- β Settings: Default download folder and duplicate/structure options in Settings
Goal: Create curated collections of posts independent of Artists/Trackers.
Phase 1: MVP β COMPLETED
- β
Database Tables:
playliststable (id,name,is_smart,query_json,icon_name,created_at) andplaylist_entriestable (playlist_id,post_id,added_at) with proper indexes - β Playlist Management: Create, rename, delete playlists with full CRUD operations
- β Add to Playlist: Quick add menu on Post Cards and in viewer dialog
- β Playlists Page: Dedicated page in Sidebar with playlist list and gallery views
- β Playlist Gallery: Grid and masonry view modes with filtering, sorting, and search
- β Smart Playlists: Support for dynamic playlists with tag-based queries (auto-fill based on tags)
- β Hybrid Smart Search: Smart collections resolve posts from local DB and remote API, merge, and deduplicate results
- β
Manual Reordering: Drag-and-drop post ordering for manual playlists (
positionsort mode) - β
Import/Export: JSON-based playlist transfer (
.ruledesk-playlist.json) via file dialogs - β FTS5 Integration: Fast tag searching within playlists using FTS5 full-text search
- β
IPC Controller: Full
PlaylistControllerimplementation with type-safe operations
Status: β Core playlist functionality fully implemented. Users can create playlists, add posts, view galleries, and manage collections independently of artist tracking.
- β
Database Architecture - β
COMPLETED: Direct synchronous access via
better-sqlite3with WAL mode for concurrent reads. All database operations run in Main Process. - β
Encrypt / Secure Storage for API Credentials - β
COMPLETED: Using Electron's
safeStorageAPI for encryption. API keys encrypted at rest, never exposed to Renderer process. - β Database Backup / Restore System - β COMPLETED: Manual backup and restore functionality implemented with integrity checks and timestamped backups.
- β
IPC Architecture - β
COMPLETED: Controller-based IPC handlers with
BaseControllerfor centralized error handling and validation. Type-safe dependency injection via DI Container. - β Portable Mode - β COMPLETED: Automatic detection of portable mode with data folder support.
π For detailed roadmap information, see Roadmap Documentation. For backlog and planned work, see Backlog and Planned product work.
This project uses electron-vite as the build tool for both the Electron Main and Renderer processes, ensuring optimal build performance.
- Node.js: v18 or higher
- npm: v9 or higher (or yarn)
- Git: For version control
# Clone the repository
git clone https://github.com/KazeKaze93/ruledesk.git
cd ruledesk
# Install dependencies
npm install
# Start the application in development mode
# This runs the Vite dev server for the Renderer and starts the Electron Main process.
npm run devThe application stores configuration in SQLite database:
- API Credentials: Stored securely with encryption using Electron's
safeStorageAPI. API keys are encrypted at rest and only decrypted in Main Process when needed for API calls. - Database Location:
- Portable Mode: If running from a portable executable, database is stored in
data/folder next to the executable - Standard Mode: Electron user data directory (automatically managed)
- Windows:
%APPDATA%/RuleDesk/metadata.db - macOS:
~/Library/Application Support/RuleDesk/metadata.db - Linux:
~/.config/RuleDesk/metadata.db
- Windows:
- Portable Mode: If running from a portable executable, database is stored in
- Database Architecture: Direct synchronous access via
better-sqlite3with WAL mode for concurrent reads - No Environment Variables Required: All configuration is handled through the UI
To package the application for distribution:
# Build for current platform
npm run build
# Package with electron-builder (after build)
npm run dist
# Or use electron-builder directly:
npx electron-builderThe built binaries will be available in the release/ directory. The exact output location may vary depending on your Electron builder configuration.
Build Targets:
- Windows: NSIS installer and portable executable (x64)
- macOS: DMG package
- Linux: AppImage
Run the following commands to ensure code quality:
# Type checking
npm run typecheck
# Run linter to check code style and potential issues
npm run lint
# Validate image loading/decoding attributes in renderer
npm run check:img-attrs
# Run both (validation)
npm run validateThe project uses Vitest for unit and integration tests, and Playwright for E2E tests.
# Run all tests (automatically rebuilds better-sqlite3 for Node.js, then rebuilds for Electron after)
npm test
# Run tests in watch mode
npm run test:watch
# Run only integration tests (autonomous, rebuilds for Node.js automatically)
npm run test:integration
# Run integration tests in watch mode (for TDD)
npm run test:integration:watch
# Run E2E tests
npm run test:e2e
# Generate coverage report
npm run test:coverageTesting Architecture:
- Unit Tests: Located in
tests/unit/- Test individual components, hooks, and utilities - Integration Tests: Located in
tests/integration/- Test IPC controllers and services with real database - E2E Tests: Located in
tests/e2e/- Test full user workflows with Playwright
Dual ABI Support:
The testing setup automatically handles switching between Node.js and Electron ABI for better-sqlite3:
pretesthook rebuilds for Node.js before testsposttesthook rebuilds for Electron after tests- This ensures
npm testworks seamlessly, andnpm run devworks immediately after
This project is licensed under Apache 2.0.
You may use, reproduce, modify, distribute, and sublicense the software under the terms of Apache 2.0. The license includes an express patent grant and requires preservation of copyright and license notices.
The full license text is available in the LICENSE file in this repository.
By using this software, you acknowledge and agree to the following:
18+ Only: This application is intended exclusively for adults (18+) in jurisdictions where viewing NSFW content is legal.
No Content Hosting: The application does not host, store, mirror, or redistribute any media content. All media is requested directly from the original websiteβs API/CDN at the userβs initiative.
Use at Your Own Risk: The authors and contributors of this project:
- Do not control the content provided by third-party services.
- Do not endorse, moderate, or curate any content accessed through this software.
- Are not responsible for how you use this software or which content you access with it.
Compliance with Laws & ToS: You are solely responsible for:
- Complying with the laws and regulations applicable in your country/region.
- Complying with the target website's Terms of Service, API rules, and any usage limitations (including rate limits and content policies).
No Warranty / Limitation of Liability: This software is provided βAS ISβ, without warranties or conditions of any kind, either express or implied. To the fullest extent permitted by applicable law, in no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
If you modify the database schema (src/main/db/schema.ts):
# Generate migration from schema changes
npm run db:generate
# Run migrations manually (migrations also run automatically on startup)
npm run db:migrate
# Open Drizzle Studio to inspect database
npm run db:studioNote: Migrations run automatically on application startup. The migration path is automatically detected based on whether the app is packaged or in development mode.
Performance Optimizations:
- FTS5 Full-Text Search: Fast tag searching using SQLite FTS5 virtual table with
unicode61tokenizer - Composite Indexes: Optimized indexes for common filter combinations (artist + rating + view status)
- External Content Tables: FTS5 uses external content to avoid data duplication and save storage space
- Development: Database stored in Electron user data directory
- Production (Standard): Electron user data directory
- Production (Portable):
data/folder next to executable
π For detailed database information, see Database Documentation.
This project adheres to strict development principles:
- Architecture: SOLID, DRY, KISS, YAGNI principles
- TypeScript: Strict typing, no
anyor unsafe casts - Error Handling: Proper error handling with descriptive messages via
BaseController - Security: Context Isolation enabled, sandbox mode, CSP headers, no direct Node.js access from Renderer
- Database: Type-safe queries via Drizzle ORM, no raw SQL (except migrations)
- UI: Tailwind CSS only, no inline styles, shadcn/ui components, accessibility considerations
- Logging:
electron-logfor all logging (noconsole.login production code) - IPC: Controller-based architecture with dependency injection
π For detailed guidelines, see .cursorrules and .ai/LESSONS.txt.