VHost Manager v2.0: - Add modern dashboard UI with auto-refresh for Internal Services, Redirects, and Virtual Hosts tabs - Implement template activation system with one-click deployment (19 services, 6 redirects) - Add section_id parameter to RPC backend for named VHost profiles - Enhance API with createVHost() wrapper for template-based creation - Fix redirect support with nginx return directive validation - Add action buttons (Edit/Enable/Disable/Remove) to all VHost cards - Implement confirmation modals for destructive actions - Update README with comprehensive v2.0 feature documentation - Add templates.json catalog with pre-configured service/redirect templates Network Tweaks v1.0: - Create network services dashboard with dynamic component discovery - Add RPC backend with component filtering by network capabilities - Implement cumulative impact tracking (DNS entries, VHosts, ports) - Add network mode integration for profile-based settings - Create dashboard.css with responsive grid layouts - Add 10-second auto-refresh polling for live status updates New Applications: - Add luci-app-magicmirror (Smart mirror application) - Add secubox-app-magicmirror with Docker runtime - Add luci-app-network-tweaks (Network services monitoring) - Add secubox-app-adguardhome (DNS filtering) - Add secubox-app-nextcloud (File sync and sharing) - Add plugin catalog manifests for AdGuard Home, MagicMirror, Nextcloud Bug Fixes: - Fix RPC backend shell script errors (remove local declarations from case statements) - Fix fs.exec usage in vhosts.js (replace with uci module) - Fix form rendering in Virtual Hosts view (use proper LuCI patterns) - Fix file ownership issues (ensure root:root for deployed files) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3.9 KiB
3.9 KiB
Copilot / AI assistant instructions for SecuBox
Short, actionable notes to help an AI coding agent become productive immediately in this repository.
- Big picture
- This repo is a collection of LuCI OpenWrt packages (each
luci-app-*is a self-contained module). Key folders:luci-app-secubox/,luci-app-system-hub/,secubox-tools/,templates/, and.github/workflows/(CI builds multi-arch OpenWrt packages).
- Critical conventions (must follow)
- RPCD ubus objects ALWAYS use the
luci.prefix and the RPCD filename must match the object (e.g. backendroot/usr/libexec/rpcd/luci.system-hub→ JS usesobject: 'luci.system-hub'). - Menu JSON path must match view file paths: menu action
path: "netifyd-dashboard/overview"→ view athtdocs/luci-static/resources/view/netifyd-dashboard/overview.js. - File permissions: RPCD scripts
755, CSS/JS644. Use./secubox-tools/fix-permissions.sh --localbefore commits.
- Build, validate, deploy (commands you should use)
- Quick validation:
./secubox-tools/validate-modules.sh(7 checks: RPCD names, menu paths, JSON, permissions, ubus naming, view existence, htdocs perms). - Local reproduce of CI:
./secubox-tools/local-build.sh buildor./secubox-tools/local-build.sh build luci-app-system-hub. - OpenWrt SDK builds:
make package/luci-app-<module>/compile V=s(when inside the OpenWrt SDK tree). - Install on device:
scp bin/packages/*/base/luci-app-*.ipk root@router:/tmp/thenopkg install /tmp/luci-app-*.ipkand restart services (/etc/init.d/rpcd restart).
- Important files to consult (examples)
- Global developer guides:
README.md,DOCS/CLAUDE.md,docs/development-guidelines.md(contains naming, CSS, JS, and RPCD patterns). - Validation & tooling:
secubox-tools/validate-modules.sh,secubox-tools/local-build.sh,secubox-tools/fix-permissions.sh. - CI:
.github/workflows/build-openwrt-packages.yml,.github/workflows/test-validate.yml.
- Frontend ↔ backend patterns to preserve
- Frontend API modules live under
htdocs/luci-static/resources/(example:htdocs/.../api.js). They call ubus objects declared likeobject: 'luci.<module>'and expect JSON responses. - Backends are simple shell RPCD scripts under
root/usr/libexec/rpcd/that must emit JSON to stdout and be executable.
- Style & UI rules (enforced by docs)
- Use CSS variables defined in the design system (
system-hub/common.cssand the docs). Never hardcode palette colors; prefervar(--sh-*)variables. - Page header and card patterns are required (
.sh-page-header,.sh-cardwith 3px top border). Seedocs/development-guidelines.mdfor exact components.
- When you change package metadata
- Keep
PKG_VERSIONandLUCI_TITLEin the packageMakefilein sync with UI version chips (UI reads package control info). UpdateREADME.mdin the package folder too.
- Integration & edge cases
- Builds target multiple architectures; running the
local-build.shwith--archmimics CI. Packaging format may be.ipkor.apkdepending onOPENWRT_VERSION(seeDOCS/CLAUDE.md). - When investigating runtime failures on a device, check permissions, ubus object names, and menu path mismatches first — these are the most frequent causes.
- Quick heuristics for edits
- Changing a view: update the JS under
htdocs/luci-static/resources/view/<module>/, ensure menu JSONroot/usr/share/luci/menu.d/*.jsonpath matches, run validation script. - Adding backend RPC: add
root/usr/libexec/rpcd/luci.<module>executable, add ACL JSON inroot/usr/share/rpcd/acl.d/, runvalidate-modules.shandshellcheckon the script.
- Ask the maintainer when uncertain
- If a change affects CI packaging, architectures, or the
OPENWRT_VERSIONused bylocal-build.sh, ask before modifying.github/workflows/*orsecubox-toolsdefaults.
Please review these notes — tell me which areas need more detail (examples, diffs, or workflow snippets) and I will iterate.