Personal SvelteKitHonoCloudflare WorkersD1R2Drizzle ORM
YuYan Reader
2025 – Present
A multi-format e-book reader web app with a custom IR-based content pipeline, plugin architecture, and cloud-native backend — supporting EPUB, MOBI/KF8, FB2, CBZ, and TXT formats.
Details
- • Built a Bun workspace monorepo (apps/web + apps/server + packages/i18) with SvelteKit 5 frontend deployed to Cloudflare Pages and Hono API deployed to Cloudflare Workers.
- • Designed a compiler-style IR (Intermediate Representation) pipeline: HTML → IR → sanitize → resource rewrite → plugin processing → render back to HTML, enabling format-agnostic content processing.
- • Implemented custom parsers/adapters for 5 e-book formats (EPUB, MOBI/KF8, FB2, CBZ, TXT) with a unified UniversalBook interface abstracting metadata, TOC, spine navigation, and chapter loading.
- • Built a pluggable IR plugin system (PluginManager + IRPlugin interface) for extensible content enhancements — word-level annotations (pinyin, translation, pronunciation), paragraph translation, and difficulty scoring.
- • Engineered the backend on Hono with Cloudflare D1 (SQLite via Drizzle ORM) for user data (library entries, bookmarks, reading progress) and Cloudflare R2 for book file storage with presigned URLs.
- • Implemented dual reading modes (paginated + scroll) with chapter-level progress tracking, local + server-side sync, and TOC-based navigation with anchor resolution.
- • Added i18n support via Paraglide.js (@inlang), Better Auth for authentication, and Scalar for auto-generated OpenAPI documentation.