Files
wild-cloud/api
Paul Payne 2ed8c94d2a feat: Implement global SSE architecture and remove all polling
- Replaced all polling with Server-Sent Events (SSE) for real-time updates
- Created unified global SSE endpoint at /api/v1/events
- Implemented SSE broadcasting for operations, central status, and dnsmasq events
- Added SSE manager with wildcard subscription support for global events
- Created useGlobalSSE hook with singleton connection management
- Updated all frontend hooks to use SSE instead of polling:
  - useApps: SSE for app deployments and status
  - useSetupStatus: SSE for setup operations
  - useNodes: SSE for node management
  - useDnsmasq: SSE for DNS configuration
  - useCentralStatus: SSE for central daemon status
  - useServices: SSE for service management
  - useOperations: SSE for long-running operations
- Fixed CORS configuration for wild-central.lan access
- Fixed SSE connection loop issues with proper state management
- Added client-side event filtering for instance-specific updates
- Increased React Query staleTime since SSE provides real-time updates
- Added proper cleanup and reconnection logic with timeouts

This eliminates all polling overhead and provides instant UI updates
when cluster state changes occur.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-17 04:53:49 +00:00
..
2026-01-09 09:43:12 -08:00
2026-01-09 09:43:12 -08:00
2026-01-09 09:43:12 -08:00
2026-01-09 09:43:12 -08:00
2026-01-09 09:43:12 -08:00
2026-01-09 09:43:12 -08:00
2026-01-09 09:43:12 -08:00

Wild Central API

The Wild Central API is a lightweight service that runs on a local machine (e.g., a Raspberry Pi) to manage Wild Cloud instances on the local network. It provides an interface for users to interact with and manage their Wild Cloud environments.

Development

Start the development server:

make dev

The API will be available at http://localhost:5055.

Environment Variables

  • WILD_API_DATA_DIR - Directory for instance data (default: /var/lib/wild-central)
  • WILD_DIRECTORY - Path to Wild Cloud apps directory (default: /opt/wild-cloud/apps)
  • WILD_API_DNSMASQ_CONFIG_PATH - Path to dnsmasq config file (default: /etc/dnsmasq.d/wild-cloud.conf)
  • WILD_CORS_ORIGINS - Comma-separated list of allowed CORS origins for production (default: localhost development origins)

API Endpoints

The API provides the following endpoint categories:

  • Instances - Create, list, get, and delete Wild Cloud instances
  • Configuration - Manage instance config.yaml
  • Secrets - Manage instance secrets.yaml (redacted by default)
  • Nodes - Discover, configure, and manage cluster nodes
  • Cluster - Bootstrap and manage Talos/Kubernetes clusters
  • Services - Install and manage base infrastructure services
  • Apps - Deploy and manage Wild Cloud applications
  • PXE - Manage PXE boot assets for network installation
  • Operations - Track and stream long-running operations
  • Utilities - Helper functions and status endpoints
  • dnsmasq - Configure and manage dnsmasq for network services

See the API handler files in internal/api/v1/ for detailed endpoint documentation.