diff --git a/README.md b/README.md index 0a53fe0..2392e8c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A self-hosted ebook management system built with Go, PostgreSQL, HTMX, and Tailw - **πŸŒ™ Multiple Themes**: 11 beautiful themes including Tokyo Night, Dracula, Nord, Solarized Dark, Monokai, One Dark Pro, Material Dark, and Catppuccin variants (Mocha, Macchiato, FrappΓ©, Latte) with user preferences saved to database - **🎨 Theme Persistence**: User theme choices sync between browser and server - **πŸ“– Reading Progress**: User-specific reading progress tracking -- **⭐ Interactive Rating System**: 5-star rating system with interactive dashboard controls and zero-rating fallback +- **⭐ Advanced Rating System**: 5-star rating with half-star precision, dialog-based input, and zero-rating fallback - **πŸ“ Multiple Folder Support**: Configure multiple ebook folders per user for comprehensive library management - **πŸ” Enhanced Scanner**: Intelligent ebook discovery with Calibre folder structure support and comprehensive metadata extraction - **πŸ‘€ Real-Time Monitoring**: File system monitoring for automatic ebook detection and updates @@ -162,8 +162,8 @@ The application uses Go HTML templates for server-side rendering with HTMX for d ### Ratings (Protected) - `GET /api/ebooks/:id/rating` - Get user's rating for ebook (returns 0 when no rating exists) -- `POST /api/ebooks/:id/rating` - Create or update ebook rating (1-5 stars) -- `PUT /api/ebooks/:id/rating` - Create or update ebook rating (1-5 stars) +- `POST /api/ebooks/:id/rating` - Create or update ebook rating (1-10 scale for half-star precision) +- `PUT /api/ebooks/:id/rating` - Create or update ebook rating (1-10 scale for half-star precision) - `DELETE /api/ebooks/:id/rating` - Delete user's rating - `GET /api/ebooks/:id/ratings` - Get all ratings for ebook @@ -177,23 +177,29 @@ The application uses Go HTML templates for server-side rendering with HTMX for d Bookmann features a fully interactive 5-star rating system integrated directly into the dashboard: ### Rating Scale -- **1-5 stars**: Standard rating scale for ebooks +- **Backend**: 1-10 scale where odd numbers represent half-stars + - 1,3,5,7,9 = 0.5,1.5,2.5,3.5,4.5 stars (half-star precision) + - 2,4,6,8,10 = 1,2,3,4,5 stars (full stars) +- **Frontend**: 1-5 star display with half-star precision - **0 stars**: Automatically shown when no rating exists - **User-specific**: Each user has their own ratings per ebook ### Dashboard Integration -- **Visual Rating Display**: Interactive star widgets for each ebook -- **Click-to-Rate**: Simply click on stars to set/update ratings +- **Visual Rating Display**: 5-star widgets with half-star precision +- **Dialog-based Rating**: Click stars to open rating dialog with 0.5 increments +- **Half-star Precision**: Support for ratings like 3.5, 4.0, 4.5 stars - **Real-time Updates**: Rating changes reflect immediately without page reload - **Graceful Fallback**: Shows empty stars (β˜†) for unrated books ### API Behavior - **GET /api/ebooks/:id/rating**: Returns rating 0 (HTTP 200) when no rating exists -- **POST/PUT /api/ebooks/:id/rating**: Create or update ratings (1-5) +- **POST/PUT /api/ebooks/:id/rating**: Create or update ratings (1-10 for half-star precision) - **DELETE /api/ebooks/:id/rating**: Remove user's rating - **pgx v5 Standards**: All database operations use modern pgx error handling ### Frontend Features +- **Dialog Input**: Click stars to rate with precise 0.5 increment control +- **Visual Half-stars**: Different symbols (⭐) for half-star display - **HTMX Integration**: Smooth interactions without full page refreshes - **Responsive Design**: Mobile-friendly rating controls - **Theme Support**: Rating stars adapt to user's selected theme @@ -339,7 +345,7 @@ Use the included Bruno collection in the `bruno/` directory for testing the API: - **Multiple Folder Support**: Users can configure multiple ebook directories with per-user folder management - **Real-Time Monitoring**: File system watching for automatic ebook updates with dynamic subfolder detection - **Scan Settings**: User-configurable scan frequency and auto-scan options -- **Interactive Rating System**: 5-star dashboard controls with click-to-rate functionality, zero-rating fallback, and full CRUD operations +- **Advanced Rating System**: 5-star display with half-star precision, dialog-based rating input, 10-point backend scale, and full CRUD operations ### Frontend Redesign - **Beautiful Homepage**: Hero section with features showcase and modern design