Major architectural improvements: 1. Add generic /api/dashboard/sections JSON endpoint - Created internal/handlers/dashboard.go (new file) - Created internal/router/dashboard.go (new file) - Single source of truth for web UI, mobile apps, plugins - Follows existing handler/router pattern 2. Update DashboardService to apply user preferences - GetSectionItems() now accepts sectionOrder and hiddenSections - filterHiddenSections() removes user's hidden sections - reorderSections() applies user's custom order - Ensures consistent behavior across all clients 3. Separate concerns properly - API handlers in internal/handlers/dashboard.go - SSR routes remain in internal/router/frontend.go - Both use same DashboardService (single source of truth) 4. Reorganize implementation phases - Phase 1-3: Database, service, queries - Phase 4-6: Handler, router, frontend routes - Phase 7-9: Templates and settings - Phase 10-11: TypeScript modules - Phase 12-13: Documentation and testing 5. Add documentation - docs/developer/api/dashboard.md (API reference) - docs/user/dashboard.md (user guide) 6. Bruno tests already exist - bruno/dashboard/ has 5 comprehensive test files - Three-context testing (no user, user, admin) - No additional tests needed Benefits: - Uniform dashboard across web, mobile, plugins - Single source of truth (no duplicate logic) - User preferences respected by all clients - Follows established project patterns - Comprehensive test coverage Timeline: Updated to reflect 13 phases (19-25 days total with TypeScript)
1.4 KiB
1.4 KiB
Dashboard
The Bookhoard dashboard provides a Carousel-style horizontal carousel interface for browsing your book library.
Sections
Smart Sections
Smart sections are automatically generated based on your reading activity:
- Continue Reading: Books you're currently reading (progress between 0-100%)
- In Progress: Books you've started (progress > 0%)
- Recently Added: Newest items added to this library
- Recently Read: Books you've completed (100% progress)
- Not Started: Books you haven't read yet
User Collections
Any collection marked with "Show on Dashboard" will appear as a section on your dashboard.
To enable a collection:
- Go to Collections
- Edit a collection
- Toggle "Show on Dashboard"
- Save
Customizing Your Dashboard
- Click the ⚙️ (gear icon) in the top-right
- Drag sections to reorder them
- Toggle visibility with the switches
- Adjust items per section (10-50 items)
- Click "Save Changes"
Settings are saved per library.
Library Switching
Use the dropdown in the sticky header to switch between libraries. Each library has its own dashboard settings.
Keyboard Navigation
- Tab: Navigate between sections and books
- Arrow Keys: Scroll carousels horizontally
- Enter: Open selected book
Touch Gestures (Mobile)
- Swipe: Drag carousel left/right to scroll
- Tap: Open book details