make herobooks API driven & make widget #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
make oschema driven
convert UI
remarks
see #4
all stays in herobooks
Implementation Plan
Full plan:
docs/plan.mdPart 1: OSchema-Driven API
Convert the monolithic
tiny_httpserver (~4,900 LOC, 30+ hand-routed endpoints) into a schema-first JSON-RPC server with auto-generated types and dispatch.What already exists:
specs/schemas/publishing/(data types)src/publishing/server/(auto-CRUD for 6 root objects)herolib-osisdependency withrpcfeaturePhases:
Phase 1: Define web service oschema
specs/schemas/webservice/books.oschema— browsing & listingspecs/schemas/webservice/search.oschema— search & AI summaryspecs/schemas/webservice/pdf.oschema— PDF generation, versions, permalinksspecs/schemas/webservice/import.oschema— collection importspecs/schemas/webservice/admin.oschema— admin & system ops14 RPC methods mapped from current handlers:
books.listserve_books_apibooks.list_librariesserve_indexbooks.list_by_libraryserve_librarybooks.getserve_bookbooks.get_pageserve_pagesearch.queryserve_search_apisearch.ai_summaryserve_ai_summary_apisearch.transcribeserve_transcribe_apipdf.generate_bookserve_book_pdfpdf.generate_pageserve_page_pdfpdf.list_versionsserve_pdf_versions_apipdf.convert_urlserve_convert_submitimport.startserve_import_submitimport.get_logserve_import_logPhase 2: Generate server code
webservicedomain tobuild.rsrpc.rs/rpcendpointPhase 3: Migrate handlers to RPC
Phase 4: Transition to Axum
tiny_httpwith Axum async routertower-httpCORS middlewareblock_onworkarounds)Part 2: Dioxus Widget UI
Replace 13 Askama HTML templates (3,284 LOC) with a Dioxus 0.7 WebAssembly frontend.
Phase 1: Scaffold Dioxus project
crates/hero-books-ui/workspace memberPhase 2: Core components
Navbar,ThemeToggle,FooterSearchBar+VoiceInputLibraryCard,BookCard,PageListItemPdfVersionsDropdown,TagFilter,ToastPhase 3: Feature pages (simplest first)
Docs,Home,BooksLibrary,Book,PageSearch,Import,ConvertPhase 4: Integration & deployment
Risk areas
web-sysWeb Audio API; fallback endpointweb-sysBranching Strategy
See BRANCHING.md for full details.
main — Stable, public-facing
Currently deployed at https://herobooks.gent02.grid.tf. Only receives critical bug fixes.
development — Active feature work
All Part 1 + Part 2 work happens here. No merge to main until the full plan is complete and verified.
Bug fix flow
This works because: