Commit Graph

3 Commits

Author SHA1 Message Date
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
fa9bb2aee7 feat: complete Bandwidth Manager implementation with QoS and quotas
Implements comprehensive bandwidth management system with QoS traffic shaping,
client quotas, and SQM/CAKE integration for OpenWrt.

Features:
- QoS traffic shaping with rule-based control (application/port/IP/MAC)
- Per-rule download/upload limits with 8-level priority system
- Time-based scheduling support for rules
- Monthly data quotas per client (MAC address)
- iptables-based usage tracking with real-time statistics
- Configurable quota actions: throttle, block, or notify
- Automatic monthly reset with configurable reset day
- SQM/CAKE integration with NAT-aware configuration
- Link overhead compensation (Ethernet, PPPoE, VLAN)
- Alternative FQ_CoDel and HTB qdisc support

Components:
- RPCD backend (luci.bandwidth-manager): 10 ubus methods
  * status, list_rules, add_rule, delete_rule
  * list_quotas, get_quota, set_quota, reset_quota
  * get_usage_realtime, get_usage_history
- 5 JavaScript views: overview, rules, quotas, usage, settings
- ACL with read/write permissions for all methods
- UCI config with global, SQM, tracking, alerts, rules, and quotas sections
- Comprehensive README with API docs and examples

Technical implementation:
- Traffic tracking via iptables BW_TRACKING chain
- Usage database in /tmp/bandwidth_usage.db (pipe-delimited format)
- Real-time client usage with 5-second auto-refresh
- Historical data with configurable timeframes (1h to 30d)
- Per-client quota progress visualization with color-coded bars
- TC (traffic control) integration for QoS enforcement

Architecture follows SecuBox standards:
- RPCD naming convention (luci. prefix)
- Menu paths match view file structure
- All JavaScript in strict mode
- Form-based configuration management
- Comprehensive error handling

Dependencies: tc, kmod-sched-core, kmod-sched-cake, kmod-ifb, sqm-scripts,
iptables, iptables-mod-conntrack-extra, ip-full

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 10:48:51 +01:00
ef240b650b Initial commit: SecuBox v1.0.0-try2 2025-12-22 10:43:52 +01:00