$ show TrianguloY/URLCheck
URLCheck is an Android application that operates as a URL interception and analysis tool. When a user opens or shares a URL, URLCheck intercepts it before the target app, displaying a dialog with detailed information and offering a modular processing pipeline. The system is composed of pluggable modules (e.g., pattern checker, URL cleaner using ClearURLs rules, VirusTotal scanner, unshortener, host labeler using StevenBlack lists, status code checker, intent flag editor, webhook, and more). These modules follow a consistent lifecycle (onPrepareUrl, onModifyUrl, onDisplayUrl, onFinishUrl) and can be enabled, disabled, or reordered. The app integrates with external services (VirusTotal API, unshorten.me, custom webhooks) and supports user-defined automation rules that trigger module actions based on URL patterns. It also features a backup/restore system, JSON configuration editors, a tutorial, and extensive localization (20+ languages). The architecture is clean and extensible, with several self-contained utility classes that could be extracted for use in other Android projects. Technical drift includes reliance on non-public Android APIs (e.g., ObjectAnimator, ValueAnimator) and reflection in the JSON editor, as well as external service dependencies that may change.
The LLM identified 4 files worth highlighting for reuse:
Provides type-safe wrappers around Android SharedPreferences (BoolPref, IntPref, StringPref, EnumerationPref, ListStringPref). Each pref subclass encapsulates storage key, default value, and UI attachment methods (switch, spinner, seekbar, edittext). This is a reusable utility for any Android app needing clean preference management without boilerplate.
A base class for JSON-based editable catalogs used by ClearURLs, patterns, hosts, and automation rules. Provides built-in/reset/editor functionality, loading from assets or remote URLs with caching, and a simple interface for updating the JSON. This pattern is reusable for any app that needs to manage versioned JSON data sets with user overrides.
Extends JsonCatalog to define automation rules: each rule has a regex pattern, optional exclude regex and referrer filter, and a list of actions (open, unshorten, webhook, toast, etc.). Implements evaluation logic that matches current URL against rules and executes corresponding module actions. Demonstrates a clean, extensible rule engine that could be reused for any trigger-action automation system.
A lightweight wrapper for reading entries from a zip file. Provides methods to iterate over entries, read as string or bytes, and handle exceptions gracefully. The companion ZipWriter is similarly simple. These are standalone utilities that could be extracted for any Java/Android project requiring zip file manipulation without adding a heavyweight library.