$ show shiaho777/web-to-app
An Android application that converts websites and web applications into standalone native Android APK/AAB packages. It bundles multiple server runtimes (Python, Node.js, PHP, Go) and generates a self-contained app that runs the web server on-device, providing a full native shell with WebView/GeckoView rendering. The app also includes an AI agent system that can read, edit, and manage web app projects, a Chrome extension module system, privacy isolation features, and a comprehensive APK builder with binary XML patching, permission pruning, and signing. The codebase is well-structured with a modular design (app, shell, clone-host), extensive test coverage, and a strong emphasis on security and privacy.
The LLM identified 6 files worth highlighting for reuse:
A self-contained utility for ZIP file operations including DEFLATED and STORED entry writing, CRC computation, and streaming large file data. It handles both in-memory and file-based input, making it reusable for any ZIP-related task in Android or JVM projects.
Implements a Longest Common Subsequence (LCS) based line diff algorithm. It can compute deletions, insertions, and replacements between two string lists, returning a compact diff representation. This is a classic algorithm cleanly implemented and could be extracted for any text diffing need.
A sealed class providing a functional error handling pattern with success and error states, including typed error codes. It offers factory methods (ok, error) and is used throughout the codebase. The pattern is clean and reusable in any Kotlin application that needs structured error representation.
A generic storage class for managing named configuration presets. It supports save, load, list, and delete operations using JSON serialization. The implementation is straightforward and abstracted from the config type, making it reusable for any project needing preset management with file-based persistence.
A utility for securely managing sensitive data in memory. It provides SecureBytes and SecureString wrappers that zero out the underlying byte array when garbage collected, using PhantomReference and a cleanup thread. This pattern is critical for cryptographic applications and can be extracted as a standalone security library.
A Python script that validates that all fields in the ApkConfig payload JSON have corresponding @SerializedName annotations in the ShellConfig class. It uses a documented allowlist for exceptions. This is a pragmatic maintenance tool that prevents configuration drift between client and shell, and can be adapted for any project with serialization consistency requirements.