An offline documentation reader for Android [Vibcoded]
  • Kotlin 63.3%
  • JavaScript 20.2%
  • Shell 9.2%
  • HTML 4.5%
  • TypeScript 2.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tareef Mando 65198fc10c add readme
2026-08-05 12:15:11 +02:00
.agents/skills fixes 2026-08-04 14:45:48 +02:00
app fixes 2026-08-04 14:45:48 +02:00
gradle Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
.gitignore Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
AGENTS.md fixes 2026-08-04 14:45:48 +02:00
build.gradle.kts Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
gradle.properties Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
gradlew Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
gradlew.bat Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
README.md add readme 2026-08-05 12:15:11 +02:00
settings.gradle.kts Initial commit: Doc Pocket offline docs reader 2026-08-03 23:46:36 +02:00
skills-lock.json fix 2026-08-04 00:03:10 +02:00

Doc Pocket

An offline documentation reader for Android. Browse and install docs from devdocs.io, then read them anywhere — no connection required. Pages are cached locally in a Room database and rendered in an in-app WebView.

Built with Kotlin + Jetpack Compose, Hilt, Room, Retrofit, and WorkManager.

Features

  • Library of installed docs, each downloadable on demand.
  • Catalog of available docs pulled live from devdocs.io.
  • Reader with a collapsible topic sidebar, in-page find, section (#anchor) navigation, and bookmarks.
  • Search across a single doc or all installed docs.
  • Background downloads with a foreground-service progress notification.

Requirements

  • Android Studio (or just the command line)
  • JDK 21 to run Gradle (the project's bundled Kotlin cannot parse newer JDKs)
  • Android SDK (compile/target API 36; minimum supported device API 26)

Building the APK

From the repo root, first point Gradle at JDK 21, then build the debug APK:

export JAVA_HOME=$HOME/.local/lib/jdk21
export PATH=$JAVA_HOME/bin:$PATH

./gradlew assembleDebug

The APK is written to:

app/build/outputs/apk/debug/app-debug.apk

Install it onto a connected device/emulator with:

adb install app/build/outputs/apk/debug/app-debug.apk

If ./gradlew fails with IllegalArgumentException: 25.0.4, you forgot the JAVA_HOME export above — Gradle is picking up a newer system JDK.

Other useful tasks

Task Purpose
./gradlew compileDebugKotlin Fast compile-only check after editing code
./gradlew assembleDebug Build the debug APK
./gradlew clean Clear stale generated sources (KSP/Room/Hilt) if builds act up

There is no test suite and no CI configured.

Project layout

app/
└── src/main/java/com/docpocket/
    ├── MainActivity.kt              # Single-activity entry point
    ├── DocPocketApplication.kt      # @HiltAndroidApp + WorkManager setup
    ├── di/                          # Hilt modules (Room, DAOs)
    ├── data/
    │   ├── local/                   # Room DB, entities, DAOs
    │   ├── remote/                  # Retrofit APIs, OkHttp, two base URLs
    │   ├── model/                   # DTOs (devdocs index/catalog)
    │   └── repository/              # DocsRepository (catalog/index/db pipeline)
    ├── download/                    # @HiltWorker download + streaming parse
    ├── ui/
    │   ├── library/                 # Installed docs (home)
    │   ├── catalog/                 # Downloadable docs
    │   ├── reader/                  # Reader: sidebar + themed WebView
    │   ├── search/                  # Global search
    │   ├── components/              # Reusable composables (WebView, etc.)
    │   ├── navigation/              # NavHost + routes
    │   └── theme/                   # Material3 theming
    └── util/                        # HTML theming/injection, constants

Single Gradle module :app, package com.docpocket.

How it works

Doc content comes from devdocs.io in three stages:

  1. Cataloghttps://devdocs.io/docs.json lists everything installable.
  2. Index — per doc, index.json defines the entry tree (names, types, paths).
  3. Pagesdb.json is a large { "path": "html" } map, streamed and inserted into Room in batches.

At read time, page HTML links are rewritten to a custom devdocs://{slug}/{path} scheme and intercepted in-app, so navigation stays fully offline. Selected entries with a #anchor scroll to the matching section in the WebView.