Update documentation and API tests: Bookmann → Bookhoard

Documentation updates:
- All docs/ files: Update project references
- Bruno API collection: Update collection name and tests
- Device setup guides: Update all examples
- Implementation plan: Update database schema examples
- README files: Update project references

Part of project rename to Bookhoard.
This commit is contained in:
2026-02-01 16:20:56 -05:00
parent 547bc6f8f8
commit ff96ffa92d
19 changed files with 103 additions and 103 deletions
+4 -4
View File
@@ -657,7 +657,7 @@ Content-Type: application/json
{
"device_id": "uuid",
"registration_id": "registration-uuid",
"auth_url": "https://bookmann.com/devices/auth/confirm/abc123",
"auth_url": "https://bookhoard.com/devices/auth/confirm/abc123",
"qr_code": "data:image/png;base64,iVBORw0KG...",
"expires_in": 300
}
@@ -681,9 +681,9 @@ Content-Type: application/json
"auth_token": "device-bearer-token...",
"device_id": "uuid",
"sync_endpoints": {
"progress": "https://bookmann.com/api/sync/progress",
"metadata": "https://bookmann.com/api/sync/metadata",
"annotations": "https://bookmann.com/api/sync/annotations"
"progress": "https://bookhoard.com/api/sync/progress",
"metadata": "https://bookhoard.com/api/sync/metadata",
"annotations": "https://bookhoard.com/api/sync/annotations"
}
}
```
+1 -1
View File
@@ -173,7 +173,7 @@ This test verifies:
**Solution**:
1. Check if kepubify or ebook-convert is installed
2. Verify EPUB file is valid and accessible
3. Check cache directory permissions: `/var/bookmann/cache/kepub`
3. Check cache directory permissions: `/var/bookhoard/cache/kepub`
4. Review conversion logs for specific error messages
### Cache Issues
+36 -36
View File
@@ -238,16 +238,16 @@ CREATE TABLE device_catalogs (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
device_id UUID REFERENCES devices(id) ON DELETE CASCADE,
media_item_id UUID REFERENCES media_items(id) ON DELETE CASCADE,
bookmann_uuid UUID NOT NULL,
bookhoard_uuid UUID NOT NULL,
kobo_content_id VARCHAR(255) NOT NULL,
content_id_type VARCHAR(20), -- 'bookmann_uuid', 'kobo_generated', 'isbn_based'
content_id_type VARCHAR(20), -- 'bookhoard_uuid', 'kobo_generated', 'isbn_based'
available BOOLEAN DEFAULT TRUE,
delivery_date TIMESTAMP WITH TIME ZONE,
delivery_method VARCHAR(20), -- 'wireless', 'usb', 'manual'
UNIQUE(device_id, kobo_content_id)
);
CREATE INDEX idx_device_catalogs_bookmann ON device_catalogs(bookmann_uuid);
CREATE INDEX idx_device_catalogs_bookhoard ON device_catalogs(bookhoard_uuid);
CREATE INDEX idx_device_catalogs_kobo ON device_catalogs(kobo_content_id);
```
@@ -266,9 +266,9 @@ CREATE TABLE system_config (
-- Pre-seeded values
INSERT INTO system_config (key, value) VALUES
('base_url', 'https://bookmann.example.com'),
('opds_base_url', 'https://bookmann.example.com/opds'),
('api_base_url', 'https://bookmann.example.com/api');
('base_url', 'https://bookhoard.example.com'),
('opds_base_url', 'https://bookhoard.example.com/opds'),
('api_base_url', 'https://bookhoard.example.com/api');
```
### Table: opds_tokens (NEW)
@@ -345,7 +345,7 @@ Query Bookhoard for a book by multiple identifier types with confidence scoring.
"matches": [
{
"media_item_id": "uuid-123",
"bookmann_uuid": "uuid-123",
"bookhoard_uuid": "uuid-123",
"confidence": 1.0,
"match_method": "uuid_match"
}
@@ -663,7 +663,7 @@ Main OPDS 1.2 catalog feed.
<link rel="start" href="http://192.168.1.100:8765/opds/devices/kobo-id/nav"/>
<entry>
<id>urn:uuid:bookmann-uuid-123</id>
<id>urn:uuid:bookhoard-uuid-123</id>
<dc:title>The Hobbit</dc:title>
<dc:creator>J.R.R. Tolkien</dc:creator>
<updated>2026-01-31T10:00:00Z</updated>
@@ -683,14 +683,14 @@ Main OPDS 1.2 catalog feed.
rel="alternate"/>
<!-- Canonical ID for progress matching -->
<dc:identifier id="bookmann">uuid-123</dc:identifier>
<dc:identifier id="bookhoard">uuid-123</dc:identifier>
<!-- Hash for sidecar matching -->
<meta property="bookmann:sha256">abc123...</meta>
<meta property="bookhoard:sha256">abc123...</meta>
<!-- Collections as categories -->
<category scheme="http://bookmann.example.com/collections">Science Fiction</category>
<category scheme="http://bookmann.example.com/collections">Reading</category>
<category scheme="http://bookhoard.example.com/collections">Science Fiction</category>
<category scheme="http://bookhoard.example.com/collections">Reading</category>
</entry>
<!-- More entries... -->
@@ -709,7 +709,7 @@ OPDS acquisition search endpoint.
<id>urn:uuid:device-id</id>
<entry>
<id>urn:uuid:bookmann-uuid-123</id>
<id>urn:uuid:bookhoard-uuid-123</id>
<dc:title>The Hobbit</dc:title>
<dc:creator>J.R.R. Tolkien</dc:creator>
<updated>2026-01-31T10:00:00Z</updated>
@@ -854,8 +854,8 @@ Kobo progress sync with ContentId mapping (enhanced).
catalog, err := db.GetDeviceCatalogByKoboContentId(ctx, contentId)
if err == nil && catalog.Valid {
// Found! Use canonical Bookhoard UUID
bookmannUUID = catalog.BookhoardUUID
return bookmannUUID, nil
bookhoardUUID = catalog.BookhoardUUID
return bookhoardUUID, nil
}
// Step 2: ContentId not found - try SHA-256 (if looks like hash)
@@ -988,13 +988,13 @@ KOReader annotations sync with SHA-256 support.
#### GET `/api/sync/sidecar/:deviceId`
Download unified `.bookmann.json` configuration file.
Download unified `.bookhoard.json` configuration file.
**Response**:
```json
{
"version": "1.0",
"bookmann": {
"bookhoard": {
"opds_catalog": "http://192.168.1.100:8765/opds/devices/kobo-id/catalog",
"sync_api": "http://192.168.1.100:8765/api/sync/kobo",
"opds_base_url": "http://192.168.1.100:8765/opds",
@@ -1003,7 +1003,7 @@ Download unified `.bookmann.json` configuration file.
},
"books": {
"sha256:abc123...": {
"bookmann_uuid": "uuid-123",
"bookhoard_uuid": "uuid-123",
"title": "The Hobbit",
"author": "J.R.R. Tolkien",
"available_formats": ["epub", "kepub"]
@@ -1034,9 +1034,9 @@ Get system-wide configuration.
```json
{
"config": {
"base_url": "https://bookmann.example.com",
"opds_base_url": "https://bookmann.example.com/opds",
"api_base_url": "https://bookmann.example.com/api",
"base_url": "https://bookhoard.example.com",
"opds_base_url": "https://bookhoard.example.com/opds",
"api_base_url": "https://bookhoard.example.com/api",
"auto_convert_kepub": true,
"default_opds_refresh_interval": 3600
}
@@ -1219,7 +1219,7 @@ func EvaluateRules(mediaItem MediaItem, rules []Rule) []RuleEvaluation {
**OPDS Response Structure (OPDS 1.2)**:
```xml
<entry>
<id>urn:uuid:bookmann-uuid-123</id>
<id>urn:uuid:bookhoard-uuid-123</id>
<dc:title>The Hobbit</dc:title>
<dc:creator>J.R.R. Tolkien</dc:creator>
<updated>2026-01-31T10:00:00Z</updated>
@@ -1238,15 +1238,15 @@ func EvaluateRules(mediaItem MediaItem, rules []Rule) []RuleEvaluation {
rel="alternate"/>
<!-- Canonical ID for progress matching -->
<dc:identifier id="bookmann">uuid-123</dc:identifier>
<dc:identifier id="bookhoard">uuid-123</dc:identifier>
<!-- Hash for sidecar matching (format-specific if available) -->
<meta property="bookmann:sha256">abc123...</meta>
<meta property="bookmann:kepub_sha256">xyz789...</meta>
<meta property="bookhoard:sha256">abc123...</meta>
<meta property="bookhoard:kepub_sha256">xyz789...</meta>
<!-- Collections as categories -->
<category scheme="http://bookmann.example.com/collections">Science Fiction</category>
<category scheme="http://bookmann.example.com/collections">Reading</category>
<category scheme="http://bookhoard.example.com/collections">Science Fiction</category>
<category scheme="http://bookhoard.example.com/collections">Reading</category>
</entry>
```
@@ -1367,7 +1367,7 @@ if book.FilePath != "" {
```json
{
"version": "1.0",
"bookmann": {
"bookhoard": {
"opds_catalog": "http://192.168.1.100:8765/opds/devices/kobo-id/catalog",
"sync_api": "http://192.168.1.100:8765/api/sync/kobo",
"opds_base_url": "http://192.168.1.100:8765/opds",
@@ -1376,7 +1376,7 @@ if book.FilePath != "" {
},
"books": {
"sha256:abc123...": {
"bookmann_uuid": "uuid-123",
"bookhoard_uuid": "uuid-123",
"title": "The Hobbit",
"author": "J.R.R. Tolkien",
"available_formats": ["epub", "kepub"]
@@ -1443,14 +1443,14 @@ if book.FilePath != "" {
1. Log into Bookhoard web UI
2. Go to Device Management → Your Kobo device
3. Click "Download Configuration" button
4. File downloads as `.bookmann.json`
4. File downloads as `.bookhoard.json`
```
**Step 2: Configure Kobo for OPDS**
```
1. On Kobo, go to Settings → Sync & Backup
2. Tap "Add Content Server" or "Add OPDS Feed"
3. Enter URL from `.bookmann.json`:
3. Enter URL from `.bookhoard.json`:
http://192.168.1.100:8765/opds/devices/YOUR_DEVICE_ID/catalog
4. Kobo will automatically:
- Connect to Bookhoard
@@ -1487,7 +1487,7 @@ Same as Kobo setup above
```
1. Open KOReader settings
2. Enable "OPDS catalog" in network/synchronization section
3. Enter OPDS URL from `.bookmann.json`:
3. Enter OPDS URL from `.bookhoard.json`:
http://192.168.1.100:8765/opds/devices/YOUR_DEVICE_ID/catalog
4. KOReader will automatically:
- Connect to Bookhoard catalog
@@ -1521,7 +1521,7 @@ Place in KOReader's config directory
**Step 3: Use Sidecar for Progress Sync**
```
KOReader plugin reads .bookmann.json
KOReader plugin reads .bookhoard.json
→ Matches local files to Bookhoard UUIDs via SHA-256
→ Syncs progress using canonical UUIDs
→ Works offline
@@ -1622,7 +1622,7 @@ Can be: Public (no authentication required)
### Manual Testing Checklist
**Kobo Workflow**:
- [ ] Download `.bookmann.json` from web UI
- [ ] Download `.bookhoard.json` from web UI
- [ ] Transfer to Kobo via USB
- [ ] Configure OPDS URL on Kobo
- [ ] Browse catalog wirelessly
@@ -1631,7 +1631,7 @@ Can be: Public (no authentication required)
- [ ] Verify progress syncs to Bookhoard
**KOReader Workflow**:
- [ ] Download `.bookmann.json` from web UI
- [ ] Download `.bookhoard.json` from web UI
- [ ] Configure OPDS URL in KOReader
- [ ] Browse catalog wirelessly
- [ ] Download book
@@ -1669,7 +1669,7 @@ Can be: Public (no authentication required)
- **Media Item Formats**: Tracks all format versions with their hashes. Pre-convert EPUB to KEPUB during scan for optimal performance.
- **System Config**: Key-value store for system-wide settings (base_url, opds_base_url, api_base_url). Enables flexible deployment.
- **OPDS Tokens**: Per-device access tokens for OPDS catalog browsing. Optional - can also support user-scoped and admin tokens.
- **Sidecar File**: `.bookmann.json` - Unified configuration file for devices. Contains OPDS URLs, sync API endpoints, book mappings, collection mappings.
- **Sidecar File**: `.bookhoard.json` - Unified configuration file for devices. Contains OPDS URLs, sync API endpoints, book mappings, collection mappings.
- **Auto-Assign Rules**: Configurable criteria for automatically adding books to collections. Fields: genre, series, author, language, publisher, copyright_year, tags. Operators: equals, contains, starts_with, ends_with, greater_than, less_than.
- **Sync Direction**: For device shelf mappings. 'bidirectional' (sync both ways), 'book_to_hoard' (send to device), 'device_to_hoard' (read from device), 'none' (no sync).
- **View Settings**: Per-device preferences for how collections are displayed (grid vs list, which collections are visible).
+1 -1
View File
@@ -161,7 +161,7 @@ The conversion service handles multiple failure scenarios:
### Build Verification
```bash
go build -o /tmp/bookmann-test ./cmd/server
go build -o /tmp/bookhoard-test ./cmd/server
# Success: Exit code 0
```
+2 -2
View File
@@ -110,7 +110,7 @@ Get matching suggestions for a specific unlinked book.
"suggestions": [
{
"media_item_id": "uuid-2",
"bookmann_uuid": "uuid-2",
"bookhoard_uuid": "uuid-2",
"confidence": 0.95,
"match_method": "sha256_match"
}
@@ -321,7 +321,7 @@ With default threshold of 0.8, only matches with 80%+ confidence are auto-linked
### Build Verification
```bash
cd /home/nymusicman/Code/bookmann
cd /home/nymusicman/Code/bookhoard
go build ./cmd/server # ✅ Successful
cd internal/database && sqlc generate # ✅ Successful
cd templates && templ generate # ✅ Successful
+1 -1
View File
@@ -515,4 +515,4 @@ Audit Logs: 180 days
**Audit Completed By**: Bookhoard Security Team
**Next Audit**: Within 3 months of production deployment
**Questions**: security@bookmann.example.com
**Questions**: security@bookhoard.example.com
+4 -4
View File
@@ -284,8 +284,8 @@ e.Pre(
```go
import (
"bookmann/internal/middleware"
"bookmann/internal/handlers"
"bookhoard/internal/middleware"
"bookhoard/internal/handlers"
)
func main() {
@@ -452,7 +452,7 @@ MAX_DEVICES_PER_USER=10
**Step 3: Update Middleware Chain**
```go
// Add to main.go middleware chain
import "bookmann/internal/middleware"
import "bookhoard/internal/middleware"
// In main():
securityMiddleware := middleware.HTTPSProtectionMiddleware(true, "8443")
@@ -594,4 +594,4 @@ While the system is production-ready, you may consider:
**Implementation Completed**: January 31, 2026
**Next Review**: Within 3 months
**Questions**: security@bookmann.example.com
**Questions**: security@bookhoard.example.com
+7 -7
View File
@@ -94,7 +94,7 @@
- Device will receive authentication token
4. **Configure Sync**:
- Enter the sync URL provided (e.g., `https://bookmann.example.com/api/sync/koreader`)
- Enter the sync URL provided (e.g., `https://bookhoard.example.com/api/sync/koreader`)
- Enable auto-sync
- Set sync frequency (recommended: Every page turn)
@@ -103,12 +103,12 @@
1. **From Your Device**:
- Navigate to sync settings
- Select "Bookhoard Sync"
- Enter server URL: `https://bookmann.example.com`
- Enter server URL: `https://bookhoard.example.com`
- Click "Register Device"
- Device will display registration code
2. **In Your Browser**:
- Go to `https://bookmann.example.com/devices/approve`
- Go to `https://bookhoard.example.com/devices/approve`
- Enter registration code
- Approve the device
@@ -505,13 +505,13 @@ A: Yes, HTTPS/TLS 1.3 for all sync traffic.
- **Issues**: Report bugs at GitHub Issues
- **Discussions**: Join GitHub Discussions
- **Email**: support@bookmann.example.com
- **Email**: support@bookhoard.example.com
### Community
- **Forum**: community.bookmann.example.com
- **Matrix**: #bookmann:matrix.org
- **Discord**: discord.gg/bookmann
- **Forum**: community.bookhoard.example.com
- **Matrix**: #bookhoard:matrix.org
- **Discord**: discord.gg/bookhoard
---
+5 -5
View File
@@ -57,7 +57,7 @@ cmd/server/tests/
export DATABASE_PASSWORD=postgres
# Option 2: Use DATABASE_URL for containerized testing
export DATABASE_URL="postgresql://user:pass@localhost:5432/bookmann"
export DATABASE_URL="postgresql://user:pass@localhost:5432/bookhoard"
```
2. **Dependencies**: Ensure all Go dependencies are installed
@@ -95,8 +95,8 @@ go test -v -run TestAnalyticsReadingStats
```bash
# Build and run tests in Docker container
podman-compose up -d db
podman build -t bookmann-test .
podman run --network bookmann_default -e DATABASE_URL="postgresql://postgres:postgres@db:5432/bookmann" bookmann-test go test ./cmd/server/tests/ -v
podman build -t bookhoard-test .
podman run --network bookhoard_default -e DATABASE_URL="postgresql://postgres:postgres@db:5432/bookhoard" bookhoard-test go test ./cmd/server/tests/ -v
```
### Test Modes
@@ -452,7 +452,7 @@ jobs:
postgres:
image: postgres:15
env:
POSTGRES_DB: bookmann
POSTGRES_DB: bookhoard
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
@@ -469,7 +469,7 @@ jobs:
- name: Run integration tests
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/bookmann
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/bookhoard
run: |
cd cmd/server/tests
go test -v -race -coverprofile=coverage.out
+2 -2
View File
@@ -409,7 +409,7 @@ If you're running Bookhoard with a custom domain or port:
```ini
[Sync]
# Custom domain
ServerURL=https://bookmann.example.com/api/sync/kobo
ServerURL=https://bookhoard.example.com/api/sync/kobo
# Custom port
ServerURL=http://192.168.1.100:9000/api/sync/kobo
@@ -424,7 +424,7 @@ If you have SSL/TLS configured on Bookhoard:
```ini
[Sync]
ServerURL=https://bookmann.yourdomain.com/api/sync/kobo
ServerURL=https://bookhoard.yourdomain.com/api/sync/kobo
```
Kobo will automatically trust the certificate if properly configured.
+1 -1
View File
@@ -69,7 +69,7 @@ Before you begin, make sure you have:
Find your Bookhoard instance URL. This will typically be one of:
- **Local Network**: `http://YOUR_COMPUTER_IP:8765`
- **Localhost (if testing)**: `http://localhost:8765`
- **Domain (if configured)**: `https://bookmann.yourdomain.com`
- **Domain (if configured)**: `https://bookhoard.yourdomain.com`
### Step 2: Register Your Device in Bookhoard