stuff
This commit is contained in:
101
CLAUDE.md
101
CLAUDE.md
@@ -32,19 +32,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
**main.py** - Main GUI application entry point
|
||||
- `VPNManagerWindow` class: Primary PyGObject/GTK3-based GUI application
|
||||
- Implements single-view layout with Gtk.Stack for smooth transitions
|
||||
- Two-column layout: active customers (left) vs inactive customers (right)
|
||||
- Features system tray integration using `pystray`
|
||||
- Uses GNOME-style theming with CSS styling for cards
|
||||
- Includes advanced search functionality with wildcard support (`*`)
|
||||
- Uses GNOME-style theming with CSS card styling
|
||||
- Includes comprehensive logging system with collapsible log view
|
||||
- HeaderBar for native GNOME look and feel
|
||||
- Current location tracking and display
|
||||
- Current location tracking and enhanced display with network topology
|
||||
|
||||
**models.py** - Type-safe data model definitions using dataclasses and enums
|
||||
- `ServiceType`: Enum for service types (SSH, Web GUI, RDP, VNC, SMB, Database, FTP)
|
||||
- `HostType`: Enum for host types (Linux, Windows, Windows Server, Proxmox, ESXi, Router, Switch)
|
||||
- `VPNType`: Enum for VPN types (OpenVPN, WireGuard, IPSec)
|
||||
- `Service`: Individual services on hosts with type-safe enums and port numbers
|
||||
- `Host`: Physical/virtual machines with services and recursive sub-hosts (VMs)
|
||||
- `Host`: Physical/virtual machines with multiple IP addresses, services, and recursive sub-hosts (VMs)
|
||||
- `Location`: Customer locations with VPN configurations and host infrastructure
|
||||
- `CustomerService`: Customer's cloud/web services (O365, CRM, etc.)
|
||||
- `Customer`: Top-level entities containing services and locations
|
||||
@@ -66,8 +66,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
**widgets/** - Modular UI components using PyGObject
|
||||
- `customer_card.py`: `ActiveCustomerCard` and `InactiveCustomerCard` classes
|
||||
- Active cards: Interactive buttons for customer services and full location details
|
||||
- Inactive cards: Read-only service lists and location activation buttons
|
||||
- **Compact tree-like design**: Hierarchical layout with expand/collapse arrows
|
||||
- **Card styling**: Customer cards contain location subcards with proper visual hierarchy
|
||||
- **Multi-column layout**: Fixed-width columns for proper alignment (name, IP, actions)
|
||||
- **Service action icons**: Direct access buttons for SSH, RDP, Web GUI with tooltips
|
||||
- **Multiple IP support**: Display primary IP with hover tooltip showing all addresses
|
||||
- Active cards: Full interaction with connection controls and infrastructure details
|
||||
- Inactive cards: Activation buttons and current location setting
|
||||
- `location_card.py`: `ActiveLocationCard` and `InactiveLocationCard` classes
|
||||
- Active cards: Connection controls, deactivation (X button), and infrastructure details
|
||||
- Inactive cards: Current location setting and activation buttons
|
||||
@@ -76,6 +81,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
- Service buttons for direct access to SSH, Web GUI, RDP services
|
||||
- `__init__.py`: Widget exports for clean imports
|
||||
|
||||
**services/** - VPN and credential management (modular architecture)
|
||||
- `vpn_manager.py`: NetworkManager (nmcli) integration with .ovpn file support
|
||||
- `passbolt_client.py`: Passbolt CLI client for secure credential management
|
||||
- `connection_manager.py`: High-level orchestrator combining VPN and credentials
|
||||
- Support for flexible credential storage (direct username/password or Passbolt UUIDs)
|
||||
|
||||
**views/** - Comprehensive logging system
|
||||
- `log_view.py`: `LogView` class with collapsible interface
|
||||
- **Command logging**: Real-time capture of nmcli and system command output
|
||||
- **Color-coded levels**: Info, success, warning, error with visual distinction
|
||||
- **Auto-scroll**: Automatic scrolling to latest entries with manual override
|
||||
- **Expandable/collapsible**: Bottom panel that can be hidden to save space
|
||||
|
||||
**Configuration Files**
|
||||
- `init_config.py`: Helper script to initialize user configuration with examples
|
||||
- `example_customer.yaml`: Complete example showing YAML schema with all features
|
||||
@@ -93,13 +111,16 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
- **Active/Inactive**: Locations can be activated for VPN management
|
||||
- **Current Location**: User's physical location (separate from VPN connections)
|
||||
- **Connection State**: VPN connection status independent of location activation
|
||||
- **Network Topology**: Each location includes internal networks and external endpoints
|
||||
- **Credential Management**: Flexible credential storage (direct or Passbolt UUID)
|
||||
- Automatic UI updates based on state changes with immediate feedback
|
||||
|
||||
**Single-View UI Architecture with Stack Navigation**:
|
||||
- Uses `Gtk.Stack` for smooth view transitions with crossfade animation
|
||||
- **Normal mode**: Shows only active locations (full detail view)
|
||||
- **Search mode**: Shows only inactive locations (activation and current location setting)
|
||||
- Clean visual separation with no overlapping or confusing dual-column layouts
|
||||
**Two-Column Layout Architecture**:
|
||||
- **Left column**: Active customers with full location details and infrastructure
|
||||
- **Right column**: Inactive customers available for activation
|
||||
- **Compact design**: Tree-like hierarchy with proper indentation and alignment
|
||||
- **Real-time filtering**: Search affects both columns simultaneously
|
||||
- **Dynamic reorganization**: Customers move between columns based on location state
|
||||
|
||||
**Widget-Based Component System**:
|
||||
- Modular widget classes handle their own GTK widget creation and event handling
|
||||
@@ -118,7 +139,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
The application tracks two distinct location concepts:
|
||||
- **Current Location**: Where the user physically is (set via "Set as Current" button)
|
||||
- **Active Locations**: Locations available for VPN connections
|
||||
- Current location is displayed prominently above the search bar
|
||||
|
||||
**Enhanced Current Location Display**:
|
||||
- **Prominent info box** with customer name, location, and VPN type
|
||||
- **Host count summary** with VM breakdown (e.g., "3 hosts (7 total with VMs)")
|
||||
- **Collapsible infrastructure section** with detailed host and VM information
|
||||
- **Network topology display**: Internal networks and external endpoints
|
||||
- **Visual host type icons** (🐧 Linux, 🪟 Windows, 📦 Proxmox, 🌐 Router, etc.)
|
||||
- **Hierarchical VM display** with service counts and multiple IP addresses
|
||||
- **Multi-interface support**: Hosts can have multiple IP addresses (firewalls, routers)
|
||||
- Users can set current location from inactive location cards without activating VPN
|
||||
|
||||
### Search and Discovery Features
|
||||
@@ -142,16 +171,24 @@ The application tracks two distinct location concepts:
|
||||
|
||||
### UI Layout Structure
|
||||
|
||||
**Modern Single-View Design**:
|
||||
- HeaderBar with title and subtitle (GNOME HIG compliance)
|
||||
- Current location display (centered, prominent)
|
||||
- Search entry with comprehensive placeholder text (supports `*` wildcard)
|
||||
- Single-view layout using Gtk.Stack for smooth transitions
|
||||
- **Normal mode**: Active locations with full interaction (connections, services, infrastructure)
|
||||
- **Search mode**: Inactive locations with activation and current location setting
|
||||
**Modern Two-Column Design**:
|
||||
- HeaderBar with title and current location display
|
||||
- **Enhanced current location info box** with network topology and collapsible infrastructure
|
||||
- Search entry with real-time filtering across both columns
|
||||
- **Left column**: Active customers with full interaction (connections, services, infrastructure)
|
||||
- **Right column**: Inactive customers with activation and current location setting
|
||||
- **Compact tree-like cards** with customer cards containing location subcards
|
||||
- **Fixed-width columns**: Proper alignment of host names, IP addresses, and action icons
|
||||
- **Collapsible log view**: Bottom panel for command output and system logs
|
||||
- GNOME-style cards with CSS theming, proper spacing, and visual hierarchy
|
||||
- System tray integration for minimize-to-tray behavior
|
||||
|
||||
**Customer Card Features**:
|
||||
- **Active cards**: Start expanded, show full location details and services
|
||||
- **Inactive cards**: Start collapsed to save space during search
|
||||
- **Location count badges**: Show number of locations in parentheses
|
||||
- **Smooth expand/collapse**: Click arrow buttons to toggle content visibility
|
||||
|
||||
### GTK3/PyGObject Specific Features
|
||||
|
||||
- **CSS styling**: GNOME-style cards with borders, shadows, and adaptive theming
|
||||
@@ -188,12 +225,28 @@ locations:
|
||||
- name: Location Name
|
||||
vpn_type: OpenVPN|WireGuard|IPSec
|
||||
vpn_config: /path/to/config/file
|
||||
active: true|false # Available for VPN management
|
||||
connected: true|false # Current VPN connection status
|
||||
|
||||
# VPN credentials (three options):
|
||||
# Option 1: Dictionary with username/password
|
||||
vpn_credentials:
|
||||
username: vpnuser
|
||||
password: password123
|
||||
|
||||
# Option 2: Passbolt UUID (for future implementation)
|
||||
# vpn_credentials: "550e8400-e29b-41d4-a716-446655440000"
|
||||
|
||||
# Option 3: Omit or set to null if no credentials needed
|
||||
# vpn_credentials: null
|
||||
|
||||
# Note: active and connected are runtime state (not stored in config)
|
||||
|
||||
# Network topology information
|
||||
external_addresses: [vpn.domain.com, backup.domain.com] # VPN endpoints
|
||||
networks: [192.168.1.0/24, 10.0.1.0/24] # Internal networks
|
||||
|
||||
hosts:
|
||||
- name: Host Name
|
||||
ip_address: IP Address
|
||||
ip_addresses: [192.168.1.10, 10.0.1.10] # Multiple interfaces supported
|
||||
host_type: Linux|Windows|Windows Server|Proxmox|ESXi|Router|Switch
|
||||
description: Optional description
|
||||
|
||||
@@ -204,7 +257,7 @@ locations:
|
||||
|
||||
sub_hosts: # Optional VMs/containers (recursive structure)
|
||||
- name: VM Name
|
||||
ip_address: VM IP
|
||||
ip_addresses: [192.168.1.20] # VMs can also have multiple IPs
|
||||
host_type: Linux|Windows|Windows Server
|
||||
services: # Same structure as parent host
|
||||
- name: Service Name
|
||||
|
||||
Reference in New Issue
Block a user