Skip to content

hikaMaeng/PDFit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFit

한국어로 보기

A self-hosted PDF library server. Run it locally with a single Docker command — your files never leave your machine.


Contents


Why PDFit

Most PDF tools require cloud accounts, upload your files to remote servers, or track your reading habits. PDFit runs entirely on your own machine. No sign-up, no internet connection required, no telemetry of any kind.

Your PDFs stay on your disk. Always.

  • The server process runs inside Docker on your own computer.
  • All file storage, database, and metadata live in a single ./data/ folder you control.
  • No outbound network calls are made — zero data leaves your machine.
  • Deleting the container does not delete your data; the ./data/ folder remains intact.

Features

Folder Organization

  • Create as many folders as you like from the sidebar.
  • Each folder shows a PDF count at a glance.
  • Delete a folder (and all its PDFs) with one click.
  • Drag a PDF card onto any folder in the sidebar to move it instantly.

PDF Upload

  • Upload one or more PDFs at once directly from the browser.
  • A real-time progress bar tracks each batch upload.
  • Alternatively, drop PDF files straight into the data/books/<folder>/ directory on disk — PDFit detects changes automatically without restarting.

Tag System

  • Attach any number of tags to each PDF.
  • Tags are autocompleted from your existing tag vocabulary.
  • Drag a PDF card onto a tag in the sidebar to apply that tag without opening a dialog.
  • Browse all PDFs that share a tag from the sidebar tag list.

PDF Viewer

Three view modes

Mode Description
Continuous Scroll All pages flow vertically — best for most reading
Single Page One page at a time, keyboard navigation
Two-Page Spread Side-by-side pages, ideal for book-format PDFs

Zoom & fit

  • Preset zoom levels: 50 % · 75 % · 100 % · 125 % · 150 % · 200 % · 300 %
  • Fit to width — fills the viewport horizontally
  • Fit to height — shows a full page at once

Comfort features

  • Inverted colors — flips to a dark background for comfortable night reading
  • Spacebar — hides all UI chrome for distraction-free reading; press again to restore
  • Auto-save state — when you reopen a PDF, the viewer restores your last page, zoom level, view mode, and UI state automatically

Bookmarks

  • Add a bookmark on any page with a color label and optional note.
  • The Bookmarks page shows all bookmarks across every book in one view, grouped by book and page.
  • Color filter — click color dots to show or hide bookmark groups by color.
  • Keyword filter — search bookmark notes in real time.
  • Inline editing — click any note to edit it in place; press Enter to save or Escape to cancel.
  • Page preview — hover over a bookmark entry to peek at the original PDF page without leaving the list.

Quick Start — Docker Hub

No Git required. Just Docker.

# 1. Create a local data directory
mkdir -p pdfit/data

# 2. Run the container
docker run -d \
  --name pdfit \
  -p 15201:15201 \
  -v "$(pwd)/pdfit/data:/app/data" \
  --restart unless-stopped \
  hika00/pdfit:latest

Open http://localhost:15201 in your browser.

To upgrade to a newer version:

docker pull hika00/pdfit:latest
docker stop pdfit && docker rm pdfit
# Re-run the docker run command above — your data folder is unchanged

Quick Start — Git Clone

Requires Git and Docker (with the Compose plugin).

git clone https://github.com/hikaMaeng/PDFit.git
cd PDFit
docker compose up -d

Open http://localhost:15201 in your browser.

To update:

git pull
docker compose up -d --build

Managing Your PDFs

Option A — Upload from the browser

  1. Open a folder in the sidebar.
  2. Click the Upload button (top-right of the folder view) or the Add file button in the PDF list.
  3. Select one or more .pdf files; a progress bar appears during transfer.

Option B — Copy files directly to disk

PDFit watches the data/books/ directory in real time. You can add, remove, or reorganize PDFs using your OS file manager and PDFit will reflect the changes immediately — no restart needed.

data/
└── books/
    ├── Uncategorized/     ← default folder
    ├── Engineering/
    ├── Finance/
    └── Fiction/

Tip: Subfolders map directly to PDFit folders. Create a folder on disk and it appears in the sidebar automatically.

Changing the port

Edit docker-compose.yml:

ports:
  - "8080:15201"   # access via http://localhost:8080

Then restart:

docker compose up -d

Data persistence

All data — PDF files, reading positions, bookmarks, and tags — is stored in ./data/. This directory is mounted as a Docker volume, so it survives container restarts, upgrades, and even full container removal.

data/
├── books/          ← your PDF files (organized by folder)
└── pdfit.db        ← SQLite database (bookmarks, tags, reading state)

To back up everything, simply copy the data/ folder.


PDF Viewer

Keyboard shortcuts

Key Action
Space Toggle distraction-free mode (hides toolbar and header)
/ Previous / next page (single and double-page modes)

Reading state

Every time you leave a PDF, PDFit saves:

  • Current page number
  • Zoom level and fit mode
  • View mode (scroll / single / double)
  • Inverted color toggle
  • Scroll position

When you reopen the PDF, you are returned exactly where you left off.


Bookmarks

Adding a bookmark

Inside the viewer, click the bookmark icon on any page. Choose a color, optionally enter a note, and save.

Bookmark list

The Bookmarks section in the sidebar shows every bookmark you have ever saved, grouped by book then page. From here you can:

  • Filter by color dot (click to toggle)
  • Search notes by keyword
  • Edit a note inline (click the text)
  • Preview the original page without navigating away
  • Delete a bookmark with the trash icon

Tags

Adding tags

Open a folder, click the tag icon on any PDF in the list. Type a new tag name or pick from autocomplete suggestions, then press Enter.

Drag-to-tag

Drag any PDF card from the folder view and drop it onto a tag name in the sidebar. The tag is applied instantly — no dialog needed.

Browsing by tag

Click any tag in the sidebar to see every PDF that carries it, regardless of which folder the PDF lives in.


Privacy & Security

PDFit is designed to run exclusively on your local machine or private network.

  • No account required — there is no login, no email, no cloud identity.
  • No telemetry — no analytics, crash reports, or usage data are collected or transmitted.
  • No external dependencies at runtime — the container has no outbound network calls; it only listens on the port you assign.
  • File isolation — the server process can only read files inside the mounted data/ directory.
  • Open source — the code you run is the code in this repository. Nothing is hidden.

If you expose PDFit to a network beyond your own machine (e.g., through port forwarding or a reverse proxy), consider placing it behind authentication middleware such as Nginx basic auth or a VPN.


Roadmap — Pro Edition

A Pro Edition of PDFit is in development. It extends the free edition with AI-powered features:

Feature Description
AI Summarization Generate concise summaries of any PDF using a local or cloud-hosted LLM
RAG Search Ask questions in natural language; the system retrieves relevant passages from your library and answers with citations
Cross-book Insights Select multiple books and derive synthesized insights, comparisons, or thematic summaries across all of them
MCP Server Expose your entire library as an MCP (Model Context Protocol) server — let Claude and other AI assistants query your books directly
Settings panel Configure AI model providers, API keys, language preferences, and more

MCP Server — Your library as AI context

When the MCP server feature is enabled, PDFit registers itself as an MCP server that any compatible AI client (Claude Desktop, Cursor, etc.) can connect to.

From that point on, your AI assistant can search, retrieve, and reason over every PDF in your library in real time — without you copying and pasting anything. Ask Claude "what does my structural engineering textbook say about load distribution?" and it queries your local PDFit RAG index on the spot.

// Example: Claude Desktop mcp_settings.json
{
  "mcpServers": {
    "pdfit": {
      "url": "http://localhost:15201/mcp"
    }
  }
}

All retrieval happens locally. Your books never leave your machine, even when an AI model is involved.

The Pro Edition will be available as a separate Docker image. Your existing data/ folder will be fully compatible — no migration needed.


Version

0.1.0 — Free Edition


License

This project is source-available. The built artifacts in this repository are provided for personal use. Commercial redistribution is not permitted without written consent.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors