Commit Graph

152 Commits

Author SHA1 Message Date
c93a7d5d29 feat: thumbnails : part1 2026-03-08 17:54:47 +01:00
360d6e85de feat: review cbr and unraring for image on api 2026-03-07 15:47:46 +01:00
162b4712e7 fix: improve CBR extraction with fallback and increase timeout
- Try multiple entries in CBR archive until finding valid image
- Increase timeout from 12s to 30s for large files
- Better error messages for debugging
2026-03-07 15:02:55 +01:00
217919fa77 perf: increase concurrent renders limit from 4 to 8 2026-03-07 12:16:23 +01:00
ee0235b824 fix: improve CBR extraction logging and remove dead code
- Add magic bytes validation for extracted CBR images
- Add hex dump for debugging invalid images
- Show first entries when listing CBR archive
- Remove unused structs and functions from settings.rs
- Add -y flag to unrar for auto-confirm
2026-03-07 12:13:55 +01:00
f721b248f3 feat: add image rendering logs and refactor Icon component
- Add detailed tracing logs for image processing (CBZ, CBR, PDF)
- Add cache hit/miss logging with timing info
- Centralize all SVG icons into reusable Icon component
- Add Settings icon to header navigation
- Add icons for Image Processing, Cache, and Performance Limits sections
2026-03-07 10:44:38 +01:00
292c61566c feat: add image optimization and settings page
- Add persistent disk cache for processed images
- Optimize image processing with short-circuit and quality settings
- Add WebP lossy encoding with configurable quality
- Add settings API endpoints (GET/POST /settings, cache management)
- Add database table for app configuration
- Add /settings page in backoffice for image/cache/limits config
- Add cache stats and clear functionality
- Update navigation with settings link
2026-03-07 09:12:06 +01:00
9141edfaa9 fix: handle SSE controller errors gracefully
- Add isActive checks before writing to SSE controller
- Wrap controller operations in try/catch to prevent 'already closed' errors
- Fix race condition when client disconnects during SSE streaming
2026-03-06 22:40:57 +01:00
f0a967515b fix: improve series detection and add detailed indexing logs
- Fix series detection to handle path variations (symlinks, separators)
- Add comprehensive logging for job processing and file scanning
- Better error handling for path prefix stripping
- Track files scanned, indexed, and errors per library
2026-03-06 22:35:11 +01:00
d5d582db57 perf: optimize indexing speed with batching and incremental sync
- Batching BDD: group INSERT/UPDATE operations in batches of 100 using UNNEST
- Incremental MeiliSearch: only sync books modified since last sync
- Optimized fingerprint: use only size+mtime+filename (100x faster)
- Increased DB connections from 5 to 20
- Reduced progress update frequency (every 1s or 10 files)
- Add sync_metadata table to track last MeiliSearch sync
2026-03-06 22:09:37 +01:00
ee76090265 fix: natural sort regex to handle titles with letters after numbers
Replace REGEXP_REPLACE with REGEXP_MATCH to extract only digits
Fixes 'invalid input syntax for type integer' error when titles
contain letters after numbers like '20th century boys'
2026-03-06 21:59:19 +01:00
d86301919d refactor: hardcode ports in docker-compose.yml for server deployment
- Remove env variable substitution from docker-compose.yml ports
- Hardcode custom ports directly in compose file: 7080, 7081, 7082, 7700, 6432
- Remove PORT variables from .env.example (now configured in docker-compose.yml)
- Add documentation on how to change ports (edit docker-compose.yml directly)
- Simplifies server deployment - no need to export env variables before docker-compose up

Note: To change ports, edit infra/docker-compose.yml directly
2026-03-06 21:24:45 +01:00
47e53a19b9 fix: correct healthchecks and env variable handling for custom ports
- Fix healthchecks to use internal ports (8080, 8081, 8082, 7700) instead of external ports
- Remove variable expansion from healthcheck URLs (not supported in compose)
- Update .env.example to clarify internal vs external ports
- Ensure DATABASE_URL always uses internal PostgreSQL port (5432)
- Services now correctly start with custom external port mappings
2026-03-06 21:23:20 +01:00
d0a29196dd perf: add sccache to Docker builds for faster compilation
- Install sccache in builder stage of both api and indexer Dockerfiles
- Configure RUSTC_WRAPPER to use sccache
- Use Docker cache mount (--mount=type=cache,target=/sccache) to persist cache
- Reduces build time significantly on subsequent builds by caching compiled artifacts
- Requires Docker BuildKit (enabled by default in Docker 23.0+)

Note: First build will still be slow (installs sccache + populates cache)
Subsequent builds will be much faster as dependencies are cached
2026-03-06 21:04:40 +01:00
19ef4d592b refactor: simplify env configuration with single port definitions
- Update docker-compose.yml healthchecks to use env variables instead of hardcoded ports
- Restructure .env.example to define each port only once
- Auto-generate service URLs from port variables using ${PORT} syntax
- Document the configuration structure with clear sections
- Makes it easier to change ports without updating multiple variables
2026-03-06 21:00:59 +01:00
a31c524c32 feat: make all service ports configurable via env variables
- Add API_PORT, INDEXER_PORT, MEILI_PORT, POSTGRES_PORT env variables
- Update docker-compose.yml to use ${VAR:-default} syntax for all ports
- Document new port variables in .env.example
- Allows users to customize ports to avoid conflicts with other services
2026-03-06 20:55:23 +01:00
d3e2147982 feat: make libraries volume path configurable via env variable
- Add LIBRARIES_HOST_PATH env variable for Docker volume mount path
- Update docker-compose.yml to use ${LIBRARIES_HOST_PATH:-../libraries}
- Update .env.example with new variable and documentation
- Allows users to customize the host path for their libraries folder
2026-03-06 20:49:12 +01:00
4f6833b42b feat: add hierarchical folder browser for library creation
- Extend API /folders endpoint to support browsing subdirectories with path parameter
- Add depth and has_children fields to FolderItem
- Create FolderBrowser component with tree view navigation
- Create FolderPicker component with input, browse button and popup modal
- Add API proxy route for /api/folders
- Update LibraryForm to use new FolderPicker component
- Fix path handling to correctly resolve /libraries/ subdirectories
2026-03-06 18:03:09 +01:00
7cdc72b6e1 feat(backoffice): redesign UI with enhanced background and glassmorphism effects
- Add vibrant radial gradient backgrounds with multiple color zones
- Implement glassmorphism effects on header and cards
- Add subtle grain texture overlay
- Update card hover effects with smooth transitions
- Improve dark mode background visibility
2026-03-06 16:21:48 +01:00
2b30ae47de build: Docker compose build successful with all services
- Fixed Dockerfiles (removed admin-ui references)
- Updated Cargo.toml workspace
- Added @tailwindcss/postcss dependency
- All services building and running correctly
2026-03-06 15:18:03 +01:00
1dca1099cf fix(env): Sync .env.example with actual .env variables
- Added LIBRARIES_ROOT_PATH to .env.example (was commented out)
- Removed ADMIN_UI_LISTEN_ADDR (admin-ui no longer exists)
- Improved documentation for LIBRARIES_ROOT_PATH variable

Note: .env changes (removed ADMIN_UI_LISTEN_ADDR) are local only
due to .gitignore - users should update their .env manually.
2026-03-06 15:07:24 +01:00
ff34b2bbf4 chore: Remove admin-ui, improve .env.example, add comprehensive README
- Removed deprecated admin-ui Rust application
- Updated .env.example with better organization and comments
- Added comprehensive README.md with:
  - Architecture overview
  - Quick start guide
  - Development instructions
  - Feature documentation
  - Environment variable reference
  - API documentation link
2026-03-06 15:06:04 +01:00
a7fe565a1f fix(docker): Fix migrate service authentication
Add POSTGRES_PASSWORD environment variable to migrate service
so it can connect to postgres without interactive password prompt.
2026-03-06 15:04:03 +01:00
8a9a8634f8 fix(ui): Harmonize spacing in library sub-pages
- Removed space-y-6 container wrapper
- Added explicit mb-6 margins on breadcrumb, h1, Card, and h2 elements
- Consistent spacing approach across all library pages
2026-03-06 14:59:37 +01:00
5683fb8d25 fix(ui): Improve pagination spacing
- Increased top margin from mt-6 to mt-8
- Increased gaps between elements from gap-4 to gap-6
- Better spacing in page size selector
2026-03-06 14:52:45 +01:00
fa574586ed feat(ui): Add pagination to books pages and improve spacing
- Added CursorPagination component with page size selector (20/50/100)
- Updated /books page with pagination support
- Updated /libraries/[id]/books with pagination
- Improved layout margins (added pb-16 and responsive px)
- Series page uses improved layout spacing
2026-03-06 14:50:27 +01:00
c421f427b0 fix(ui): Progress bar height too small for label text
Changed from size=md (8px) to size=lg (32px) to properly display
the percentage label inside the progress bar.
2026-03-06 14:42:06 +01:00
5d7524f52e fix(indexer): Progress bar stuck at 95% max
- Fixed processed_count reset between libraries by using shared counter
- Set progress_percent to 100 when job completes successfully
- Progress now correctly tracks across all libraries in a job
2026-03-06 14:39:53 +01:00
762587dcb3 fix(indexer): Book deletion not working due to path mismatch
The existing HashMap stored local paths but seen HashMap stored
/libraries paths. This caused the deletion logic to never find
matching files. Now both use consistent local path format.
2026-03-06 14:28:57 +01:00
b6cd8a895d fix(indexer): File watcher not watching directories
The setup_watcher function was creating a watcher object but never
calling .watch() on the library directories. Now it properly watches
all directories recursively and detects file changes.
2026-03-06 14:23:17 +01:00
323661f770 fix(ui): LibraryActions checkbox values and error handling 2026-03-06 14:14:21 +01:00
d001e29bbc feat(ui): Components refactoring with Tailwind - UI kit, icons, lazy loading images
- Created reusable UI components (Card, Button, Badge, Form, Icon)
- Added PageIcon and NavIcon components with consistent styling
- Refactored all pages to use new UI components
- Added non-blocking image loading with skeleton for book covers
- Created LibraryActions dropdown for library settings
- Added emojis to buttons for better UX
- Fixed Client Component issues with getBookCoverUrl
2026-03-06 14:11:23 +01:00
05a18c3c77 feat(tailwind): Migration vers Tailwind CSS v4
- Installation de Tailwind CSS v4 avec @tailwindcss/postcss
- Configuration PostCSS avec le plugin Tailwind v4
- Mise à jour de globals.css avec syntaxe Tailwind v4 (@theme)
- Migration layout.tsx vers classes Tailwind
- Création du composant NavLink avec types stricts
- Configuration des couleurs personnalisées (background, foreground, card, line, primary)
- Support du dark mode via classes CSS
- Variables CSS migrées vers format HSL
- Suppression des anciens styles CSS custom

Le projet utilise maintenant Tailwind CSS v4 pour tout le styling
2026-03-06 12:28:45 +01:00
9134b0dac2 feat(ui): JobsIndicator moderne avec loader et popin détaillée
- Spinner animé visible quand jobs en cours (avec pulse)
- Badge avec compteur de jobs actifs
- Popin moderne au clic avec:
  - Header avec titre et lien View All
  - Barre de progression globale
  - Liste détaillée des jobs (status, type, %)
  - Fichier en cours de traitement
  - Mini-stats (indexed, errors)
  - Footer avec info auto-refresh
- CSS complet avec animations et dark mode
- Suppression JobsIndicatorWrapper obsolète
- Mise à jour layout.tsx pour nouvelle API
2026-03-06 12:22:56 +01:00
fd6f681ee3 feat(ui): Refonte UI page Libraries - design moderne en cards
- Remplacement du tableau moche par des cards modernes
- Layout responsive en grille (grid-template-columns)
- Cards avec hover effects (ombre + léger déplacement)
- Stats visibles en boxes cliquables (Books/Series)
- Monitoring compact avec checkboxes côte à côte
- Badges pour Disabled et Watcher ()
- Actions regroupées avec boutons colorés
- Formulaire d'ajout plus visible et stylisé
- CSS complet avec dark mode support
- MonitoringForm simplifié et compact
2026-03-06 12:18:26 +01:00
c2f1c7732e feat(ui): Lazy loading images + dark mode job highlight
- Ajout loading='lazy' sur les couvertures de livres (BookCard + detail)
- Correction couleur job-highlighted en dark mode (fond bleu foncé)
- Animation pulse adaptée pour le dark mode
2026-03-06 12:11:53 +01:00
c5b9883878 docs(plan): T22 marqué comme complet 2026-03-06 11:56:50 +01:00
e0b8563f1e feat(jobs): T22 complété - Page détail jobs avec timeline et stats
- Page /jobs/[id] avec affichage complet des détails
- Timeline visuelle (Created → Started → Finished)
- Barre de progression avec stats (processed/total/remaining)
- Stats: scanned, indexed, removed, errors
- Vitesse de traitement (fichiers/sec)
- Liste des erreurs avec fichier et message
- Navigation retour vers la liste
- Bouton 'View' sur chaque ligne de job
- Lien cliquable sur l'ID du job
- Styles CSS pour timeline, progress bar, statistiques

DoD: Page job détaillée avec timeline, stats et navigation complète
2026-03-06 11:56:26 +01:00
75f7de2e43 feat(watcher): Ajout watcher de fichiers temps réel
- Migration 0006: colonne watcher_enabled
- Crate notify pour surveillance FS temps réel (FSEvents/inotify)
- Watcher redémarré toutes les 30s si config change
- Détection instantanée création/modification/suppression
- Création job immédiate quand fichier détecté
- API: support watcher_enabled dans UpdateMonitoringRequest
- Backoffice: toggle Watcher avec indicateur 
- Fonctionne en parallèle du scheduler auto-scan

Usage: Activer Watcher + Auto-scan pour réactivité max
2026-03-06 11:49:53 +01:00
6e0a77fae0 feat(monitoring): T23 - Surveillance automatique des libraries
- Ajout scheduler dans l'indexer (vérifie toutes les minutes)
- Migration 0004: colonnes monitor_enabled, scan_mode, next_scan_at
- API: GET /libraries avec champs monitoring
- API: PATCH /libraries/:id/monitoring pour configuration
- Composant MonitoringForm (client) avec checkbox et select
- Badge Auto/Manual avec couleurs différentes
- Affichage temps restant avant prochain scan
- Proxy route /api/libraries/:id/monitoring

Le scheduler crée automatiquement des jobs quand next_scan_at <= NOW()
2026-03-06 11:42:41 +01:00
5f51955f4d feat(indexing): Lot 4 - Progression temps reel, Full Rebuild, Optimisations
- Ajout migrations DB: index_job_errors, library_monitoring, full_rebuild_type
- API: endpoints progression temps reel (/jobs/:id/stream), active jobs, details
- API: support full_rebuild avec suppression donnees existantes
- Indexer: logs detailles avec timing [SCAN][META][PARSER][BDD]
- Indexer: optimisation parsing PDF (lopdf -> pdfinfo) 235x plus rapide
- Indexer: corrections chemins LIBRARIES_ROOT_PATH pour dev local
- Backoffice: composants JobProgress, JobsIndicator (header), JobsList
- Backoffice: SSE streaming pour progression temps reel
- Backoffice: boutons Index/Index Full sur page libraries
- Backoffice: highlight job apres creation avec redirection
- Fix: parsing volume type i32, sync meilisearch cleanup

Perf: parsing PDF passe de 8.7s a 37ms
Perf: indexation 45 fichiers en ~15s vs plusieurs minutes avant
2026-03-06 11:33:32 +01:00
82294a1bee feat: change volume from string to integer type
Parser:
- Change volume type from Option<String> to Option<i32>
- Parse volume as integer to remove leading zeros
- Keep original title with volume info

Indexer:
- Update SQL queries to insert volume as integer
- Add volume column to INSERT and UPDATE statements

API:
- Change BookItem.volume and BookDetails.volume to Option<i32>
- Add natural sorting for books

Backoffice:
- Update volume type to number
- Update book detail page
- Add CSS styles
2026-03-05 23:32:01 +01:00
262c5c9f12 feat(db): add migration for volume column type change
- Create migration 0002_alter_volume_type.sql to change volume from TEXT to INTEGER
- Update docker-compose to run all migrations automatically using env variables
- Enables proper numeric sorting of volumes (1, 2, 3 instead of 01, 02, 03)
2026-03-05 23:31:21 +01:00
d33a4b02d8 feat: add series support for book organization
API:
- Add /libraries/{id}/series endpoint to list series with book counts
- Add series filter to /books endpoint
- Fix SeriesItem to return first_book_id properly (using CTE with ROW_NUMBER)

Indexer:
- Parse series from parent folder name relative to library root
- Store series in database when indexing books

Backoffice:
- Add Books page with grid view, search, and pagination
- Add Series page showing series with cover images
- Add Library books page filtered by series
- Add book detail page
- Add Series column in libraries list with clickable link
- Create BookCard component for reusable book display
- Add CSS styles for books grid, series grid, and book details
- Add proxy API route for book cover images (fixing CORS issues)

Parser:
- Add series field to ParsedMetadata
- Extract series from file path relative to library root

Books without a parent folder are categorized as 'unclassified' series.
2026-03-05 22:58:28 +01:00
3ad1d57db6 feat(api): improve Swagger/OpenAPI documentation
- Fix Uuid and DateTime schema references (convert to String types)
- Add Bearer authentication scheme with global authorize button
- Add detailed descriptions to all API routes
- Reorganize tags into logical categories (books, libraries, indexing, tokens)
- Add security requirements and response documentation
- Fix dead_code warning
2026-03-05 22:16:10 +01:00
40b7200bb3 add OpenAPI/Swagger documentation with utoipa 2026-03-05 21:46:29 +01:00
ef8a755a83 add book_count feature, migrate backoffice to server actions, fix healthcheck 2026-03-05 21:29:48 +01:00
3a96f6ba36 backoffice nextJs replaces admin in rust 2026-03-05 15:47:18 +01:00
20f9af6cba add page streaming, admin ui flows, and runtime hardening 2026-03-05 15:26:47 +01:00
6eaf2ba5dc add indexing jobs, parsers, and search APIs 2026-03-05 15:05:34 +01:00