feat: add highlights and notes annotation system
This major update implements a complete user annotation system: ## 🎯 New Features - User notes with position tracking for media items - Text highlighting with customizable colors - Highlight-note associations for detailed annotations - Full CRUD API for both notes and highlights - Backward compatibility with existing ebook endpoints ## 📊 Database Changes - Add media_notes table (id, media_item_id, user_id, content, position, timestamps) - Add media_highlights table (id, media_item_id, user_id, selection_text, start/end_position, color, optional note_id) - Add foreign key relationships with CASCADE deletes - Add proper indexes for performance - Add database schema views for ebook backward compatibility ## 🔧 API Implementation - Complete REST API endpoints for notes and highlights - JWT authentication with proper middleware bypass - Request validation with meaningful error responses - UUID validation and type safety - Support for hex color codes in highlights ## 🧪 Testing & Documentation - Comprehensive test suite covering authentication scenarios - Bruno API collection for manual testing - Detailed testing guide with troubleshooting - Updated documentation in README and TESTING.md ## 📁 Backward Compatibility - Existing ebook endpoints continue working - Database views maintain API contracts - No breaking changes for existing integrations The annotation system is now fully functional and ready for production use.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="uuid_id" version="2.0">
|
||||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
|
||||
<dc:identifier opf:scheme="calibre" id="calibre_id">1275</dc:identifier>
|
||||
<dc:identifier opf:scheme="uuid" id="uuid_id">e7f17690-3254-4eca-a9b7-c82059938b9c</dc:identifier>
|
||||
<dc:title>Moby Dick; Or, The Whale</dc:title>
|
||||
<dc:creator opf:file-as="Melville, Herman" opf:role="aut">Herman Melville</dc:creator>
|
||||
<dc:contributor opf:file-as="calibre" opf:role="bkp">calibre (8.16.2) [https://calibre-ebook.com]</dc:contributor>
|
||||
<dc:date>2001-07-02T00:00:00+00:00</dc:date>
|
||||
<dc:language>eng</dc:language>
|
||||
<dc:subject>Whaling -- Fiction</dc:subject>
|
||||
<dc:subject>Sea stories</dc:subject>
|
||||
<dc:subject>Psychological fiction</dc:subject>
|
||||
<dc:subject>Ship captains -- Fiction</dc:subject>
|
||||
<dc:subject>Adventure stories</dc:subject>
|
||||
<dc:subject>Mentally ill -- Fiction</dc:subject>
|
||||
<dc:subject>Ahab</dc:subject>
|
||||
<dc:subject>Captain (Fictitious character) -- Fiction</dc:subject>
|
||||
<dc:subject>Whales -- Fiction</dc:subject>
|
||||
<dc:subject>Whaling ships -- Fiction</dc:subject>
|
||||
<meta name="calibre:timestamp" content="2026-01-26T18:33:42.875464+00:00"/>
|
||||
<meta name="calibre:title_sort" content="Moby Dick; Or, The Whale"/>
|
||||
</metadata>
|
||||
<guide>
|
||||
<reference type="cover" title="Cover" href="cover.jpg"/>
|
||||
</guide>
|
||||
</package>
|
||||
Reference in New Issue
Block a user