LocalLib is a desktop application for managing a personal local PDF library. It allows users to import, organize, read, and take notes on PDF files without cloud dependencies.
Built with Wails, it combines the power of Go for backend operations with standard Web Technologies for the frontend.
- Library Management: Import and organize PDF files into a searchable library.
- PDF Reader: Built-in reader powered by PDF.js with zoom and navigation controls.
- Reading Progress: Automatically saves your reading position for every book.
- Notes System: Take context-aware notes while reading, linked to specific pages.
- Folder Organization: Group books into custom folders.
- Local Storage: All data is stored locally via SQLite; no internet connection required.
The backend handles file system operations, database management, and secure file serving.
app.go: The main application controller exporting methods to the frontend.internal/handlers: Serves PDF files securely via HTTP streaming to ensure performance.internal/services: Contains business logic for library management and notes.- Database: Uses GORM with SQLite for robust local data persistence.
The frontend is a lightweight Single Page Application (SPA) built with vanilla JavaScript.
- Modules: Logic is separated into
library.js,reader.js,ui.js, andstate.js. - Communication: Interacts with the Go backend via auto-generated Wails bindings.
LocalLib/
├── app.go # App controller & frontend exports
├── main.go # Application entry point
├── frontend/ # UI assets and logic
│ ├── src/ # JavaScript source files
│ └── wailsjs/ # Auto-generated Go bindings
└── internal/ # Private application code
├── database/ # Database init and models
├── handlers/ # HTTP file handlers
├── models/ # GORM data structures
└── services/ # Business logic
# Clone the repository
git clone https://github.com/yourusername/LocalLib.git
cd LocalLib
# Install frontend dependencies
cd frontend
npm install
cd ..
# Run in development mode (with hot reload)
wails dev
# Build for production
wails buildLocalLib stores your library database and settings in your OS's standard application data directory:
- Windows:
%APPDATA%\LocalLibrary\ - macOS:
~/Library/Application Support/LocalLibrary/ - Linux:
~/.local/share/LocalLibrary/
MIT