Skip to content

adotkaya/localLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LocalLib

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.

Features

  • 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.

Architecture

Backend (Go)

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.

Frontend (JavaScript)

The frontend is a lightweight Single Page Application (SPA) built with vanilla JavaScript.

  • Modules: Logic is separated into library.js, reader.js, ui.js, and state.js.
  • Communication: Interacts with the Go backend via auto-generated Wails bindings.

Project Structure

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

Installation

Prerequisites

Build from Source

# 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 build

Data Storage

LocalLib 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/

License

MIT

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors