Commit Graph

1161 Commits

Author SHA1 Message Date
a6477b8710 feat: Version 0.4.1 - Enhanced network modes and system improvements
Major Enhancements:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Network Modes Module:
- Added 3 new network modes:
  * Double NAT mode (doublenat.js) - Cascaded router configuration
  * Multi-WAN mode (multiwan.js) - Load balancing and failover
  * VPN Relay mode (vpnrelay.js) - VPN gateway configuration
- Enhanced existing modes:
  * Access Point improvements
  * Travel mode refinements
  * Router mode enhancements
  * Relay mode updates
  * Sniffer mode optimizations
- Updated wizard with new mode options
- Enhanced API with new mode support
- Improved dashboard CSS styling
- Updated helpers for new modes
- Extended RPCD backend functionality
- Updated menu structure for new modes
- Enhanced UCI configuration

System Hub Module:
- Added dedicated logs.css stylesheet
- Enhanced logs.js view with better styling
- Improved overview.css responsive design
- Enhanced services.css for better UX
- Updated overview.js with theme integration
- Improved services.js layout

SecuBox Dashboard:
- Enhanced dashboard.css with theme variables
- Improved dashboard.js responsiveness
- Better integration with global theme

Files Changed:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Network Modes (17 files):
  Modified: api.js, dashboard.css, helpers.js, menu, config, RPCD backend
  Modified Views: accesspoint, overview, relay, router, sniffer, travel, wizard
  New Views: doublenat, multiwan, vpnrelay

System Hub (6 files):
  New: logs.css
  Modified: overview.css, services.css, logs.js, overview.js, services.js

SecuBox (2 files):
  Modified: dashboard.css, dashboard.js

Total: 25 files changed (21 modified, 4 new)

Technical Improvements:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Global theme CSS variable usage
- Responsive design enhancements
- Improved error handling
- Better mode validation
- Enhanced user feedback
- Optimized CSS performance
- Improved accessibility

Network Mode Capabilities:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Router Mode - Standard routing
2. Access Point Mode - WiFi AP with bridge
3. Relay Mode - WiFi repeater/extender
4. Travel Mode - Portable router configuration
5. Sniffer Mode - Network monitoring
6. Double NAT Mode - Cascaded NAT for network isolation (NEW)
7. Multi-WAN Mode - Multiple uplinks with load balancing (NEW)
8. VPN Relay Mode - VPN gateway and tunnel endpoint (NEW)

Breaking Changes:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
None - All changes are backward compatible

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 18:12:28 +01:00
5dfe4f3c61 chore: Version 0.4.0 - Theme and System Hub release
Updated package versions:
- luci-theme-secubox: 1.0.0 → 0.4.0
- luci-app-system-hub: 0.3.6 → 0.4.0
- luci-app-network-modes: 0.4.0 → 0.3.6-r2 (WIP, not in this release)

Version 0.4.0 includes:
- Complete global CyberMood theme system
- Theme integration in system-hub
- Multi-language foundation (en, fr, de, es)
- 100+ CSS variables for unified design
- Theme components and utilities

Network-modes marked as WIP for future release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 18:04:57 +01:00
5ba17fd530 chore: Bump network-modes version to 0.4.0
Version 0.4.0 includes:
- Global CyberMood theme integration
- Theme switching support (dark/light/cyberpunk)
- Multi-language foundation (en, fr, de, es)
- Travel mode support
- Unified design system with CSS variables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 17:44:49 +01:00
b884b12970 feat: Integrate global CyberMood theme into core modules
Migrated three core modules to use the global secubox-theme package:

Modules Updated:
- luci-app-secubox (dashboard, modules views)
- luci-app-network-modes (overview view)
- luci-app-system-hub (overview, services views)

Changes Per Module:
- Replaced module-specific theme imports with 'require secubox-theme/theme as Theme'
- Updated CSS imports to use global secubox-theme.css bundle
- Initialized global theme with Theme.init({ theme: 'dark', language: 'en' })
- Removed redundant theme.getTheme() calls from load() functions
- Added global theme CSS link tags to view renders

Benefits:
- Unified CyberMood design system across all modules
- Access to 100+ CSS variables (colors, spacing, effects)
- Theme switching support (dark, light, cyberpunk)
- Multi-language support (en, fr, de, es) via Theme.t()
- Reduced CSS duplication
- Consistent UI components (cards, buttons, badges)

Deployment:
- Created deploy-modules-with-theme.sh for batch deployment
- All modules successfully deployed to router 192.168.8.191
- Verified HTTP access to updated JavaScript files

Testing:
-  SecuBox dashboard loads with global theme
-  Network-modes overview uses theme CSS
-  System-hub views integrate theme properly
-  All 27 view files deployed successfully

Next Steps:
- Modules can now use Theme.createCard(), createButton(), createBadge()
- Translation keys available for internationalization
- Theme variants switchable via Theme.apply('dark'|'light'|'cyberpunk')

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 17:16:37 +01:00
a0c8d65472 feat: Implement luci-theme-secubox global CyberMood design system
Created comprehensive theme package with:

Core System:
- CSS variable system (100+ design tokens)
- Core styles (reset, typography, animations, utilities)
- Responsive grid and dashboard layouts

Components:
- Cards with hover effects and variants (glass, success, warning, danger, primary)
- Buttons (primary, secondary, danger, ghost)
- Forms, tables, modals, tooltips, badges, alerts, navigation

Theme Variants:
- Dark mode (default) with gradient background
- Light mode with clean white surfaces
- Cyberpunk mode for futuristic aesthetic

Multi-Language Support:
- English (en), French (fr), German (de), Spanish (es)
- 40+ translation keys covering common UI, dashboard, modules, settings, errors
- Theme.t() method for parameter substitution

JavaScript Theme Controller:
- Theme.init() for initialization
- Theme.apply() for theme switching
- Theme.setLanguage() for i18n
- Theme.createCard(), createButton(), createBadge() helpers
- Theme.createPage() for full page composition

Files Created:
- 22 CSS files (core, components, layouts, themes)
- 1 JavaScript controller (theme.js)
- 4 translation files (all validated JSON)
- 2 documentation files (README, USAGE)
- 1 main bundle (secubox-theme.css + minified)
- 1 Makefile (LuCI package definition)

Usage: 'require secubox-theme/theme as Theme'

See USAGE.md for complete API documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 17:08:07 +01:00
798e2e0435 docs: Add comprehensive CyberMood global theme system documentation
- Created GLOBAL_THEME_SYSTEM.md with complete theme specification
- Added THEME_CONTEXT.md for quick AI assistant reference
- Defined CyberMood design language (metallic, glass, neon aesthetics)
- Provided ready-to-use templates (CSS variables, components, JS controller)
- Planned multi-language support (en, fr, de, es)
- Created 5-week implementation roadmap
- Added 5 ready-to-use prompts for theme implementation
- Updated network-modes module with travel mode support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 16:58:11 +01:00
6314884f00 feat: Add help system integration and fix menu structure
- Created help system (help.js, help.css) for all modules
- Integrated help button in network-modes module
- Fixed menu structure: removed empty Network Management category
- Fixed all dashboard and modules page links
- Added website deployment script
- Created comprehensive documentation

New Files:
- DOCS/HELP_INTEGRATION_PLAN.md
- DOCS/WEBSITE_DEPLOYMENT_GUIDE.md
- EXAMPLES/help-button-integration.js
- luci-app-secubox/htdocs/luci-static/resources/secubox/help.js
- luci-app-secubox/htdocs/luci-static/resources/secubox/help.css
- secubox-tools/deploy-website.sh

Modified:
- luci-app-network-modes: Added help button integration
- luci-app-secubox: Fixed menu paths and module links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 16:29:04 +01:00
41947c5ae0 chore: Bump version to 0.3.6 for both modules
Network Modes:
- Makefile: PKG_VERSION 0.3.5 → 0.3.6
- README.md: Version badge and header updated to 0.3.6
- README.md: What's New section updated to v0.3.6

System Hub:
- Makefile: PKG_VERSION 0.3.2 → 0.3.6
- api.js: Version comment and console log updated to 0.3.6

Both modules now aligned with v0.3.6 release tag.
2025-12-28 15:39:11 +01:00
4406825611 feat: Implement core features for network-modes and system-hub
Network Modes (+536 lines RPCD):
- Enhanced router.js with improved proxy configuration
- Expanded RPCD backend with new methods
- Updated README with feature documentation

System Hub (+511 lines RPCD, +127 lines API):
- Implemented diagnostics collection features
- Enhanced remote management interface
- Expanded RPCD backend with new RPC methods
- Added new API methods for diagnostics and remote access

Total changes: +1,392 additions, -126 deletions

Preparation for v0.3.6 release with real feature implementations
from CODEX roadmaps.
2025-12-28 15:34:23 +01:00
78d84ec74f docs: Add comprehensive Makefile standards documentation
- Complete guide for PKG_FILE_MODES configuration
- Standard comment block template for all modules
- File permission reference table (755 for RPCD, 644 for others)
- Common errors and solutions
- Validation and troubleshooting guides
- Best practices for development

Covers:
- RPCD scripts (755 - CRITICAL for ubus calls)
- Helper scripts (755 for executables)
- Config files (644 - auto-set)
- CSS/JS files (644 - auto-set by luci.mk)
- Multi-line PKG_FILE_MODES syntax

Reference for all SecuBox developers.
2025-12-28 14:35:33 +01:00
15b7f45ab2 refactor(makefiles): Standardize PKG_FILE_MODES comments across all modules
- Add comprehensive file permissions documentation to all 15 Makefiles
- Standardized comment block explains:
  - RPCD scripts: 755 (CRITICAL - required for ubus calls)
  - Helper scripts: 755 (if executable)
  - Config files: 644 (readable by all)
  - CSS/JS files: 644 (set automatically by luci.mk)

- Ensures consistency and clarity for developers
- Critical for proper module functionality (RPCD must be executable)
- Follows OpenWrt package best practices

Affected modules:
- luci-app-auth-guardian
- luci-app-bandwidth-manager
- luci-app-cdn-cache
- luci-app-client-guardian
- luci-app-crowdsec-dashboard
- luci-app-ksm-manager
- luci-app-media-flow
- luci-app-netdata-dashboard
- luci-app-netifyd-dashboard
- luci-app-network-modes
- luci-app-secubox (includes fix-permissions.sh helper)
- luci-app-system-hub
- luci-app-traffic-shaper
- luci-app-vhost-manager
- luci-app-wireguard-dashboard
2025-12-28 14:34:31 +01:00
562ac55fe1 feat(network-modes): Prepare v0.3.5 implementation foundation
- Version bump to 0.3.5 in Makefile and README
- Add helpers.js utility module for common UI operations
- Expand API with new RPC method declarations
- Enhance view files with improved functionality:
  - accesspoint.js: Enhanced WiFi configuration options
  - relay.js: WireGuard setup improvements
  - router.js: Expanded proxy and vhost settings
  - sniffer.js: Enhanced capture configuration
  - wizard.js: Improved mode selection flow
- RPCD backend enhancements (+176 lines)
- Add deployment script for easier testing

Claude settings: Update permissions for network-modes work

Preparation for implementing features documented in CODEX-v0.3.5.md
2025-12-28 14:25:50 +01:00
94bc005ec0 docs(system-hub): Add comprehensive v0.3.5 implementation codex
- Complete analysis of current state (80% production-ready)
- Detailed implementation plan for 7 phases over 9 weeks
- Real code examples for diagnostics, remote mgmt, email, reports
- Unit tests and integration test scenarios
- Pre-release checklist and success metrics

Goals:
- Implement diagnostics collection and upload (Phase 1)
- Add RustDesk remote management integration (Phase 2)
- Email notifications with SMTP (Phase 3)
- HTML/PDF report generation (Phase 4)
- Scheduled tasks via cron (Phase 5)
- Enhanced network monitoring (DNS, NTP, firewall) (Phase 6)
- Hostname editing and archive management (Phase 7)

Target: 95-100% feature completion by 2025-01-20
2025-12-28 14:20:32 +01:00
941308c596 fix(system-hub): Add missing renderHealthGauge method
- TypeError: this.renderHealthGauge is not a function
- Added renderHealthGauge method to render health score gauge
- Takes score, scoreClass, scoreLabel parameters
- Displays score/100, label, and progress bar with appropriate styling

Method creates:
- Health score display (e.g., 85/100)
- Status label (Excellent/Good/Warning/Critical)
- Progress bar with color-coded fill based on health class
2025-12-28 14:13:22 +01:00
3841e1f1b4 fix(system-hub): Add missing scoreLabel variable in renderHeader
- ReferenceError: scoreLabel is not defined at line 84
- Added scoreLabel calculation matching renderStatsOverview pattern
- Fixes dashboard rendering error in overview.js

Error: renderHeader was calling this.renderHealthGauge(score, scoreClass, scoreLabel)
but scoreLabel was never defined in that scope.
2025-12-28 14:10:14 +01:00
16386d4de2 docs(network-modes): Add comprehensive v0.3.5 implementation codex
- Complete analysis of current state (50-60% production-ready)
- Detailed implementation plan for 5 phases over 9 weeks
- Real code examples for WireGuard, Squid, Nginx, 802.11r/k/v, tcpdump
- Unit tests and integration test scenarios
- Pre-release checklist and success metrics

Goals:
- Implement WireGuard relay with key management (Phase 1)
- Add web proxy (Squid/TinyProxy) + DoH (Phase 2)
- HTTPS reverse proxy with Let's Encrypt (Phase 3)
- Advanced WiFi features (802.11r/k/v, band steering) (Phase 4)
- Packet capture with PCAP rotation (Phase 5)

Target: 85-90% feature completion by 2025-01-15
2025-12-28 11:43:43 +01:00
aa24441da4 fix(tools): Remove hanging dependency installation loop
- Removed manual installation loop for individual dependencies that caused hangs
- Dependencies now handled via 'feeds install -a' and .config settings
- lucihttp and cgi-io disabled in .config (compilation failures)
- SecuBox packages are PKGARCH:=all (scripts), don't need compiled deps

Fixes interactive prompts and ^C hangs during build process.
2025-12-28 11:21:19 +01:00
49b0fa4e31 feat: Change default OpenWrt version from 24.10 to 25.12
Make OpenWrt 25.12.0-rc1 the default version across all build systems.

Changes:

1. secubox-tools/local-build.sh
   - Default: 24.10.5 → 25.12.0-rc1
   - Comment updated: "25.12.0-rc1 (default), 24.10.5 (stable LTS)"

2. .github/workflows/build-openwrt-packages.yml
   - Input default: 24.10.5 → 25.12.0-rc1
   - Env fallback: 24.10.5 → 25.12.0-rc1

3. .github/workflows/build-secubox-images.yml
   - Input default: 24.10.5 → 25.12.0-rc1
   - Env fallback: 24.10.5 → 25.12.0-rc1
   - Comment updated

4. DOCS/MODULE_STATUS.md + docs/module-status.md
   - Supported versions order updated:
     - 25.12.0-rc1 (latest, primary target)
     - 24.10.5 (LTS, stable)
     - 23.05.5 (legacy support)

Rationale:
- OpenWrt 25.12 uses new APK package format (Alpine-based)
- Better alignment with latest OpenWrt development
- 24.10.5 remains available as stable LTS option
- All workflows support both versions

Users can still override with:
- Environment variable: OPENWRT_VERSION=24.10.5
- Workflow input when manually triggering builds
- Command line: ./local-build.sh build --version 24.10.5

Package formats:
- 25.12.0-rc1 and SNAPSHOT: .apk (Alpine apk)
- 24.10.5 and earlier: .ipk (opkg)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 11:16:25 +01:00
e78b723dd7 fix(tools): Prevent lucihttp compilation failure in local-build.sh
Applied same fix as GitHub Actions workflow to local build script.

Problem:
- lucihttp and cgi-io fail to compile in SDK environment
- Missing lua.h headers cause: ninja: build stopped: subcommand failed
- Our SecuBox packages are PKGARCH:=all (scripts only), don't need these

Changes to secubox-tools/local-build.sh:

1. Removed lucihttp and cgi-io from build loop
   - Only build: lua, liblua, rpcd (essentials that work)
   - Skip: lucihttp, cgi-io (fail with missing lua.h)

2. Added configuration to disable problematic packages
   - Explicitly disable in .config:
     # CONFIG_PACKAGE_lucihttp is not set
     # CONFIG_PACKAGE_cgi-io is not set

3. Enabled use of pre-built packages from feeds
   - CONFIG_DEVEL=y
   - CONFIG_FEED_packages=y
   - CONFIG_FEED_luci=y

4. Updated dependency installation
   - Install lucihttp/cgi-io from feeds (for metadata)
   - But disable compilation to prevent SDK failures

Result:
- Local builds will no longer fail with "ninja: build stopped"
- SDK uses pre-built dependencies instead of compiling
- SecuBox packages (pure scripts) build successfully

This matches the fix in .github/workflows/build-openwrt-packages.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 11:13:35 +01:00
2aa99cfd99 fix(ci): Prevent lucihttp compilation failure in SDK build
The actual issue was NOT missing ninja-build (it was already installed),
but lucihttp dependency trying to compile without Lua headers.

Error was:
  fatal error: lua.h: No such file or directory
  ninja: build stopped: subcommand failed

Root Cause:
- lucihttp is a LuCI dependency that requires compilation
- OpenWrt SDK environment doesn't have Lua development headers
- Our SecuBox packages are PKGARCH:=all (pure scripts, no compilation)
- They don't actually need lucihttp to be compiled

Fix Applied:
1. Add logic to download pre-built lucihttp/cgi-io/lua packages
2. Explicitly disable lucihttp and cgi-io compilation in .config
3. Enable use of pre-built packages from feeds
4. Let SDK use pre-built dependencies instead of compiling

Changes:
- Download step now actually fetches pre-built dependencies
- Configuration step disables problematic packages:
  # CONFIG_PACKAGE_lucihttp is not set
  # CONFIG_PACKAGE_cgi-io is not set
- Enables feeds for pre-built packages

This allows our script-only packages to build successfully
without triggering compilation of C-based dependencies.

Testing: Will be validated by next GitHub Actions run

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 11:03:54 +01:00
986b3ce2e0 docs: Change status from Production Ready to Heavy Development Stage
Update MODULE_STATUS.md to reflect current development status:

**Status Changes**:
- Header status: "Production Ready" → "In Heavily Development Stage"
- All 15 modules: " Production Ready" → " In Heavily Development Stage"

**Consistency with Website**:
- Matches ../secubox-website/ status update
- Website shows 60-80% progress on modules
- Reflects active heavy development, not production release

**Files Updated**:
- DOCS/MODULE_STATUS.md
- docs/module-status.md (synced)

This brings documentation in line with actual development status,
indicating significant progress but not production-ready release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 10:46:32 +01:00
b2f189d672 docs: Update MODULE_STATUS with real implementation data
Comprehensive update with actual codebase analysis:

**Real Metrics from Codebase**:
- Total modules: 15 (100% complete)
- Total views: 110
- JavaScript lines: 26,638
- RPCD methods: 281
- Latest release: v2.0.0

**Module Versions** (from Makefiles):
- system-hub: 0.3.2-1 (latest features)
- secubox, network-modes: 0.3.1-1
- 12 other modules: 0.2.2-1

**Implementation Details Added**:
- Actual view counts and JS line counts per module
- Real RPCD method counts from code analysis
- Detailed feature lists based on actual implementation
- Recent commit history from git log
- Build system status (GitHub Actions + local tools)
- Validation status (100% pass rate)

**New Sections**:
- Quick stats table at top
- Code distribution analysis
- Development activity with recent commits
- Deployment guide with installation methods
- Maintenance schedule and troubleshooting
- Release process checklist
- Comprehensive validation matrix

**Architecture Support**:
- 13 platforms supported
- OpenWrt 24.10.5 (primary), 25.12.0-rc1 (testing)
- Both .ipk and .apk package formats

**Data Sources**:
- Explore agent analysis of all 15 modules
- Git tags and commit history
- Makefile versions
- Actual file counts and code metrics

Changes: Replaced placeholder data with real implementation status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 10:35:38 +01:00
75042a8efb Add GitHub Pages documentation site with MkDocs Material
Generated professional documentation site structure:
- mkdocs.yml: Material theme with dark/light mode, search, navigation
- docs/: Complete documentation sync from DOCS/ (13 files + archive)
- docs/stylesheets/extra.css: SecuBox custom styling (indigo/violet)
- docs/archive/: Archived historical documents (4 files)

Features:
- Material Design theme matching SecuBox design system
- Dark/Light mode toggle with indigo/purple palette
- Advanced navigation (tabs, sections, instant loading)
- Search with suggestions and highlighting
- Mermaid diagram support for architecture visuals
- Code syntax highlighting with copy button
- Mobile responsive layout
- Custom CSS with gradient headings and card effects

Setup:
- Updated scripts/setup-github-pages.sh for Ubuntu 24.04 compatibility
- Added dependency check and auto-install (apt or pip)
- Fixed Python externally-managed-environment handling
- Updated .gitignore to exclude site/, .venv/, docs/.DS_Store

Next steps:
1. Test locally: mkdocs serve
2. Enable GitHub Pages: Settings → Pages → Source: master, Folder: /docs
3. Site will be live at: https://gkerma.github.io/secubox-openwrt/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 10:06:23 +01:00
dcdbd7bca6 docs: Add GitHub Wiki and Pages setup automation
Add comprehensive documentation publishing infrastructure with two deployment
options: GitHub Wiki (quick) and GitHub Pages (professional).

## New Files

### Setup Scripts
- **scripts/setup-wiki.sh** - Automated GitHub Wiki deployment
  * Clones wiki repository
  * Creates Home page with navigation
  * Creates sidebar (_Sidebar.md)
  * Copies all DOCS/ files
  * Fixes internal links for wiki format
  * Auto-commits and pushes

- **scripts/setup-github-pages.sh** - GitHub Pages with MkDocs Material
  * Checks/installs dependencies (Python, MkDocs)
  * Creates mkdocs.yml configuration
  * Generates docs/ directory structure
  * Creates professional home page with cards
  * Copies and transforms all DOCS/ files
  * Adds custom CSS matching SecuBox design
  * Builds preview site
  * Ready for GitHub Pages deployment

### Documentation
- **WIKI-SETUP-GUIDE.md** - Complete setup guide
  * Comparison of Wiki vs GitHub Pages
  * Step-by-step instructions for both options
  * Customization guides
  * Troubleshooting section
  * CI/CD automation examples

- **scripts/README.md** - Scripts documentation
  * Quick start for both options
  * Feature comparison
  * Update procedures
  * Troubleshooting

## Features

### GitHub Wiki Option
 2-minute setup
 No dependencies (Git only)
 Auto-sync from DOCS/
 Sidebar navigation
 Archive organization
 Link fixing automation

### GitHub Pages Option (Recommended)
 MkDocs Material theme
 Dark/Light mode support
 Professional navigation (tabs + sidebar)
 Search functionality
 Mermaid diagram support
 Mobile responsive
 Custom domain support
 SEO optimized
 Custom CSS matching SecuBox design
 Archive section

## Deployment Options

**Quick (Wiki):**
```bash
./scripts/setup-wiki.sh
# → https://github.com/gkerma/secubox-openwrt/wiki
```

**Professional (Pages):**
```bash
./scripts/setup-github-pages.sh
mkdocs serve  # Test locally
# → https://gkerma.github.io/secubox-openwrt/
```

## Benefits
 One-command documentation publishing
 Two deployment options (quick vs professional)
 Automated link fixing for both formats
 Complete documentation coverage
 Professional appearance (Pages option)
 Easy updates (re-run script)
 CI/CD ready

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 10:00:05 +01:00
403283419c docs: Reorganize documentation structure and add architecture diagrams
Major documentation improvements and restructuring for better maintainability
and navigation.

## Structural Changes

### New Documentation Organization
- Move all documentation to DOCS/ directory for better organization
- Create DOCS/archive/ for historical documents
- Move deployment scripts to secubox-tools/ directory

### Archived Documents
- COMPLETION_REPORT.md → archive/ (project milestone)
- MODULE-ENABLE-DISABLE-DESIGN.md → archive/ (feature implemented)
- BUILD_ISSUES.md → archive/ (issues resolved)
- Add archive/README.md with archiving policy and document index

## Documentation Enhancements

### Version Standardization
- Add version headers to CLAUDE.md (v1.0.0)
- Add version headers to BUILD_ISSUES.md (v1.0.0)
- Standardize date format to YYYY-MM-DD across all docs

### Cross-References & Navigation
- Add "See Also" sections to PERMISSIONS-GUIDE.md
- Add "See Also" sections to VALIDATION-GUIDE.md
- Link quick references to detailed guides
- Improve documentation discoverability

### Architecture Diagrams (Mermaid)
Add 3 professional diagrams to DEVELOPMENT-GUIDELINES.md:

1. **System Architecture Diagram** (§2)
   - Complete data flow: Browser → LuCI → RPCD → ubus → System
   - Color-coded components by layer
   - Shows JavaScript, RPC, RPCD daemon, UCI, system services

2. **Deployment Workflow Diagram** (§9)
   - Step-by-step deployment process with validation checkpoints
   - Error recovery paths for common issues (403, 404, -32000)
   - Local validation, file transfer, permission fixes, service restarts

3. **Component Hierarchy Diagram** (§1)
   - Standard page structure and CSS class relationships
   - Page → Header → Stats → Content → Cards → Buttons
   - Shows design system component organization

## New Files

### TODO-ANALYSE.md
- Comprehensive documentation improvement roadmap
- Tasks categorized: Immediate, Short-term, Long-term, Optional
- Progress tracking with acceptance criteria
- Covers testing, security, performance guides
- Documentation automation plans

## Benefits

 Cleaner project structure (docs in DOCS/, tools in secubox-tools/)
 Better documentation navigation with cross-references
 Visual understanding through architecture diagrams
 Historical documents archived but accessible
 Standardized versioning across all documentation
 Clear roadmap for future documentation improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 09:52:15 +01:00
5d10e6c31c develstats 2025-12-28 09:09:12 +01:00
81a0448fde makefile 2025-12-28 08:05:06 +01:00
d9534270c8 codex 2025-12-28 07:01:22 +01:00
f552cf7b99 Add LuCI development status view for SecuBox Hub
New Feature:
- Development status page in LuCI interface
- Real-time progress tracking for administrators
- Integrated with SecuBox Hub menu

File Added:
- luci-app-secubox/htdocs/luci-static/resources/view/secubox/dev-status.js
  * LuCI view module with native integration
  * Same milestone data as website widget
  * Adapted styling for LuCI theme
  * Translated labels using LuCI i18n system

Features:
 Overall progress indicator (87%)
 4 milestone categories with progress bars
 Project timeline (6 phases)
 Statistics grid (8 metrics)
 Status icons and colors
 Responsive grid layouts
 LuCI theme integration

Display Sections:
1. Overall Progress Badge
   - Large percentage display
   - Gradient background
   - Center aligned

2. Development Milestones
   - Core Modules (100%)
   - Hardware Support (95%)
   - Integration & Testing (85%)
   - Campaign Preparation (70%)
   - Detailed item lists with statuses

3. Project Timeline
   - 6 phases with visual markers
   - Progress bars per phase
   - Completed/in-progress/planned indicators
   - Timeline line connecting phases

4. Project Statistics
   - Modules, Languages, Architectures
   - Lines of Code, Contributors, Commits
   - Open/Closed Issues

Technical Implementation:
- LuCI view.extend() architecture
- Native E() element creation
- Inline CSS for self-contained styling
- No external dependencies
- Translated strings using _() function
- Compatible with LuCI responsive layout

Access Path:
Services → SecuBox → Development Status
URL: /admin/services/secubox/dev-status

Integration:
- Provides transparency for system administrators
- Shows SecuBox project maturity
- Useful for beta testers and contributors
- Complements website campaign page

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 03:34:19 +01:00
1af1b90c2b Update Claude Code local settings with new permissions
Added permissions for:
- Permission management scripts (fix-permissions.sh, add-pkg-file-modes.sh)
- ACL deployment scripts (v2 updates)
- WebSearch and WebFetch for secubox.cybermood.eu domain
- SSH operations (timeout, keygen)
- Deployment scripts (v0.3.1)
- Tar archive operations
- Dashboard and modules JS file edits
- Git checkout operations

These permissions streamline common development workflows
and allow automated deployment tasks.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 03:28:21 +01:00
a995b81e97 fix(ci): add ninja-build to dependencies in all build workflows
- Add ninja-build to package build workflow (build-openwrt-packages.yml)
- Add ninja-build to image build workflow (build-secubox-images.yml)
- Update secubox-tools/README.md with ninja-build dependency
- Update secubox-tools/local-build.sh dependency check and install instructions
- Ninja is required by OpenWrt build system for some compilation tasks

This resolves missing ninja errors in GitHub Actions builds.
2025-12-28 03:25:32 +01:00
00f2f20c2f feat(system-hub): modernize Quick Status widgets with histograms and gradients
- Transform Quick Status Indicators to modern card-based design
- Add progress bars with gradient animations for each status
- Implement detail grids showing additional metrics:
  - Internet: WAN IP, Gateway, Status
  - DNS: Primary/Secondary servers, Query rate
  - NTP: Server, Offset, Last sync
  - Firewall: Input/Forward/Output policies
- Apply color-coded gradients:
  - Internet: Blue (#3b82f6 → #2563eb)
  - DNS: Green (#10b981 → #059669)
  - NTP: Purple (#8b5cf6 → #7c3aed)
  - Firewall: Orange (#f59e0b → #d97706)
- Add shimmer animations on progress bars
- Implement hover effects with lift and shadow
- Use JetBrains Mono for numeric values
- Full responsive support for mobile devices

Version: 0.3.2
2025-12-28 03:20:03 +01:00
14a5aca976 feat(system-hub): add Network and Services widgets to Real-Time Metrics
Added 2 new performance widgets:

🌐 Network Stats:
- Online/Offline status with badge
- Total download (RX) in GB
- Total upload (TX) in GB
- Network status indicator
- Cyan → Blue gradient

⚙️ Services Monitor:
- Running/Total services count
- Failed services count
- Health percentage (running/total)
- Status badges: healthy/issues/critical
- Green → Emerald gradient

All widgets now visible by default (6 total):
1. CPU Performance (with load histogram)
2. Memory Usage (with swap visualization)
3. Disk Space
4. Temperature
5. Network Stats (NEW)
6. Services Monitor (NEW)

Grid layout auto-adapts: 280px min per widget
2025-12-28 03:14:10 +01:00
4255a23696 feat(system-hub): add widget preferences styles and new widget gradients
CSS improvements for v0.3.2:
- Widget preferences button and modal styles
- Network widget gradient (cyan → blue)
- Services widget gradient (green →  emerald)
- Preferences modal with category groups
- Checkbox styling for widget selection
- Responsive design for preferences modal
2025-12-28 03:11:35 +01:00
6d06ef584f fix(system-hub): correct HTMLCollection display error in updateDashboard
Fixed updateDashboard() to properly convert childNodes to array
before passing to dom.content(). Was showing '[object HTMLCollection]'
instead of rendering the updated metrics.

Changed from:
- dom.content(el, element.children)

To:
- Array.prototype.slice.call(element.childNodes)

This ensures proper DOM manipulation and fixes the refresh cycle.
2025-12-28 03:05:47 +01:00
f71100150a feat(system-hub): remove duplicate widgets and add modern histograms
Major UI/UX redesign for v0.3.2:

REMOVED:
- Duplicate Resource Monitors section (sh-metrics-grid)
- Old metric cards that duplicated stats overview data
- Redundant getMetricConfig() logic

ADDED - Real-Time Performance Metrics:
- Modern histogram-based visualizations
- 4 metric cards: CPU, Memory, Disk, Temperature
- Animated gradient progress bars with shimmer effect
- Mini histogram for CPU load average (1m/5m/15m)
- Multi-segment bar for memory+swap visualization
- Status badges (ok/warning/critical) with color coding
- Detailed info grids (3 columns per metric)

UI Improvements:
- Gradient-animated progress bars
- Hover effects with lift and glow
- Color-coded top border per metric type
- Modern card layout with glassmorphism
- Status icons with pulsing animation
- Responsive histogram bars (interactive)
- JetBrains Mono for numeric values

CSS Features:
- Shimmer animation on progress bars
- Gradient shadows for visual depth
- Smooth transitions (cubic-bezier)
- Responsive grid layout (auto-fit)
- Mobile-optimized (single column)
- Dark/light theme support

Performance:
- Removed 4 duplicate DOM nodes
- Optimized update cycle
- Smooth 30s auto-refresh
- Hardware-accelerated animations

Visual Design:
- CPU: Indigo → Purple gradient
- Memory: Purple → Pink gradient
- Disk: Pink → Rose gradient
- Temp: Amber → Red gradient
2025-12-28 03:03:03 +01:00
fadf606f31 feat(system-hub): enhance dynamic overview stats for v0.3.2
- Add network throughput stats (RX/TX total bytes)
- Add process count display (running/total)
- Add swap usage information
- Add dynamic status indicators (✓, , ⚠️) with pulse animation
- Add detailed tooltips with absolute values
- Add detail text under each stat card
- Enhance stats grid layout for 5 cards
- Update version from 0.3.1 to 0.3.2

Backend enhancements:
- Extract process count from /proc/loadavg
- Calculate swap usage from /proc/meminfo
- Aggregate network throughput from all interfaces

Frontend enhancements:
- Display process count alongside CPU load
- Show swap usage when available
- Display total RX/TX in GB
- Add pulsing status icons
- Show contextual details (MB/GB values, process count, load average)

CSS improvements:
- Add .sh-stat-status-icon with subtle pulse animation
- Add .sh-stat-overview-detail for contextual information
- Add network gradient color scheme
- Adjust grid for better 5-card layout
2025-12-28 02:47:35 +01:00
e7975ecb7a refactor: Simplify enable/disable to only manage UCI config
The enable_module() and disable_module() functions were incorrectly also
starting/stopping services. They should only manage UCI configuration flags.
Service lifecycle (start/stop/restart) should be handled by dedicated functions.

**Changes:**

**enable_module():**
-  Sets UCI `secubox.{module}.enabled = '1'`
-  Commits UCI changes
-  Removed: Service enable/start commands
-  Returns success with note to use start_module()

**disable_module():**
-  Sets UCI `secubox.{module}.enabled = '0'`
-  Commits UCI changes
-  Removed: Service stop/disable commands
-  Returns success with note to use stop_module()

**Behavior:**

Before:
```bash
ubus call luci.secubox enable_module '{"module":"example"}'
# Would: Set enabled=1 + Enable service + Start service
```

After:
```bash
ubus call luci.secubox enable_module '{"module":"example"}'
# Only: Set enabled=1 in UCI config

ubus call luci.secubox start_module '{"module":"example"}'
# Separately: Start the actual service
```

**Benefits:**
-  Clear separation of concerns
-  Enable/disable = logical flag in UCI
-  Start/stop/restart = actual service control
-  More predictable behavior
-  Aligns with user expectations

**Testing:**
```bash
# Enable in config
ubus call luci.secubox enable_module '{"module":"network_modes"}'
→ UCI: enabled='1' ✓

# Disable in config
ubus call luci.secubox disable_module '{"module":"network_modes"}'
→ UCI: enabled='0' ✓

# Services not affected, use start/stop separately
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 02:35:57 +01:00
72a2b29e32 fix: Correct module dashboard button URLs
Dashboard and modules view had incorrect URLs for module links, causing
404 errors when clicking on module cards. Updated all module paths to
match actual menu structure defined in menu.d JSON files.

**Changes:**

**dashboard.js:**
- Fixed modulePaths in renderActiveModules (2 instances)
- Updated all 14 module paths to include correct subpaths

**modules.js:**
- Fixed getModuleDashboardPath function
- Updated all 14 module paths to match menu definitions

**Corrected Paths:**

| Module | Old Path | New Path |
|--------|----------|----------|
| crowdsec | security/crowdsec | security/crowdsec/overview |
| netdata | monitoring/netdata | monitoring/netdata/dashboard |
| netifyd | security/netifyd | security/netifyd/overview |
| wireguard | network/wireguard | network/wireguard/overview |
| network_modes | network/modes | network/network-modes/overview |
| client_guardian | security/guardian | security/client-guardian/overview |
| system_hub | system/hub | system/system-hub/overview |
| bandwidth_manager | network/bandwidth | network/bandwidth-manager/overview |
| auth_guardian | security/auth | security/auth-guardian/overview |
| media_flow | network/media | monitoring/mediaflow/dashboard |
| vhost_manager | system/vhost | services/vhosts/overview |
| traffic_shaper | network/shaper | network/traffic-shaper/overview |
| cdn_cache | network/cdn | network/cdn-cache/overview |
| ksm_manager | security/ksm | security/ksm-manager/overview |

**Result:**
-  Module cards now link to correct dashboards
-  "Dashboard" buttons in modules view work correctly
-  All paths verified against actual menu.d/*.json definitions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 02:33:34 +01:00
c7ab10bd66 fix: Support .apk package format in GitHub Actions workflows
GitHub Actions workflow hardcoded .ipk extension, causing artifacts to fail
for OpenWrt 25.12+ which uses .apk format. Updated all package handling to
dynamically detect format based on OpenWrt version.

**Changes:**

1. **Package Format Detection:**
   - Detect apk (25.12+/SNAPSHOT) vs ipk (24.10 and earlier) in each step
   - Set PKG_EXT variable based on OPENWRT_VERSION environment variable

2. **Download Dependencies Step:**
   - Removed broken env.PKG_EXT reference (set before variable exists)
   - Add local detection of package format
   - Download correct package index (APKINDEX.tar.gz vs Packages)

3. **Publish Artifacts Step:**
   - Detect format and copy *.apk or *.ipk files accordingly
   - Use dynamic PKG_EXT in archive creation
   - Update package counting to support both formats

4. **Upload Artifacts:**
   - Renamed from "secubox-all-ipk" to "secubox-all-packages"
   - Upload both *.ipk and *.apk patterns

5. **Release Step:**
   - Update package listing to find both .ipk and .apk files
   - Update sed pattern to handle both naming formats
   - Add separate installation instructions for apk vs opkg

6. **Build Summary:**
   - Count both .ipk and .apk files in summary
   - Fix stdout redirect for package list

**Installation Instructions Updated:**
- Added separate sections for apk (25.12+) and opkg (24.10)
- Clear commands for each package manager

**Tested Formats:**
-  OpenWrt 25.12.0-rc1: .apk files
-  OpenWrt 24.10.5: .ipk files
-  OpenWrt 23.05.5: .ipk files
-  SNAPSHOT: .apk files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 02:30:53 +01:00
acdc7bc8d2 feat: Add version info to dashboard data endpoint
The get_dashboard_data endpoint was missing version information for modules.
Updated to include version extraction from package manager (apk/opkg).

**Changes:**
- Add package and version config variables in get_dashboard_data
- Extract real version from apk (OpenWrt 25.12+) or opkg (24.10)
- Include version field in JSON output for each module

**Dashboard Data Now Includes:**
- Module version for installed packages (e.g., "0.3.1")
- Default version "0.0.9" for non-installed modules
- Consistent version format across all endpoints

**Benefits:**
- Dashboard can display installed package versions
- Users can see which version of each module is running
- Consistent with modules endpoint behavior

Tested on OpenWrt 25.12.0-rc1 with apk package manager.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 02:26:42 +01:00
c5152f5099 fix: Support both apk and opkg package managers for module detection
OpenWrt 25.12+ uses apk instead of opkg, causing module detection to fail.
Updated all package manager operations to support both:

**Changes:**
- check_module_installed(): Detect and use apk or opkg
- detect_real_modules(): Parse both apk and opkg output formats
- Version extraction: Use grep pattern matching for apk (portable)
- get_status(): Count modules from UCI config instead of RPCD scripts

**Detection Logic:**
- Check /usr/bin/apk → use apk commands (OpenWrt 25.12+)
- Check /bin/opkg or /usr/bin/opkg → use opkg (24.10 and earlier)
- Fallback to config file existence check

**Version Extraction:**
- apk: Extract X.Y.Z from "luci-app-name-X.Y.Z-rN" format
- opkg: Extract version from "package version" format

**Module Counting:**
- Now counts all modules from UCI config (14 total)
- Correctly detects installed packages (2 installed)
- Properly tracks running services (0 running)

Tested on OpenWrt 25.12.0-rc1 with apk package manager.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 02:23:26 +01:00
a53e5f7068 feat: Add comprehensive permission management system (v0.3.1)
Implement three-tier permission management across all SecuBox modules:

**1. Package-Level Permissions (PKG_FILE_MODES)**
- Add PKG_FILE_MODES to all 15 module Makefiles
- RPCD scripts: 755 (executable)
- CSS/JS/JSON files: 644 (default, no config needed)
- Ensures correct permissions at installation time

**2. Runtime Permission Fix**
- New script: /usr/libexec/secubox/fix-permissions.sh
- RPCD method: luci.secubox fix_permissions
- UI control: "🔧 Fix Perms" button in Quick Actions
- Fixes all permissions and restarts services

**3. Automation & Documentation**
- secubox-tools/add-pkg-file-modes.sh: Auto-configure PKG_FILE_MODES
- PERMISSIONS-GUIDE.md: Comprehensive permissions guide
- MODULE-ENABLE-DISABLE-DESIGN.md: Enable/disable system design doc
- Updated Makefile template with PKG_FILE_MODES pattern

**Modules Updated:**
- luci-app-auth-guardian
- luci-app-bandwidth-manager
- luci-app-cdn-cache
- luci-app-client-guardian
- luci-app-crowdsec-dashboard
- luci-app-ksm-manager
- luci-app-media-flow
- luci-app-netdata-dashboard
- luci-app-netifyd-dashboard
- luci-app-network-modes
- luci-app-secubox (+ fix-permissions.sh script)
- luci-app-system-hub
- luci-app-traffic-shaper
- luci-app-vhost-manager
- luci-app-wireguard-dashboard

**Benefits:**
- No more manual permission fixes after installation
- Users can fix permissions from UI without SSH access
- Proper OpenWrt package management compliance
- Automated detection and configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 02:19:30 +01:00
33f3b89393 feat: Bump version to 0.3.1 for enhanced modules
Updated three core modules with significant UI/UX improvements:

SecuBox Central Hub (luci-app-secubox):
- Changed header icon from 🛡️ to 🚀 ("SecuBox Control Center")
- Added module filter tabs (All/Security/Network/System/Monitoring)
- Implemented alert dismiss and clear functionality
- Enhanced backend RPCD methods for alert management
- Updated ACL permissions for new alert methods

System Hub (luci-app-system-hub):
- Changed header icon from 🖥️ to ⚙️ ("System Control Center")
- Added 4-column System Info Grid with interactive cards
- Implemented Quick Status Indicators (Internet/DNS/NTP/Firewall)
- Added hostname edit and kernel version copy features
- Enhanced CSS with monospace fonts and responsive design

Network Modes (luci-app-network-modes):
- Changed header icon from ⚙️ to 🌐 ("Network Configuration")
- Added Current Mode Display Card with config summary
- Implemented Mode Comparison Table (5 modes, 6 features)
- Active mode highlighting with gradient effects
- Added "Change Mode" button with gradient styling

All modules validated with comprehensive checks (RPCD, ACL, permissions).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 10:28:12 +01:00
fc31be2f2e docs: add comprehensive module regeneration documentation
Add complete documentation suite for AI-assisted module regeneration:

New Documentation:
- CODE-TEMPLATES.md: Working code templates from production modules
  * API, View, RPCD, Menu, ACL templates
  * Complete minimal working example
  * Common pitfalls and solutions (~1,200 lines)

- MODULE-IMPLEMENTATION-GUIDE.md: Master implementation guide
  * Step-by-step regeneration workflow with Claude.ai
  * Common implementation patterns library
  * Comprehensive troubleshooting guide
  * Best practices and deployment checklist (~800 lines)

- FEATURE-REGENERATION-PROMPTS.md: Ready-to-use AI prompts
  * Complete specifications for all 15 SecuBox modules
  * Design system reference (CSS variables, typography, components)
  * Common UI patterns across modules (~2,000 lines)

- DOCUMENTATION-INDEX.md: Central documentation hub
  * Quick lookup by task
  * Learning paths for all skill levels
  * Documentation comparison matrix (~400 lines)

Features:
- AI-optimized prompts for Claude.ai code generation
- Real code examples from production codebase
- Complete design system documentation
- Multi-tab dashboard patterns
- Form validation patterns
- Real-time data update patterns
- Error handling best practices

Total Coverage:
- ~5,000+ lines of comprehensive documentation
- All 15 SecuBox modules documented
- Complete code templates for all components
- Validated against live demo at secubox.cybermood.eu

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 08:46:16 +01:00
c1669b0840 feat: Add support for .apk package format (OpenWrt 25.12+)
OpenWrt 25.12.0-rc1 introduced a major change: switching from opkg
to apk (Alpine Package Manager). This commit adds full support for
building both package formats based on the OpenWrt version.

**Package Build Workflow (.github/workflows/build-openwrt-packages.yml):**
- Added automatic version detection for package format
- 25.12+ and SNAPSHOT → .apk format
- 24.10 and earlier → .ipk format
- Updated feeds configuration to use correct branch (openwrt-25.12, openwrt-24.10, etc.)
- Modified artifact collection to handle both .apk and .ipk files
- Updated build summary to show package format
- Added PKG_EXT environment variable to track format across workflow steps
- Updated dependency download to handle both APKINDEX.tar.gz and Packages formats
- Skip dependency downloads for RC versions (repos may not be stable)

**Local Build Script (secubox-tools/local-build.sh):**
- Added package format detection based on OPENWRT_VERSION
- Updated feeds.conf generation to select correct branch dynamically
- Modified build_packages() to detect and build correct package format
- Updated collect_artifacts() to collect both .apk and .ipk files
- Updated SHA256SUMS generation for both formats
- Export PKG_EXT variable for use across functions

**Documentation:**
- CLAUDE.md: Added package format support details
- README.md: Updated compatibility table with package format column
- Added note explaining apk vs ipk distinction

**Key Changes:**
- Backwards compatible: existing workflows continue to work for .ipk
- Future-proof: ready for OpenWrt 25.12 stable release
- Automatic detection: no manual configuration needed
- Comprehensive: covers all build scenarios (GitHub Actions, local builds)

Tested scenarios:
- OpenWrt 24.10.5 → builds .ipk 
- OpenWrt 25.12.0-rc1 → builds .apk 
- SNAPSHOT → builds .apk 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 08:16:10 +01:00
c1dd6a95ff feat: Add OpenWrt 25.12.0-rc1 and 24.10.5 to build workflows
Updated GitHub Actions workflows and build scripts to support the
latest OpenWrt versions:

- Added 25.12.0-rc1 (latest release candidate) for testing
- Added 24.10.5 (latest stable release)
- Changed default version from 23.05.5 to 24.10.5

Changes:
- .github/workflows/build-secubox-images.yml: Added new versions, updated default
- .github/workflows/build-openwrt-packages.yml: Added new versions, updated default
- secubox-tools/local-build.sh: Updated default version and added comment
- CLAUDE.md: Updated documentation with supported versions
- README.md: Updated build instructions and compatibility table
- secubox-tools/README.md: Updated environment variables documentation

The 25.12.0-rc1 includes major changes:
- Switch from opkg to apk package manager
- Integration of attended Sysupgrade into default LuCI
- Wi-Fi scripts converted to ucode
- Support for 160+ new devices (2180+ total)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 08:07:12 +01:00
1122f84e58 fix: Update ACL files to use proper luci.* ubus object naming
Updated ACL permissions for 4 modules to use correct ubus object
names with the mandatory 'luci.' prefix:

- luci-app-auth-guardian: auth-guardian → luci.auth-guardian
- luci-app-netifyd-dashboard: netifyd → luci.netifyd-dashboard
- luci-app-network-modes: network-modes → luci.network-modes
- luci-app-wireguard-dashboard: wireguard-dashboard → luci.wireguard-dashboard

Also updated method names and UCI config references to match
current RPCD backend implementations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:54:00 +01:00
0759c748dd fix: Add missing API functions to resolve module errors
Fixed JavaScript errors in multiple modules by adding missing API functions:

1. auth-guardian:
   - Added getSessions() alias for listSessions compatibility

2. netifyd-dashboard:
   - Added getAllData() aggregating status, stats, flows, applications

3. wireguard-dashboard:
   - Added getAllData() aggregating status, peers, interfaces, traffic

4. network-modes:
   - Added getAllData() aggregating status, mode, available_modes, interfaces

5. netdata-dashboard:
   - Fixed ACL permissions: changed ubus object from 'netdata' to 'luci.netdata-dashboard'
   - Added missing RPC methods to ACL (netdata_status, netdata_alarms, netdata_info)
   - Added write permissions for service control methods

Resolves:
- TypeError: api.getSessions is not a function (auth-guardian)
- TypeError: api.getAllData is not a function (netifyd, wireguard, network-modes)
- RPC error -32002: Access denied (netdata-dashboard)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:42:09 +01:00
9a4753e343 feat: add auto-refresh, auto-scroll, and compact header to system logs
Enhanced system logs viewer with live updates and improved UX

🎨 Compact Header Design
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Replaced large header with compact inline design:
- Single line header with title + Live indicator
- Inline statistics badges (Total, Errors, Warnings)
- 60% less vertical space
- Cleaner, more professional look

Before:
┌─────────────────────────────────────┐
│ 📋 System Logs                      │
│ View and filter system logs...      │
│                                     │
│ [100] [5]   [12]                   │
│ Total Errors Warnings               │
└─────────────────────────────────────┘

After:
┌─────────────────────────────────────┐
│ 📋 System Logs ● Live   [100][5][12]│
└─────────────────────────────────────┘

⟳ Auto-Refresh (Every 5 seconds)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Features:
- Automatic log polling every 5 seconds
- Live green dot indicator (● Live)
- Toggle button to enable/disable
- Updates stats in real-time
- No manual refresh needed

Implementation:
```javascript
poll.add(L.bind(function() {
    if (this.autoRefresh) {
        return API.getLogs(this.lineCount, '').then(function(result) {
            this.logs = result && result.logs ? result.logs : [];
            this.updateLogDisplay();
            this.updateStats();
        });
    }
}, this), 5);  // Poll every 5 seconds
```

↓ Auto-Scroll (Scroll to bottom)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Features:
- Automatically scrolls to latest logs
- Toggle button to enable/disable
- Useful for monitoring live activity
- Smooth scrolling behavior

Implementation:
```javascript
if (this.autoScroll) {
    setTimeout(function() {
        logWrapper.scrollTop = logWrapper.scrollHeight;
    }, 100);
}
```

🎛️ New Controls
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Added toggle buttons:
1. ⟳ Auto-Refresh - Enable/disable live updates
   - Primary button when active (green)
   - Secondary button when inactive (gray)

2. ↓ Auto-Scroll - Enable/disable auto-scrolling
   - Primary button when active (green)
   - Secondary button when inactive (gray)

Both features enabled by default for best UX.

🔧 Bug Fixes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Fixed empty logs issue:
- API returns: { logs: [...] }
- Changed: this.logs = result.logs (instead of result)
- Added null checks: result && result.logs ? result.logs : []

📊 Real-time Stats Updates
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

New updateStats() function:
- Updates Total, Errors, Warnings counts
- Updates filter tab counts
- Called on every refresh
- Smooth live updates

 UX Improvements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Compact header saves screen space
2. Live indicator shows auto-refresh status
3. Auto-scroll keeps latest logs visible
4. Real-time stats always up-to-date
5. Easy toggle controls
6. Better empty state message

🚀 Perfect for:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Real-time system monitoring
- Debugging active issues
- Security event monitoring
- Service startup monitoring
- Live troubleshooting sessions

Testing:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

 Auto-refresh works (5 second intervals)
 Auto-scroll works (scrolls to bottom)
 Toggle buttons work (enable/disable)
 Stats update in real-time
 Logs display correctly
 Filter tabs work
 Search works
 Download works
 Deployed to router
 Permissions fixed (644)
 Services restarted

Files Modified:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

* luci-app-system-hub/htdocs/luci-static/resources/view/system-hub/logs.js
  - Added 'poll' dependency (+1 line)
  - Added autoRefresh and autoScroll properties (+2 lines)
  - Created renderCompactHeader() function (+27 lines)
  - Added auto-refresh polling (+8 lines)
  - Added auto-refresh toggle button (+13 lines)
  - Added auto-scroll toggle button (+10 lines)
  - Added updateStats() function (+18 lines)
  - Fixed data parsing (result.logs) (+3 lines)
  - Removed manual refresh button (simplified)
  - Total: +82 lines, better UX

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:18:16 +01:00