-
-
Notifications
You must be signed in to change notification settings - Fork 11
feat: personal library over XRPC with atproto service auth #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
00a2ffb
feat: personal library over XRPC with atproto service auth
nperez0111 f5ae4f3
fix: apply review findings, rasterize SVG covers, correct AGENTS.md
nperez0111 9f0f355
refactor: drop the service-auth account gate
nperez0111 516eef3
fix: address review findings in cover raster, sync race, upload rename
nperez0111 a98527f
fix: always sync hiveId to persisted value on lost link race
nperez0111 1c4f11b
refactor: simplify service-auth config
nperez0111 7509855
perf: parse ebooks in a single-shot worker off the event loop
nperez0111 dc84b5e
feat(app): personal-library storage quota UI
nperez0111 d5d38ee
Merge remote-tracking branch 'origin/main' into feat/kosync-filename-…
nperez0111 125ff30
chore: move Portainer webhook URL to GitHub secret
nperez0111 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "buzz.bookhive.getPersonalBookCover", | ||
| "defs": { | ||
| "main": { | ||
| "type": "query", | ||
| "description": "Cover image for a book in the authenticated user's personal library. Serves the cover extracted from the uploaded file when there is one; otherwise, if the book is linked to a BookHive catalog entry, responds 302 to the public image proxy for that entry. The XRPC equivalent of GET /opds/books/{hash}/cover.", | ||
| "parameters": { | ||
| "type": "params", | ||
| "required": ["contentHash"], | ||
| "properties": { | ||
| "contentHash": { | ||
| "type": "string", | ||
| "description": "Content hash identifying the book" | ||
| }, | ||
| "width": { | ||
| "type": "integer", | ||
| "description": "Requested width in pixels for the catalog-cover redirect. Ignored for locally stored covers, which are served at the size they were extracted at.", | ||
| "minimum": 32, | ||
| "maximum": 1024, | ||
| "default": 300 | ||
| } | ||
| } | ||
| }, | ||
| "output": { | ||
| "encoding": "image/jpeg,image/png,image/gif,image/webp" | ||
| }, | ||
| "errors": [ | ||
| { | ||
| "name": "NotFound", | ||
| "description": "No such book, or the book has neither a stored cover nor a linked catalog entry" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "buzz.bookhive.getPersonalBookFile", | ||
| "defs": { | ||
| "main": { | ||
| "type": "query", | ||
| "description": "Download the raw ebook file for a book in the authenticated user's personal library. Responds with the stored bytes, a strong ETag equal to the content hash, and a `Content-Disposition: attachment` filename. Honours `If-None-Match` with a 304, so an e-reader syncing on a schedule does not re-download every book. The XRPC equivalent of GET /opds/books/{hash}/download.", | ||
| "parameters": { | ||
| "type": "params", | ||
| "required": ["contentHash"], | ||
| "properties": { | ||
| "contentHash": { | ||
| "type": "string", | ||
| "description": "Content hash identifying the book, as returned by getPersonalLibrary" | ||
| } | ||
| } | ||
| }, | ||
| "output": { | ||
| "encoding": "application/epub+zip,application/x-mobipocket-ebook,application/x-fictionbook+xml,application/vnd.comicbook+zip,application/octet-stream" | ||
| }, | ||
| "errors": [ | ||
| { | ||
| "name": "NotFound", | ||
| "description": "No such book in the caller's library, or its file is missing from disk" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "buzz.bookhive.listPersonalShelves", | ||
| "defs": { | ||
| "main": { | ||
| "type": "query", | ||
| "description": "List the authenticated user's personal shelves with per-shelf book counts, plus library-wide totals and storage usage. This is the root call for a catalog client: it carries everything the OPDS root navigation feed renders, in one request. Unpaginated — `personal_shelf` is unique on (userDid, name) and these lists are small.", | ||
| "output": { | ||
| "encoding": "application/json", | ||
| "schema": { | ||
| "type": "object", | ||
| "required": ["shelves", "totalBooks"], | ||
| "properties": { | ||
| "shelves": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "ref", | ||
| "ref": "buzz.bookhive.createPersonalShelf#personalShelfView" | ||
| } | ||
| }, | ||
| "totalBooks": { | ||
| "type": "integer", | ||
| "description": "Books in the library across all shelves and unshelved", | ||
| "minimum": 0 | ||
| }, | ||
| "storage": { | ||
| "type": "ref", | ||
| "ref": "buzz.bookhive.getPersonalLibrary#storageView", | ||
| "description": "This user's storage usage against their quota" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.