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:
BIN
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 413 KiB |
@@ -0,0 +1,25 @@
|
||||
<?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">1274</dc:identifier>
|
||||
<dc:identifier opf:scheme="uuid" id="uuid_id">76669967-9916-42e1-9bff-f22253833b59</dc:identifier>
|
||||
<dc:title>Beowulf: An Anglo-Saxon Epic Poem</dc:title>
|
||||
<dc:creator opf:file-as="Unknown" opf:role="aut">Unknown</dc:creator>
|
||||
<dc:contributor opf:file-as="calibre" opf:role="bkp">calibre (8.16.2) [https://calibre-ebook.com]</dc:contributor>
|
||||
<dc:date>1904-01-15T05:00:00+00:00</dc:date>
|
||||
<dc:description><div>
|
||||
<p>The epic poem Beowulf is the tale of the life and great deeds of Beowulf, hero of the Geats. The first half of the poem focuses on Beowulf's aid to Hrothgar, king of the Danes, who has been terrorized by the creature Grendel. In the second half of the poem, after his heroic youth, an older Beowulf is serving as king of the Geats when his realm is attacked by an immense dragon, prompting Beowulf to once again take up arms. Set in ancient Scandinavia, the legend of Beowulf is one of the earliest surviving examples of Anglo-Saxon literature. Originally recorded in Old English around the tenth or eleventh century, this edition is a translation into more modern language by John Lesslie Hall.</p></div></dc:description>
|
||||
<dc:publisher>Heath</dc:publisher>
|
||||
<dc:identifier opf:scheme="GOOGLE">YAZEAAAAYAAJ</dc:identifier>
|
||||
<dc:language>eng</dc:language>
|
||||
<dc:subject>Epic poetry</dc:subject>
|
||||
<dc:subject>English (Old)</dc:subject>
|
||||
<dc:subject>Monsters -- Poetry</dc:subject>
|
||||
<dc:subject>Dragons -- Poetry</dc:subject>
|
||||
<meta name="calibre:timestamp" content="2026-01-26T18:33:42+00:00"/>
|
||||
<meta name="calibre:title_sort" content="Beowulf: An Anglo-Saxon Epic Poem"/>
|
||||
</metadata>
|
||||
<guide>
|
||||
<reference type="cover" title="Cover" href="cover.jpg"/>
|
||||
</guide>
|
||||
</package>
|
||||
Reference in New Issue
Block a user