Shelfhost is a self-hosted PDF library, reader, and highlighting tool designed to provide a warm, focused, and distraction-free reading experience for your PDF collection.
Built using modern serverless tech stacks, Shelfhost can be deployed globally for $0/month on Cloudflare's free tier.
- Distraction-Free Reader: An interface designed to feel like sitting down with a good book — warm, focused, and unhurried. The browser UI chrome is minimal and retreats into the background while you read.
- Text Highlights: Highlight text selections instantly. Supports multiple highlight colors (yellow, green, pink, blue) to organize your thoughts.
- Page Bookmarks: Bookmark pages to easily navigate back to key reference points.
- Auto-Resume Progress: Automatically tracks your reading progress (debounced on scroll) and resumes right where you left off.
- Global Serverless Backend: Powered by Nuxt Nitro running on Cloudflare Workers and Pages, giving you instant load times anywhere in the world.
- D1 & R2 Integration: Uses Cloudflare D1 (SQLite) for ultra-fast, relational metadata queries and Cloudflare R2 for secure, private PDF file storage.
| Layer | Technology |
|---|---|
| Frontend | Nuxt 3 (Vue 3, Composition API) |
| Styling | Tailwind CSS |
| Backend API | Nuxt server routes (running on Cloudflare Workers via Nitro) |
| Database | Cloudflare D1 (SQLite) |
| File Storage | Cloudflare R2 |
| PDF Engine | PDF.js (Client-side rendering to stay within serverless memory constraints) |
# Using bun (recommended)
bun install
# Using npm
npm installInitialize your local database by running the migration schema:
# Using bun
bun wrangler d1 migrations apply shelfhost-db --local
# Using npm
npx wrangler d1 migrations apply shelfhost-db --local# Using bun
bun run dev
# Using npm
npm run devOpen http://localhost:3000 in your browser to begin reading.
To host your own production instance on Cloudflare, please refer to the step-by-step instructions in the Deployment Guide.
For a standalone promo landing page that showcases this project, see the landing.html file.
Released under the MIT License. Created by Dipankar Shaw ("dshaw0004").