Skip to content
LibraVaultPublic

About

Read and listen, private and secure.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

668 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibraVault

Your library, under lock and key.

A modern, privacy-first Android app (iOS in TestFlight beta) for reading EPUBs, viewing PDFs, and listening to audiobooks — with optional client-side Encrypted Vaults, zero broad file permissions, zero required accounts and zero ads.

License: GPL-3.0 Android Kotlin


Why LibraVault?

Problem LibraVault's answer
Apps demand full storage access Scoped Storage only — you choose exactly which folders we see
No single app handles books and audio EPUB · PDF · MP3 · M4B · OGG · FLAC · Opus · AAC
Closed-source privacy claims 100% FOSS (GPL-3.0) — verify every claim yourself
Forced accounts and cloud sync Fully offline, no account, no telemetry
Audible/Spotify UX friction Clean home screen, persistent progress, no algorithmic clutter

Features

Reader

  • EPUB rendering via Readium Kotlin Toolkit (full EPUB 3 support)
  • PDF viewer via native AndroidX PdfRenderer (API 31+)
  • Dark, light, and sepia themes
  • Adjustable font size (0.8×–2.0×), font family, and line spacing
  • Paginated or continuous scroll mode
  • Tap-zone navigation — left/right thirds of screen to turn pages
  • Bookmarks and highlights for both EPUB and PDF
  • Silent last-position restore — no dialogs

Player

  • MP3, M4B, OGG Vorbis, FLAC, Opus, AAC
  • Chapter navigation — M4B native chapters + ID3v2 CHAP tags in MP3
  • Variable playback speed 0.5×–3.0×
  • Sleep timer with 6 presets, end-of-chapter option, and 10-second fade-out
  • Background playback with lock screen and notification controls
  • Android Auto ready via MediaSession (pending verification — no automotive manifest entry or Auto-specific intent filter is declared yet; behavior depends on the system-level MediaSession surface)
  • Progress saved every 5 seconds

Library

  • Opens in < 200 ms — Room cache serves UI immediately (target — not yet measured on-device)
  • Background scan on cold start; pull-to-refresh anytime
  • Search by title, author, narrator, or series
  • "Continue reading" and "Continue listening" cards
  • Stale file handling — silent removal on next scan

Encrypted Vaults

  • Create, unlock, and manage multiple client-side encrypted vaults, separate from your regular (unencrypted) library folders
  • Chunked AES-256-GCM ciphertext for both file content and the metadata manifest (titles, authors, bookmarks, highlights, cover art) — nothing about a vault's contents touches Room or the app's plaintext cover-art cache
  • Vault Master Key unlocked by a PIN wrapped with a hardware-backed (StrongBox/TEE) Android Keystore key, plus an independent 256-bit recovery key shown once at creation — either path works without the other
  • Exponential backoff on repeated PIN guesses; every unlocked vault re-locks the instant the app leaves the foreground
  • Import existing files into a vault, then read/play them natively — EPUB, PDF, and audio all render from encrypted storage, no temporary plaintext copy
  • Bookmarks, EPUB highlights, and per-user reading settings work the same inside a vault as outside one
  • Vault thumbnails carry a padlock badge so vault content is visually distinct from your regular library
  • "Screen Security" toggle (FLAG_SECURE) — on by default, unconditional during recovery-key display/entry
  • See docs/threat-model.md and SECURITY.md for the full asset/threat breakdown, including what's deliberately not hidden (vault existence, display names, approximate size)

Privacy

  • No analytics, telemetry, or remote crash reporting — ever
  • No account required
  • Optional local-only logging — never transmitted
  • Scoped Storage — only folders you explicitly grant
  • Zero network calls on any flavor — INTERNET isn't requested at all (see Permissions)

Distribution flavors

LibraVault ships two product flavors, fdroid and play. As of the donation flow moving to an external browser link (no more in-app BTCPay/Play Billing code), the two are currently identical in behavior — the split is kept for a possible future Google Play listing, not because they differ today.

Screenshots

Library screen with books Book detail view Reader with dark theme Reader with sepia theme
Audio player interface Library search feature Settings screen Sleep timer options
Bookmarks and highlights PDF viewer Light theme variant

Tech Stack

Layer Library
Language & UI Kotlin 2.0 + Jetpack Compose
EPUB rendering Readium Kotlin Toolkit 3.x (BSD 3-Clause)
PDF rendering AndroidX PDF Viewer + PdfRenderer (API 31+)
Audio playback Media3 ExoPlayer + MediaSession
Storage access Storage Access Framework (SAF)
Database Room + KSP
DI Hilt
Async Kotlin Coroutines + Flow
Image loading Coil 3 (local-only, no network fetcher)
Testing JUnit 5 + MockK + Turbine + Robolectric + Compose UI Test
CI GitHub Actions (free — public repo)

Module Structure

libravault/
├── app/                        # Entry point, navigation, manifest
├── build-logic/                # Convention plugins (shared build config)
├── core/
│   ├── database/               # Room entities, DAOs, repositories (KMP commonMain)
│   ├── domain/                 # Models, interfaces, use cases (KMP commonMain)
│   ├── logger/                 # Local opt-in crash logger (KMP commonMain)
│   ├── storage/                # SAF vault manager, file scanner, metadata extractor
│   ├── tts/                    # Text-to-speech reader support (KMP commonMain)
│   ├── ui/                     # Material3 theme, colours, typography
│   ├── vaultcrypto/            # Encrypted Vaults: chunked AES-256-GCM format, key hierarchy
│   ├── vaultstore/             # Encrypted Vaults: lifecycle, Keystore wrap, manifest
│   └── vaultcontent/           # Encrypted Vaults: Readium/Media3/PDF content adapters
└── feature/
    ├── onboarding/             # First-launch vault setup
    ├── library/                # Home screen, search, scan trigger
    ├── reader/                 # EPUB + PDF reader
    ├── player/                 # Audio player, sleep timer, chapters
    ├── settings/               # App preferences, logging, cache management
    └── vault/                  # Encrypted Vaults UI: create/unlock/list, import, read/play

Permissions

Permission Purpose Requested in
FOREGROUND_SERVICE Background audio playback both flavors
FOREGROUND_SERVICE_MEDIA_PLAYBACK Media playback foreground service type both flavors
POST_NOTIFICATIONS Media playback controls (Android 13+) both flavors
SAF URI access Read user-selected vault/library folders only both flavors

Never requested in any flavor: INTERNET, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE, CAMERA, CONTACTS, LOCATION.

Neither flavor declares INTERNET — donations go through a single "Support the Project" button that opens libravault.xyz/support in the system browser, so there's no in-app networking code left to gate behind a flavor. ManifestPermissionsTest.kt asserts this in CI.


Building

# Clone
git clone git@github.com:LibraVault/reader.git
cd libravault

# Debug build (fdroid flavor)
./gradlew assembleFdroidDebug
# Debug build (play flavor — currently identical to fdroid; kept for a future Play listing)
./gradlew assemblePlayDebug

# Run JVM tests (fast — no emulator)
./gradlew testFdroidDebugUnitTest testPlayDebugUnitTest

# Release build (requires keystore.properties — see keystore.properties.template)
./gradlew assembleRelease

Minimum SDK: Android 12 (API 31)
Target SDK: Android 15 (API 35)


Release signing

# 1. Generate a keystore (do this once, back it up securely)
keytool -genkey -v \
  -keystore libravault-release.keystore \
  -alias libravault \
  -keyalg RSA -keysize 4096 -validity 10000

# 2. Copy the template and fill in your credentials
cp keystore.properties.template keystore.properties

# 3. Build signed release APK (builds both fdroidRelease and playRelease)
./gradlew assembleRelease

CI / CD

Five GitHub Actions workflows (all free for public repos):

Workflow Trigger Duration
jvm-tests.yml Every push ~2–3 min
ui-tests.yml PRs to main ~15–20 min
release.yml Version tags (v*.*.*) ~10 min
kmp-ios-build.yml Pushes/PRs that touch shared modules ~5–8 min
netbird-debug.yml Debug builds for internal testing ~10 min

Roadmap

Version Focus
0.4.6-alpha (current) Android app — EPUB, PDF, audio, Encrypted Vaults, privacy-first, donations
— iOS — TestFlight beta, hand-written Swift (no shared KMP code yet); see reader-ios and docs/ios-android-feature-parity.md for what's iOS vs. Android-only today (Encrypted Vaults and donations are Android-only so far)
next DRM (Readium LCP), OPDS browsing, Comic/CBZ, Encrypted Vaults on iOS
later Desktop — Windows, macOS, Linux (KMP + SQLDelight)

Past roadmap docs under docs/ (v1.1-roadmap.md) are marked superseded where scope changed — check a doc's own status banner before trusting it over this table.


Troubleshooting

Added a vault but don't see any books on the home screen? Pull to refresh on the home screen (the refresh icon next to the gear/settings icon), or check Settings → Vaults to confirm the folder was added. A scan runs automatically when a vault is added, but if one was already in progress it may take a refresh to pick up a newly added vault.


Donate

LibraVault is free, open source, and has no ads, no tracking, no accounts — it exists because the people building it believe in it. If it brings you value, consider supporting its development.

In-app: Settings → "Support the Project" opens libravault.xyz/support in your browser (checkout, wallet-app deep links, and QR codes) — there's no donation code inside the app itself. Direct addresses, same ones shown on that page:

Currency Address
Bitcoin (BTC) bc1q9y4q49lxnwrt9pnkgrxfpq92s9mvwv9espc5yg
Monero (XMR) 42RowRVVQgXNxC1691mAVmesXg2JR8MUNaYbnpbG7HMJ8zqExXC2qo4cYdbF9MJpE6Z8jq7ytHWhdXrtxgrFySt349R8WmF

Distribution

Android

  • F-Droid — free, full feature set, reproducible builds
  • GitHub Releases — signed APK on every version tag
  • Firebase App Distribution — beta builds for testers, triggered manually via GitHub Actions (see docs/android-firebase-distribution-process.md)
  • Obtanium — planned
  • Google Play — planned

iOS


License

GPL-3.0 — see LICENSE.

Libravault.xyz · Built with Kotlin + Jetpack Compose

About

Read and listen, private and secure.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages