- Add admin dashboard at /admin route consolidating all user settings - Move user preferences (username, email, password, theme) from separate page - Add ebook library preferences section with folder management - Add scan settings (frequency and auto-scan toggle) with database persistence - Create database migration for scan_frequency_minutes and auto_scan_enabled columns - Add API endpoints for scan settings management: - PUT /api/library/scan-settings - Update scan preferences - GET /api/library/scan-settings - Get current scan settings - Update dashboard navigation to link to admin dashboard - Remove old preferences.html template (functionality moved to admin) - Create Bruno API testing files for library endpoints - Add real-time folder loading and management in admin interface - Implement scan settings persistence and retrieval from database
Bruno API Tests for Bookmann
This directory contains Bruno collection for testing the Bookmann API with comprehensive REST documentation.
Setup
- Install Bruno: https://www.usebruno.com/
- Open Bruno and import this collection folder
- Select the "localhost" environment
- Start the application with
docker-compose up --build - Register/Login first, then use Bearer token for protected endpoints
Available Tests
Auth (Public Endpoints)
- Register User: POST /api/auth/register - Create new account
- Login User: POST /api/auth/login - Authenticate (email or username)
- Get Profile: GET /api/auth/profile - Get user info (requires token)
Ebooks (Protected - JWT Required)
- List Ebooks: GET /api/ebooks - Paginated ebook list
- Get Ebook: GET /api/ebooks/:id - Single ebook details
- Create Ebook: POST /api/ebooks - Add new ebook
- Update Ebook: PUT /api/ebooks/:id - Modify ebook metadata
- Delete Ebook: DELETE /api/ebooks/:id - Remove ebook
Reading Progress (Protected - JWT Required)
- Get Reading Progress: GET /api/ebooks/:id/progress - User's progress
- Update Reading Progress: PUT /api/ebooks/:id/progress - Update progress
Ratings (Protected - JWT Required)
- Get Ebook Rating: GET /api/ebooks/:id/rating - User's rating for ebook
- Create/Update Rating: POST /api/ebooks/:id/rating - Rate ebook (1-5 stars)
- Delete Rating: DELETE /api/ebooks/:id/rating - Remove user's rating
- Get All Ratings: GET /api/ebooks/:id/ratings - All ratings for ebook
Documentation Features
Each request includes:
- Detailed descriptions of functionality
- Parameter specifications (required/optional, types)
- Request/Response examples
- Error response codes and meanings
- Authentication requirements
Notes
- Authentication Flow: Register → Login → Use Bearer token for all other requests
- JWT Tokens: Valid for 24 hours, include in
Authorization: Bearer <token>header - User Isolation: Progress and data are user-specific
- Variables: Update
ebook_idfor testing specific ebooks - Security: Passwords hashed with bcrypt, unique email/username constraints
- JSON: All requests/responses use JSON format