Files
wol/CLAUDE.md
Marius Mutu f7b0c28d1a Initial commit - WOL Manager Flask application
- Added containerized Flask web application for Wake-on-LAN management
- Implemented computer management with file-based configuration
- Added network scanning and device discovery functionality
- Included Docker setup with privileged networking for WOL operations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 16:19:09 +03:00

2.1 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

See README.md for complete project description, installation instructions, and usage details.

This is a Wake-on-LAN (WOL) Manager - a containerized Flask web application for managing and remotely waking computers on a local network.

Architecture & Code Structure

  • Backend: Flask web application (app/app.py) with RESTful API endpoints
  • Frontend: Single-page application with vanilla JavaScript (app/templates/index.html)
  • Storage: File-based configuration in /data/wol-computers.conf
  • Deployment: Docker with docker-compose, requires privileged networking

Key Components

  • WOLManager class in app/app.py: Core logic for computer management, WOL operations, and network scanning
  • Configuration format: name|mac|ip (pipe-separated values in /data/wol-computers.conf)
  • Dependencies: wakeonlan, nmap, ping, arp system tools

Development Commands

For installation and basic usage, see README.md

Docker Development

# Development build and run
docker-compose up -d --build

# View real-time logs  
docker-compose logs -f wol-web

# Shell access to container
docker-compose exec wol-web bash

Network Requirements

  • Runs on port 8088 (external) → 8080 (internal)
  • Requires NET_ADMIN and NET_RAW capabilities
  • Uses network_mode: host for WOL packet transmission
  • Must run with privileged: true for network operations

API Endpoints

  • GET /api/computers - List configured computers with status
  • POST /api/wake - Wake specific computer ({mac, name, ip})
  • POST /api/wake-all - Wake all configured computers
  • POST /api/add - Add new computer ({name, mac, ip})
  • GET /api/scan - Network scan for devices

Development Notes

  • Application uses Romanian language in UI
  • No authentication/authorization implemented
  • Configuration persisted in volume-mounted /data directory
  • Flask runs in debug=False mode in container