Skip to content
blainekylePublic

About

Zero-bloat, config-driven web & local-HTML app container for Windows, Android & Android TV.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

0app logo

0app

Zero-bloat, config-driven web & local-HTML app container for Windows, Android & Android TV.
Point it at any URL or local HTML file via a plain-text 0a.cfg, remap its icon, and spin up dedicated standalone apps in seconds.

Windows x64 Portable Android & Android TV Standalone APK Export 0a.cfg MIT License


Overview

0app turns any URL, homelab dashboard, internal appliance portal, media server, legacy intranet tool, or local HTML utility into a dedicated standalone app — without browser chrome bloat.

  • Windows Portable (0app.exe): Drop copies of 0app.exe into different folders across your PC or USB drive, freely rename each .exe (e.g. HomeAssistant.exe, Finesse.exe, Grafana.exe, Router.exe), customize its 0a.ico icon, and run as many isolated copies simultaneously as you want.
  • Android & Android TV (0app.apk): Universal single APK for phones, tablets, and Android TV / Google TV (Leanback launcher + D-pad navigation). Tapping 0app launches your configured web app directly — while long-pressing the 0app icon opens the tucked-away Config & Export Console, which can self-clone 0app on-device into standalone, v2-signed .apk apps with your chosen app name, custom icon & TV banner, isolated WebView cookies, and 0a.cfg locked inside (with no management console in the cloned APK).

Quick Start (Windows Portable)

  1. Download 0app-v1.0.1-windows-x64-portable.zip from Releases and extract it into any folder:
    MyPortal/
    ├── 0app.exe      # Freely rename to e.g. MyPortal.exe
    ├── 0a.cfg        # Human-editable configuration file
    ├── 0a.html       # Graphical First-Time Setup app (also embedded inside 0app.exe)
    └── 0a.ico        # Created automatically if you pick/fetch a custom icon
    
  2. (Optional) Rename 0app.exe to match your target app (for example, Grafana.exe).
  3. Launch the .exe to walk through the Graphical First-Time Setup, or open 0a.cfg directly in any text editor.
  4. Click Save & Launch App — your configured window frame, security posture, custom 0a.ico icon, tray behavior, and internal host overrides take effect immediately.

Need only the .exe? Even if you copy just 0app.exe alone into an empty folder and rename it, launching it automatically extracts 0a.html from inside the binary, generates a fresh 0a.cfg, and opens First-Time Setup.


Quick Start & End-to-End Flow (Android & Android TV)

  1. Install & Choose Your Config Folder (First Launch)

    • Install 0app-v1.0.1-android-universal.apk from Releases on any Android phone, tablet, or Android TV / Google TV device (Android 7.0+ / API 24+).
    • On first launch (if Documents/0app/ is not already directly writable), choose where 0app reads 0a.cfg and extracts 0app.html:
      • Select Folder via Scoped Storage: Pick Documents/0app (or any folder) via Android's system folder picker with zero special permissions.
      • Grant Direct Documents/0app/ Access: Uses Android 11+ All Files Access — ideal for Android TV boxes and direct file:///storage/emulated/0/Documents/0app/ paths.
      • Use App Media Folder: Instant zero-permission setup at Android/media/app.zero.wrapper/0app/ (still visible in standard Android file managers).
  2. Graphical First-Time Setup (0app.html)

    • Whenever 0a.cfg is not found in the active folder, 0app extracts a fresh 0app.html beside where 0a.cfg will live and opens the graphical setup wizard:
      • Target & Name: Enter any https:// / http:// URL, absolute file:/// path, or relative local .html file placed inside the folder, plus an optional App Display Name (app_name).
      • App Icon Studio (0a.png / 0a.ico): Choose an image or multi-size Windows .ico from your device, fetch the target site's PWA manifest icon / apple-touch-icon / /favicon.ico in one tap, pick a framing mode (Fit & Center, Rounded Dark Badge, or Fill Square), or drop 0a.png / Windows 0a.ico directly into the folder.
      • UI, Device & Security Toggles: Configure floating on-screen navigation controls, immersive fullscreen, forced orientation (auto / landscape / portrait), Android TV D-pad navigation, mixed content, DOM storage, local file access, media autoplay, and self-signed LAN SSL support.
    • Tap Save 0a.cfg & Launch — 0app writes 0a.cfg (and 0a.png if staged) and opens your app in a brand-new, history-free WebView session (pressing Back at your app's root exits cleanly and never drops back into setup).
  3. Normal Daily Launch

    • Tapping 0app in your App Drawer, Home Screen, or Android TV Launcher always opens directly into your active configured web app.
  4. Long-Press Config & Standalone APK Export Console

    • To manage apps or export standalone APKs without interrupting the direct-launch flow, long-press the 0app launcher icon and tap Config Console (or on Android TV remotes, press MENU or hold BACK for ~0.65s; also accessible via ⋯ when on-screen navigation controls are enabled).
    • From the 0app Config & Export Console, every configured app profile card offers:
      • Export APK (Standalone App-Drawer Clone): Self-clones 0app directly on-device into an independent, APK Signature Scheme v2-signed .apk with:
        • Your chosen App Name and a deterministic unique Android package ID (app.zero.clone.a_<slug>_<hash6>),
        • Your custom Adaptive Launcher Icon (108dp safe-zone framed) and custom 320×180 Android TV Leanback Banner baked directly into the APK's resources,
        • Optional local folder bundling to pack local HTML/CSS/JS/image/font files inside the APK for 100% self-contained offline apps,
        • 0a.cfg locked inside the APK with no Config Console, no long-press shortcuts, no First-Time Setup wizard, no storage prompts, and no ⋯ / MENU / hold-BACK management menus,
        • 100% isolated WebView cookies, localStorage, IndexedDB, and Recents cards — tap Install APK Now to install side-by-side in the real Android App Drawer & Android TV Launcher (or Share APK / grab the saved copy from <profile>/exports/<AppName>.apk). Re-exporting the same app later upgrades it cleanly in-place without losing login sessions thanks to 0app's persistent on-device RSA-2048 signing key.
      • Home Shortcut: Pins a lightweight Home Screen shortcut targeting that profile folder (with automatic live in-place icon & label updates whenever 0a.png / 0a.ico or app_name changes).
      • Edit Config: Opens 0app.html pre-populated with that profile's existing 0a.cfg and custom icon for graphical editing.
      • Remove / Reset: Prompts with a confirmation warning, disables any pinned Home Screen shortcut for that profile, and deletes the subfolder profile (or resets the root 0app folder back to First-Time Setup). Already-installed exported APKs are completely standalone and unaffected.
      • + New App Setup: Creates a clean subfolder (Documents/0app/<app>/) and launches First-Time Setup so you can configure and export additional apps anytime.
  5. External Browser Detection & Self-Healing Reset (.old / .00old+)

    • Hidden Outside-Container View: If 0app.html is opened outside the 0app WebView container (for example, in mobile Chrome or an HTML viewer), interactive setup controls stay hidden and an alternate static reference page explains 0app and how to reset it.
    • Reset by Deleting 0a.cfg: Delete 0a.cfg in any profile folder using a standard Android file manager and launch 0app (or return to it from the background):
      • If 0app.html exists and 0app.html.old does not exist yet, 0app renames 0app.html → 0app.html.old first.
      • If 0app.html.old already exists, 0app byte-diffs the live 0app.html against its known-good internal APK asset copy — rotating modified files to 0app.html.00old, 0app.html.01old, 0app.html.02old, … (skipping redundant backups if untouched) — before extracting a clean 0app.html and opening First-Time Setup.

Windows Portable Key Features

1. Truly Portable & Multi-Copy Isolated

  • Requires no installation and no Administrator / UAC privileges (asInvoker).
  • Derives its default window title, system tray tooltip, unique Windows Taskbar AppUserModelId, single-instance lock, and isolated Chromium profile automatically from the renamed .exe path — so C:\Apps\Router\Router.exe and C:\Apps\Plex\Plex.exe run side-by-side with completely separate sessions and taskbar buttons.
  • Keeps your folder clean by default (storing session cache per-instance under %APPDATA%\0app\profiles\), or set portable_profile = true in 0a.cfg to keep cookies and storage inside ./.0a-data next to the .exe for USB-stick portability.
  • Optional Shared-Runtime Companion (bkx): If you manage many 0app instances on Windows and want to avoid keeping a separate portable 0app.exe binary in each folder, bkx can adopt 0app folders into a single shared Electron runtime (preserving cookies and 0a.cfg) and export them back to standalone portable folders at any time.

2. Custom OS App Icons (0a.ico)

  • Leave the portable binary untouched on disk while customizing every live OS icon surface (Windows Taskbar, Native Title Bar, Alt+Tab, Custom Frameless Title Bar, Popup Windows, and System Tray):
    • Guided Image-to-ICO Converter: Drag and drop any .png, .jpg, .svg, .webp, .bmp, .gif, or .avif into First-Time Setup to resample it into a crisp 5-resolution (256×256, 64×64, 48×48, 32×32, 16×16) Windows 0a.ico with live 64px / 32px / 16px previews and framing modes (Fit & Center, Rounded Dark Badge, or Fill Square).
    • Direct .ico Pass-Through: Drop an existing .ico file and 0app passes its raw bytes straight through to 0a.ico untouched.
    • 1-Click Favicon Fetch: Pulls <link rel="icon"> / apple-touch-icon / /favicon.ico directly from your target URL (even over self-signed TLS or internal [hosts] overrides).
    • Manual Drop-In & Cross-Platform Sharing: Dropping any 0a.ico file beside 0a.cfg is detected automatically on both Windows and Android (icon = auto).

3. Guided Setup (0a.html) & Self-Healing Reset

  • Inside 0app.exe, 0a.html receives a strictly origin-gated setup bridge (window.zeroApp — never exposed to external websites or other files) providing layout presets (Standalone App, Mini Browser, Frameless / Wallboard, System Tray Utility), interactive toggles, and a live 0a.cfg preview.
  • Opening 0a.html directly in Chrome, Edge, or Firefox outside of 0app.exe switches to a static recovery & reference page.
  • Deleting 0a.cfg next to the .exe triggers the same self-healing reset rotation (0a.html.old, then byte-diffed 0a.html.00old, .01old, …) before extracting fresh copies of 0a.html and 0a.cfg.

4. Passive-by-Default Security & Internal [hosts] Overrides

Built for real-world internal tools, homelabs, routers, IPMI/KVMs, and legacy portals:

  • Passive Security (Default): CORS / same-origin / XSS blocks off (web_security = false), mixed HTTP-in-HTTPS allowed (allow_insecure_content = true), self-signed/expired TLS certificates accepted (ignore_cert_errors = true), and restrictive CSP / X-Frame-Options / X-XSS-Protection / COOP headers stripped (strip_security_headers = true). All individually toggleable back to strict browser mode.
  • Local File Access (On by Default): Load file:// URLs and relative local HTML applications seamlessly (local_file_access = true).
  • Internal Hosts Overrides ([hosts]): Map custom domains or wildcards (*.lab.local = 192.168.1.50) directly to IPs inside 0app.exe via Chromium's host resolver — zero Admin privileges and zero edits to C:\Windows\System32\drivers\etc\hosts.

5. Full Window Chrome, Browser Toolbar & System Tray Control

  • 4 Window Frame Modes: Native OS Title Bar + Border, Custom Slim Title Bar without Border, Bordered Captionless Window (with custom hex border_color), or 100% Pure Borderless Frameless Canvas.
  • Optional Navigation Chrome: Toggle address_bar, back_forward, refresh_button, and home_button individually (when all four are false, the toolbar disappears completely for a 100% edge-to-edge web app viewport).
  • System Tray Integration: Optional tray_icon, minimize_to_tray, close_to_tray, and start_in_tray with right-click quick actions (Open, Reload, Go Home, Edit 0a.cfg, Show in Folder, Quit).

0a.cfg Configuration Reference

Booleans accept true/false, on/off, yes/no, or 1/0. Both editions share a forgiving INI parser so a folder containing 0a.cfg + 0a.ico can be copied directly between Windows and Android.

Windows Desktop Keys (examples/0a.cfg)

Section Key Default Description
[app] url 0a.html Target https://, http://, file:///, bare IP/domain, or local HTML path relative to the .exe
[app] title auto Window title (auto uses page title + renamed .exe name, or specify a fixed title)
[app] icon auto auto uses 0a.ico beside 0a.cfg if present (builtin forces built-in icon, or specify a custom .ico path)
[app] single_instance true Re-launching the same .exe focuses its existing window (even from the system tray)
[app] portable_profile false true stores cookies/cache in ./.0a-data next to the .exe; false keeps the folder clean
[window] width / height 1280 / 820 Default window size in pixels (shorthand window_size = 1280x820 also supported)
[window] min_width / min_height 360 / 240 Minimum window dimensions (0 = unrestricted)
[window] max_width / max_height 0 / 0 Maximum window dimensions (0 = unrestricted)
[window] title_bar true Show window title/caption bar
[window] border true Show window border outline
[window] border_color #334155 Custom border hex color when using frameless border mode
[window] resizable true Allow interactive window resizing
[window] minimizable / maximizable true / true Enable minimize and maximize window controls
[window] always_on_top false Float window above standard desktop windows
[window] start_state normal normal, maximized, minimized, or fullscreen
[browser] address_bar false Show editable URL bar at top of window
[browser] back_forward false Show Back & Forward navigation buttons
[browser] refresh_button false Show Refresh/Stop button
[browser] home_button false Show Home button returning to configured url
[browser] zoom 100 Default page zoom percentage (25 – 400)
[browser] dark_mode_filter false Apply smart dark-mode inversion filter for bright legacy pages
[browser] devtools false Enable F12 / Ctrl+Shift+I & right-click Inspect Element
[browser] user_agent (empty) Optional custom User-Agent string
[tray] tray_icon false Show icon & quick-actions menu in the Windows notification area
[tray] minimize_to_tray false Minimizing hides the window into the system tray
[tray] close_to_tray false Closing (X) hides to system tray (use Tray → Quit to exit)
[tray] start_in_tray false Launch quietly into the system tray
[security] web_security false false = passive (CORS / same-origin / XSS blocks off); true = strict browser isolation
[security] allow_insecure_content true Allow HTTPS pages to load mixed HTTP scripts, frames, and APIs
[security] ignore_cert_errors true Accept self-signed, internal CA, or expired TLS certificates
[security] strip_security_headers true Strip restrictive CSP, X-Frame-Options, X-XSS-Protection, and COOP/COEP headers
[security] local_file_access true Allow file:// URLs and local filesystem asset requests
[hosts] <host> = <ip> (none) Internal hostname/wildcard-to-IP overrides (portal.internal = 10.10.20.15, *.lab.local = 192.168.1.50, or /etc/hosts 192.168.1.1 router.lan)

Android & Android TV Keys

Section Key Default Description
[app] url (setup) Target https://, http://, file:///..., or local HTML filename relative to the profile folder
[app] app_name (or title) (folder) Display name for Exported Standalone APKs, Home Screen Shortcuts, Android Recents & TV cards
[app] icon auto auto uses 0a.png or Windows 0a.ico beside 0a.cfg if present (builtin forces monogram, or <path>)
[ui] nav_controls false Show collapsible floating navigation bar (Back, Forward, Refresh, and 0app Menu)
[ui] immersive_fullscreen false Hide Android status & navigation bars in sticky immersive fullscreen (also maps start_state = fullscreen)
[device] orientation auto auto, landscape (sensor landscape), or portrait (sensor portrait)
[device] tv_dpad_navigation auto auto (enabled on Android TV), true, or false — spatial D-pad focus ring & remote media key support
[security] mixed_content true true (relaxed, allow HTTP in HTTPS), compatibility, or false (strict; also maps allow_insecure_content)
[security] dom_storage true Enable localStorage, sessionStorage, and IndexedDB
[security] local_file_access true Allow file:// URLs, Scoped Storage local HTML assets, and bundled local files in exported APKs
[security] javascript true Enable JavaScript execution in WebView
[security] media_autoplay true Allow audio/video streams to play without requiring an initial tap gesture
[security] ignore_ssl_errors false Accept self-signed / untrusted LAN HTTPS certificates (also maps desktop ignore_cert_errors)
[security] user_agent (empty) Optional preset (desktop, tv, mobile) or full custom User-Agent string

Repository Structure

0app/
├── assets/
│   ├── 0a.html                # Windows embedded First-Time Setup GUI + outside-container static page
│   ├── 0app.ico / 0app.png    # Vector-generated multi-size Windows icon & 256px emblem
│   └── shell.html             # Lightweight outer desktop chrome (border, custom titlebar, toolbar)
├── examples/
│   └── 0a.cfg                 # Reference default 0a.cfg configuration template
├── src/
│   ├── main.ts                # Electron main process, portable identity, tray, security, favicon fetch
│   ├── config.ts              # Forgiving 0a.cfg INI parser, serializer & URL/host-rule resolvers
│   ├── iconUtils.ts           # Multi-size PNG-to-ICO encoder, .ico pass-through & 0a.ico resolver
│   ├── setupRestore.ts        # Missing-0a.cfg detection & 0a.html .old / .00old+ backup rotation
│   ├── preload-guest.ts       # Strict origin-gated setup bridge (only active on local 0a.html)
│   └── preload-shell.ts       # Outer window chrome IPC bridge
├── test/
│   └── run-tests.ts           # Automated Windows unit & integration tests
├── scripts/
│   ├── generate-icon.ps1      # Renders multi-resolution 0app.ico & 0app.png
│   ├── build-portable.js      # Builds standalone portable 0app.exe via electron-builder
│   └── package-release.js     # Packages release/ folder, GitHub Release .zip, .apk & SHA256SUMS.txt
├── app/                       # Universal Android & Android TV Kotlin/Gradle module
│   └── src/main/
│       ├── assets/0app.html   # Android First-Time Setup + Icon Studio + external-browser static view
│       └── kotlin/app/zero/wrapper/
│           ├── MainActivity.kt              # Direct WebView runtime, Locked Clone boot & TV key handling
│           ├── apk/                         # On-device binary manifest patcher, APK cloner & v2 signer
│           ├── ui/ManagementConsoleDialogs.kt # Long-press Config & Standalone APK Export Console
│           ├── icon/                        # 0a.png / Windows 0a.ico decoder, favicon fetcher & remapper
│           ├── storage/                     # Direct + Scoped Storage (SAF) folders & .old/.00old reset
│           ├── shortcut/ShortcutHelper.kt   # Adaptive Home Screen & dynamic launcher shortcut sync
│           └── webview/TvDpadHelper.kt      # Android TV Leanback D-pad focus & media remote support
└── .github/workflows/
    └── release.yml            # Automated GitHub Actions build & release workflow on v* tags

Building from Source

Windows Portable (0app.exe)

Prerequisites: Node.js 20+ on Windows (PowerShell 7 pwsh recommended for icon regeneration).

# Install dev dependencies
npm install

# Run automated unit & integration tests
npm test

# Build standalone 0app.exe + package GitHub Release zip & checksums into release/
npm run dist

Android & Android TV (0app.apk)

Prerequisites: JDK 17+ (JDK 17 or 21) and Android SDK (ANDROID_HOME configured).

# Run Android unit & cloned-APK verification tests
.\gradlew.bat testDebugUnitTest

# Build universal release APK & copy into release/ with updated SHA256SUMS.txt
npm run android:dist

All GitHub Release deliverables (0app-v*-windows-x64-portable.zip, 0app-v*-android-universal.apk, SHA256SUMS.txt, RELEASE_NOTES.md, and the unzipped 0app-portable/ folder) are output to release/.


License

Released under the MIT License.

About

Zero-bloat, config-driven web & local-HTML app container for Windows, Android & Android TV.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages