npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hbh-web2app

v0.0.2

Published

Simple WEB2Apk Generator By - HBH

Readme

🧩 HBH-WEB2APP — Convert Any Website / HTML Folder Into Android APK

HBH-WEB2APP is a Node.js-based Android APK generator that converts any website, local folder, or zip archive into a full Android application — automatically.

✔ No Android Studio ✔ No Gradle knowledge ✔ Runs on Windows, macOS, Linux ✔ Full offline build system ✔ Auto-installs Java + Android SDK ✔ Custom App Name, Package Name, Icons


🚀 Features

  • 🧱 Generate APK from URL, HTML folder, or ZIP
  • 🎨 Auto-generate adaptive Android icons (sharp)
  • 🏗 Full Gradle Build System
  • 🛠 Automatic Android SDK + Java 17 installer
  • 🗂 Full asset pipeline
  • 🔄 Template-based build workflow
  • 📦 Batch build support
  • Execution time tracker
  • 🧹 Safe template extraction system

📦 Installation

npm install hbh-web2app

Or globally:

npm install -g hbh-web2app

🛠 Setup Android Build Environment

Before building an APK, run:

✔ Check SDK & Java

npm run check-sdk

or

✔ Check SDK & Java (manually)

const { CheckSDK } = require("hbh-web2app");

async function verifySDK() {
  const result = await CheckSDK();
  console.log(result);
}

verifySDK();

This function will check if your system already has the required:

  • OpenJDK 17
  • Android SDK command-line tools
  • Platform-tools and Build-tools
  • Required Android platform

✔ Install Android SDK + Java (portable — inside your project)

npm run install-sdk

or

✔ Install Android SDK + Java manually

const { InstallSDK } = require("hbh-web2app");

async function setupSDK() {
  await InstallSDK(/*SDK_PATH: optional*/);
  console.log("SDK + Java installed locally!");
}

setupSDK();

This installs:

  • OpenJDK 17
  • Android command-line tools
  • Platform-tools
  • Build-tools 34.0.0
  • Android platform 34

It also automatically sets required environment variables.


🧪 Example Usage

1. Generate one APK

const { GenerateApp } = require("hbh-web2app");

GenerateApp({
  appName: "HBHGoogle",
  packageName: "hbh.sites.google",
  asset: "https://www.google.com/", // URL OR Folder OR Zip
  appIcon: "https://www.google.com/favicon.ico" // URL OR local_path
});

2. Use Local Folder as App Content

GenerateApp({
  appName: "LocalSite",
  packageName: "com.local.site",
  asset: "./my-website-folder"
});

3. Use ZIP File as App Content

GenerateApp({
  appName: "ZippedWebsite",
  packageName: "com.zip.site",
  asset: "./site.zip"
});

4. Build Multiple Apps Automatically

const { GenerateApps } = require("hbh-web2app");

GenerateApps([
  {
    appName: "AppOne",
    packageName: "com.app.one",
    asset: "https://google.com"
  },
  {
    appName: "AppTwo",
    packageName: "com.app.two",
    asset: "./localfolder"
  }
]);

📁 Output

APK files are generated here:

/output/<AppName>/<AppName>.apk

Example:

output/MyWebApp/MyWebApp.apk

🧬 Project Structure (Internal Overview)

app/
 ├─ builder.js          # Main build system
 ├─ helpers/            # logger, unzip, icon generator, etc.
 ├─ tasks/              # assets, build, applyConfig, etc.
 ├─ utils/              # TrackTimeWrapper
 ├─ setupWorkflow.js    # safe extraction + cleanup
 ├─ config.js
checking.js             # SDK checker
installer.js            # SDK & Java installer
index.js                # Main exports

⚙ API – Configuration Options

| Option | Type | Description | | ------------- | ------ | ------------------------ | | appName | string | Android app name | | packageName | string | e.g. com.example.app | | asset | string | URL, folder, or zip path | | appIcon | string | PNG/JPEG/WebP image |


🎨 Icons

App icons are auto-generated into:

mipmap-mdpi
mipmap-hdpi
mipmap-xhdpi
mipmap-xxhdpi
mipmap-xxxhdpi

Each converted to:

ic_launcher_foreground.webp

🔧 Built-In Commands

| Command | Description | | --------------------- | -------------------------- | | npm run check-sdk | Check Java + Android SDK | | npm run install-sdk | Install SDK + Java locally |


🧑‍💻 Requirements

  • Node.js >= 16
  • Windows / macOS / Linux
  • 4GB free space for SDK install
  • Internet (if using URL or installer)

💬 Author

HBH Creator of HBH-WEB2APP


📄 License

ISC License