Commit Graph
31 Commits
Author SHA1 Message Date
john-okeefe 81fa177fe6 feat: create Bruno requests for library system API
- Add library management requests (CRUD operations)
- Create media items API requests for library content
- Implement library visibility controls
- Add user library access management
- Update deprecated ebook folder endpoints with migration guide
- Include comprehensive documentation and test cases
- Replace collection.bru with proper dashboard request

Complete Bruno collection supporting new multi-library architecture
2026-01-28 11:15:36 -05:00
john-okeefe ffbf9d8717 fixed formatting so it would show in bruno 2026-01-27 20:43:19 -05:00
john-okeefe 49ee68e905 chore: Clean up and reorganize Bruno collection after rebuild
- Remove duplicate Get Admin Dashboard.bru (same as /admin route)
- Reorder sequence numbers for logical grouping
- Add missing body: none to GET requests
- Standardize folder path examples to /app/uploads
- Fix file formatting and add missing newlines
2026-01-27 16:50:49 -05:00
john-okeefe ad64c044a7 fix: Remove hardcoded example from Scan Ebooks Bruno request
- Remove hardcoded folder_paths example from request body
- Allow flexible folder path configuration per request
- Improve request flexibility for different scan scenarios
2026-01-27 16:25:01 -05:00
john-okeefe 23ead6cf0c feat: Add admin ebook CRUD operations to Bruno collection
- Add POST /api/ebooks for creating new ebook entries
- Add PUT /api/ebooks/:id for updating existing ebook metadata
- Add DELETE /api/ebooks/:id for deleting ebooks from database
- Include complete request/response examples with all metadata fields
- Support file path, metadata, and publication information updates
2026-01-27 16:23:50 -05:00
john-okeefe 4a71376ed5 feat: Add admin ebook folder management routes to Bruno collection
- Add POST /api/auth/ebook-folders for adding ebook folders
- Add GET /api/auth/ebook-folders for retrieving configured folders
- Add DELETE /api/auth/ebook-folders for removing ebook folders
- Include comprehensive documentation and request examples
- Support path normalization and admin-only access
2026-01-27 16:23:42 -05:00
john-okeefe 7116af9a77 feat: Implement precise user registration restrictions
- Implement numbered requirements for user account creation:
  1. No users exist: First user becomes admin
  2. Admins exist: Anyone can register as regular user
  3. Admin logged in: Can create admins and regular users
  4. User logged in: Cannot create any accounts

- Update registration logic in auth.go to validate roles based on existing admin accounts and authentication status
- Add comprehensive error handling for unauthorized user creation attempts
- Ensure security while maintaining usability for regular users

BREAKING CHANGES:
- User accounts creation now restricted based on authentication state
- Regular users cannot create accounts when logged in
- Admin privileges enforced for user management operations
2026-01-27 15:57:52 -05:00
john-okeefe 481adaa71e feat: Implement role-based registration restrictions and reorganize Bruno collection
- Add role-based restrictions to POST /api/auth/register endpoint
- Only admins can create admin accounts if any admin already exists
- First user automatically gets admin role regardless of request
- Regular users can only create user accounts, not admin accounts
- Unauthenticated users can only create first admin, not subsequent admins
- Reorganize Bruno collection into logical subfolders (auth/, admin/, profile/)
- Update documentation to reflect new registration restrictions and security rules

BREAKING CHANGES:
- /api/auth/register now enforces role-based creation restrictions
- Bruno collection reorganized with subfolder structure
2026-01-27 14:15:06 -05:00
john-okeefe 71584c1b55 feat: Enhance admin user management system
- Add admin override capability to DELETE /api/auth/account endpoint
- Move /api/auth/users to admin-only with complete user fields (first_name, last_name, role, theme)
- Consolidate Bruno requests: remove duplicate List Users (Admin), merge Delete Account functionality
- Update all documentation to reflect enhanced capabilities
- Implement pgx 5 standards compliance with proper error handling

BREAKING CHANGES:
- /api/auth/users endpoint now requires admin role (was previously accessible)
- DELETE /api/auth/account accepts optional user_id parameter for admin deletion
2026-01-27 13:36:11 -05:00
john-okeefe 9262a35f68 feat: Restore manual scanner requests for testing
- Recreate Scan Ebooks request with optional folder_paths parameter
- Recreate Start Scanner request for real-time monitoring
- Recreate Stop Scanner request for monitoring control
- All scanner requests remain admin-only as intended
- Essential for testing ebook discovery and scanning functionality
2026-01-26 21:21:43 -05:00
john-okeefe f2994f9147 refactor: Reorganize Bruno requests by role permissions
- Create separate admin folder for admin-only operations
- Move admin endpoints (Create/Update/Delete Ebook, Scanner, Folder Management) to /bruno/admin/
- Add admin dashboard, profile, and library page requests
- Add Register Admin User request with explicit admin role
- Update Register User request to include role field
- Remove empty scanner folder structure

API organization:
- Admin requests: /bruno/admin/ (require admin role)
- User requests: /bruno/user/ (available to all authenticated users)
- Environment: Single {{token}} variable works for both roles
2026-01-26 21:19:19 -05:00
john-okeefe 48b6796bcd docs: Update documentation for role-based access control
- Update README.md with admin system documentation
- Add admin setup instructions and role permissions
- Update API endpoint documentation with access requirements
- Update Bruno collection to reflect admin-only operations
- Document shared library concept and security model
- Add comprehensive admin setup guide
2026-01-26 16:56:35 -05:00
john-okeefe 012242dcad test: Update API collection for rating system changes
- Update rating examples to use 1-10 scale
- Document half-star precision in API collections
- Add rating conversion examples for testing
- Update Get Ebook Rating docs with scale explanation
- Update Create/Update Rating with new validation rules
2026-01-26 13:49:25 -05:00
john-okeefe baa46a8a63 Update documentation to reflect interactive rating system and API changes
- Update README.md with interactive rating system details
- Document zero-rating behavior in GET /api/ebooks/:id/rating
- Add comprehensive rating system documentation section
- Update Bruno collection files to reflect new API behavior
- Enhance API testing documentation with rating 0 fallback
2026-01-26 11:54:53 -05:00
john-okeefe 64afdf6803 Clean up Bruno scanner documentation formatting
- Remove example request body template
- Improve documentation spacing and formatting
- Clarify API endpoint usage and response structure
2026-01-26 11:29:40 -05:00
john-okeefe 068d686fa1 added a fake ebook id to test for errors 2026-01-26 11:02:00 -05:00
john-okeefe 08e80ae84b refactor: reorganize project structure and update configurations
- Move migrations/ to database/schema/ for clarity on database schema definitions
- Move sqlc.yaml to internal/database/ to group with database code
- Move static/ to cmd/server/static/ to co-locate with server
- Update all configuration files and documentation
- Follow Go project conventions for better organization
2026-01-24 23:40:31 -05:00
john-okeefe 7c70e9e85a Update Bruno API tests for user endpoints including new profile management 2026-01-23 21:27:13 -05:00
john-okeefe 11621462f2 feat: create admin dashboard with user preferences and library settings
- 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
2026-01-23 09:38:40 -05:00
john-okeefe 2dba1d6eb9 feat: add user preferences dashboard
- Add /preferences route and preferences.html template for user settings
- Implement username, email, password, and theme update functionality
- Add account deletion feature with confirmation
- Add navigation link to preferences from dashboard
- Create API endpoints:
  - PUT /api/user/username - Update username
  - PUT /api/user/email - Update email address
  - PUT /api/user/password - Change password with verification
  - DELETE /api/user/account - Delete user account
- Add database queries for user updates and account deletion
- Create Bruno API testing files for all user preference endpoints
- Add proper validation, error handling, and security checks
2026-01-23 09:30:15 -05:00
john-okeefe c29183a14f fix: minor formatting fix in Bruno ebook rating file
- Remove extra space in 'body: json' declaration
- Ensure file ends with proper newline
2026-01-23 09:22:34 -05:00
john-okeefe b9edb92af2 refactor: rename bruno/auth folder to bruno/user
The auth folder now contains user management endpoints beyond just authentication:
- User registration/login (auth)
- Profile management (user)
- Theme settings (user preferences)
- Ebook folder management (user settings)

Renaming to 'user' better reflects the expanded scope covering user accounts, preferences, and settings management.
2026-01-23 09:11:42 -05:00
john-okeefe 6c33ee4364 feat: add Bruno API testing files for multiple folder functionality
- Add auth/Add Ebook Folder.bru - test adding folders to user account
- Add auth/Get Ebook Folders.bru - test listing user's folders
- Add auth/Delete Ebook Folder.bru - test removing folders
- Add scanner/Scan Ebooks.bru - test manual scanning of multiple folders
- Add scanner/Start Scanner.bru - test starting folder monitoring
- Add scanner/Stop Scanner.bru - test stopping folder monitoring
- Update all scanner endpoints to use folder_paths array format
2026-01-23 09:03:15 -05:00
john-okeefe e5ca12117c added ratings and updated ebook struct 2026-01-22 20:54:39 -05:00
john-okeefe e32fda6b65 Add user theme support and migrate frontend to HTMX templates
- Add theme column to users table with default 'tokyo-night'
- Update all user queries to include theme field
- Add ListUsers and UpdateUserTheme database queries
- Update auth handlers to support HTMX form submissions and JSON API
- Add ListUsers API endpoint
- Replace embedded static files with Go templates
- Update Dockerfile to copy templates directory
- Redesign index.html with inline styles and HTMX forms
- Update Bruno API testing requests for auth endpoints
2026-01-22 18:38:06 -05:00
john-okeefe 1239f6033c Add Catppuccin themes: Mocha, Macchiato, Frappé, Latte variants 2026-01-22 17:05:17 -05:00
john-okeefe e34906a187 Update Bruno requests: add Update Theme endpoint and include theme in responses 2026-01-22 17:04:07 -05:00
john-okeefe d98a0675e1 Complete project cleanup: remove unneeded files, organize static assets, update .gitignore 2026-01-22 14:08:57 -05:00
john-okeefe 4345b7bcdd First Commit. AI Generated App. 2026-01-21 21:17:22 -05:00
john-okeefe ea70d85f9d docs: Update remaining application name references from 'ebook reader' to 'Bookmann'
- Updated COMPLETE_DOCUMENTATION.md feature descriptions
- Updated user journey reference from 'ebook library' to 'ebook collection'
- Updated all frontend page titles and headers
- Updated Bruno API collection and workspace names
- All references now consistently use 'Bookmann' as the application name
2026-01-21 20:03:30 -05:00
john-okeefe 55c42f1f99 feat: Add comprehensive backend validation, toast notifications, and Tokyo Night theme
- Backend: Add server-side validation with go-playground/validator/v10
- Frontend: Add toast notifications for API errors with @zerodevx/svelte-toast
- UI: Complete Tokyo Night theme redesign with modern animations
- Docs: Update COMPLETE_DOCUMENTATION.md and README.md with all enhancements
- Validation: Email format, password strength, and input sanitization
- UX: Real-time error feedback, loading states, and responsive design
2026-01-21 20:01:18 -05:00