项目将重构,此版本问题太多且基本不可用 A modern Android Root universal module management web UI built with Vite — a modular, plugin-friendly frontend for Android Root modules and tooling.
一个基于 Vite 构建的现代化安卓 Root 通用模块管理 Web 界面,提供模块化页面系统、插件开发能力与国际化支持。
- Quick Start / 快速开始
- Prerequisites / 环境要求
- Install & Run / 安装与运行
- Build & Packaging / 构建与打包
- Dependency Updates / 依赖更新说明
- Development Tips / 开发建议
- Docs / 文档
- CI / 持续集成
- Contributing / 贡献指南
- License / 许可证
Clone the repository, install dependencies, and run the dev server.
克隆仓库、安装依赖并运行开发服务器。
# Clone
git clone https://github.com/MemDeco-WG/ModuleWebUI.git
cd ModuleWebUI
# Install
npm ci # preferred in CI
# or
npm install
# Run the dev server
npm run dev
# Open http://localhost:5173 (default Vite port)- Node.js (LTS recommended) — the project CI targets Node 16, 18, 20, and step used Node 22 for some checks. Use Node >= 16; Node 22 is recommended for local testing.
- npm (>= 8)
- Bash / POSIX shell for
build.sh(on Windows use WSL / Git Bash)
- Use
npm ciin CI environments for reproducible installs, ornpm installlocally. - Start dev server:
npm run dev- Preview production build locally:
npm run build:prod
npm run preview- Use
./build.shto build a packaged module and replaceModuleWebUIwith your module ID:
# Build for module id "com.example.MyModule"
./build.sh com.example.MyModuleNotes:
build.shwill callnpm ciifnode_modulesdoes not exist.build.shreplaces the stringModuleWebUIinsrcandindex.htmlwith the provided module id before running the production build.
npm run build— creates a development build using Vite.npm run build:prod— creates a production build (minified and optimized).npm run analyze— helps analyze sizes during build.
The final build artifacts are output to dist/. build.sh helps prepare a module for packaging by replacing the default internal module ID.
This repository maintains dependencies via package.json. Recent dependency updates include safe, non-breaking minor/patch bumps. Example of dependencies set in package.json:
vite: ^7.0.0 (dev dependency)esbuild: ^0.25.12fdir: ^6.5.0glob: ^11.1.0rollup: ^4.53.3tinyglobby: ^0.2.15- Others (picocolors, picomatch, postcss, ...)
How to check for outdated dependencies:
npm outdatedHow to safely update dependencies:
-
Non-breaking updates (safe upgrades):
npm update
This upgrades to the latest matching semver versions according to
package.json(no major versions). -
Major updates (requires manual testing):
- Use
npm install package@latestto install a major update. - Or use
npx npm-check-updates -uto updatepackage.jsonto newer major versions, then runnpm install. - After major updates, carefully test builds and runtime behavior.
- Use
-
Audit vulnerabilities:
npm audit npm audit fix # may be used, but pay attention to major changes
Important: Always run builds & tests (or CI pipeline) after dependency upgrades, and verify changes do not introduce breaking behavior. Some modules have breaking changes across major versions — e.g., nanoid major upgrades changed ESM/CommonJS behavior. Be careful when updating major versions.
- Pages & modules: This project organizes page modules independently. Each page module has lifecycle hooks and can be dynamically loaded. See
src/pages.jsonandsrc/pages/for examples. - Plugins: The plugin system allows adding header/footer buttons, UI changes, actions, and listening to events.
- i18n: The project supports multiple locales. Language pack contributions are supported via
src/i18nandsettings.json. - Use the
index.htmlas the entry point and the modules insrc/modules/*.
Troubleshooting:
- If
sedfails on macOS with-iusage, adjust thebuild.shor run the replacement manually with the macOSsedform:# For macOS find src -name "*.js" -exec sed -i '' "s/ModuleWebUI/${MODID}/g" {} \; sed -i '' "s/ModuleWebUI/${MODID}/g" index.html
- For Windows, use WSL, Git Bash, or modify
build.shto use cross-platform tools.
Further developer/user documentation is available in the docs/ folder:
docs/README.md(中文)docs/README.en.md(English)docs/user.md|docs/user-en.md— user documentationdocs/page-module-development.md|docs/page-module-development.en.md— Page module development guidedocs/plugin-development.md|docs/plugin-development.en.md— Plugin development guide
Use these to learn how to create new pages, custom plugins, and localization.
This repository includes GitHub Actions CI:
.github/workflows/ci.ymlruns build & quality checks.- CI uses
npm cito install dependencies and runbuild.sh. - The build matrix checks Node 16, 18, and 20; one step uses Node 22 to validate certain tooling (like Vite).
Note: Ensure packages remain compatible with Node versions you plan to support.
Contributions are welcome.
Suggested workflow:
- Fork the repository and create a feature branch.
- Make changes or fixes.
- Run
npm installandnpm run devto verify local behavior. - Build with
./build.sh <MODID>to confirm packaging. - Open a PR with a clear description and link to documentation if adding features.
Please adhere to repository guidelines and ensure your changes are properly tested.
ModuleWebUI is released under the MIT License. See the LICENSE file for full terms.
- Built with Vite, Rollup, and many open-source libraries (see
package.json). - Thanks to contributors & community for bug fixes and improvements.
If you need further help or a more specific README section (examples, API docs, or CI customization), let me know which area to expand.