docs: restructure documentation into audience-based portals
BREAKING CHANGE: Documentation URLs have changed New structure: - user/ - End-user documentation (device setup, sync guides, frontend) - developer/ - Developer documentation (API reference, protocols, specs) - operations/ - Operations documentation (deployment, troubleshooting) - contributing/ - Contribution guides Changes: - Created portal INDEX.md files for each audience section - Moved device guides to user/devices/ (kobo-setup.md, koreader-setup.md) - Moved API docs to developer/ (api-reference.md, collections-api.md) - Moved sync guide to user/sync-guide.md - Moved troubleshooting to operations/troubleshooting.md - Moved all split API docs to developer/api/ - Renamed protocol files (kobo-protocol.md, koreader-protocol.md) - Added placeholder user guides (frontend, user-areas, settings, admin) - Updated all internal links to new paths - Updated Go code (http_handler.go, navigation.go) for new paths - Updated main INDEX.md for audience-based navigation Benefits: - Clear separation of user and developer documentation - Scalable structure for future user guide expansion - Better organization and discoverability - Audience-specific landing pages Related to DOCS_IMPLEMENTATION_PLAN.md Phase 2 completion
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
# OPDS Acquisition
|
||||
|
||||
Download books and list available formats.
|
||||
|
||||
## Download Book with Format Conversion
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/download/{bookId}`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Query Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|-----------|-------------|
|
||||
| format | string | No | Book format: `epub` (default), `kepub` |
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/download/uuid-123?format=kepub
|
||||
```
|
||||
|
||||
### Response (200 OK)
|
||||
|
||||
**Headers:**
|
||||
- `Content-Type`: `application/epub+zip` or `application/vnd.kobo+xml+zip`
|
||||
- `Content-Disposition`: attachment; filename="The Hobbit.epub"
|
||||
- `X-Bookhoard-UUID`: uuid-123
|
||||
- `X-Bookhoard-SHA256`: abc123... (original hash)
|
||||
- `X-Bookhoard-KEPUB-SHA256`: xyz789... (KEPUB hash if format=kepub)
|
||||
|
||||
**Body:** Book file binary data
|
||||
|
||||
## List Available Formats
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/formats/{bookId}`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/formats/uuid-123
|
||||
```
|
||||
|
||||
### Response (200 OK)
|
||||
|
||||
```json
|
||||
{
|
||||
"media_item_id": "uuid-123",
|
||||
"formats": [
|
||||
{
|
||||
"format_type": "epub",
|
||||
"file_path": "/path/to/book.epub",
|
||||
"file_sha256": "abc123...",
|
||||
"file_size_bytes": 2456789,
|
||||
"mime_type": "application/epub+zip",
|
||||
"available": true
|
||||
},
|
||||
{
|
||||
"format_type": "kepub",
|
||||
"file_path": "/cache/book.kepub.epub",
|
||||
"file_sha256": "xyz789...",
|
||||
"file_size_bytes": 2478932,
|
||||
"mime_type": "application/vnd.kobo+xml+zip",
|
||||
"available": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
@@ -0,0 +1,81 @@
|
||||
# OPDS Feeds
|
||||
|
||||
Bookhoard provides OPDS 1.2 feeds for device compatibility.
|
||||
|
||||
## Get Device Catalog
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/catalog`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Query Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|-----------|-------------|
|
||||
| page | integer | No | Page number (default: 1) |
|
||||
| per_page | integer | No | Items per page (default: 50, max: 200) |
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/catalog?page=1&per_page=50
|
||||
```
|
||||
|
||||
### Response (200 OK - OPDS 1.2 XML)
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:opds="http://opds-spec.org/2010/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<id>urn:uuid:device-id</id>
|
||||
<title>Bookhoard Library</title>
|
||||
<updated>2026-02-01T12:00:00Z</updated>
|
||||
|
||||
<link rel="self" href="http://localhost:8765/opds/devices/kobo-id/catalog"/>
|
||||
<link rel="search" href="http://localhost:8765/opds/devices/kobo-id/search"/>
|
||||
<link rel="start" href="http://localhost:8765/opds/devices/kobo-id/nav"/>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:bookhoard-uuid-123</id>
|
||||
<dc:title>The Hobbit</dc:title>
|
||||
<dc:creator>J.R.R. Tolkien</dc:creator>
|
||||
<updated>2026-02-01T10:00:00Z</updated>
|
||||
|
||||
<link href="http://localhost:8765/opds/devices/kobo-id/download/uuid-123"
|
||||
type="application/epub+zip"
|
||||
rel="http://opds-spec.org/acquisition/open-access"/>
|
||||
|
||||
<link href="http://localhost:8765/opds/devices/kobo-id/download/uuid-123?format=kepub"
|
||||
type="application/vnd.kobo+xml+zip"
|
||||
rel="alternate"/>
|
||||
|
||||
<dc:identifier id="bookhoard">uuid-123</dc:identifier>
|
||||
<meta property="bookhoard:sha256">abc123...</meta>
|
||||
</entry>
|
||||
</feed>
|
||||
```
|
||||
|
||||
## Search OPDS Catalog
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/search`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Query Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|-----------|-------------|
|
||||
| q | string | Yes | Search query |
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/search?q=Hobbit
|
||||
```
|
||||
|
||||
### Response (200 OK - OPDS 1.2 XML with search results)
|
||||
|
||||
Returns OPDS feed with matching books.
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
@@ -0,0 +1,56 @@
|
||||
# OPDS Publication
|
||||
|
||||
OPDS navigation and publication feeds.
|
||||
|
||||
## Navigation Feed
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/nav`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/nav
|
||||
```
|
||||
|
||||
### Response (200 OK - OPDS 1.2 Navigation XML)
|
||||
|
||||
Returns OPDS navigation feed with links to:
|
||||
- Root catalog
|
||||
- Search
|
||||
- Collections/shelves
|
||||
- Filtered views (by author, series, etc.)
|
||||
|
||||
## Publication Feeds by Collection
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/collections/{collectionId}`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/collections/collection-uuid
|
||||
```
|
||||
|
||||
### Response (200 OK - OPDS 1.2 XML)
|
||||
|
||||
Returns OPDS feed with books in the specified collection.
|
||||
|
||||
## Publication Feeds by Shelf
|
||||
|
||||
**Endpoint**: `GET /opds/devices/{deviceId}/shelves/{shelfName}`
|
||||
**Auth**: Device token required
|
||||
|
||||
### Example Request
|
||||
|
||||
```http
|
||||
GET /opds/devices/kobo-id/shelves/Favorites
|
||||
```
|
||||
|
||||
### Response (200 OK - OPDS 1.2 XML)
|
||||
|
||||
Returns OPDS feed with books on the specified device shelf.
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
Reference in New Issue
Block a user