Sign inSign up

penrithbeacon/wcp-widget-cloudflare

By penrithbeacon

•Updated 4 months ago

Image
0

1.2K

penrithbeacon/wcp-widget-cloudflare repository overview

⁠WCP Widget: Cloudflare

A Widget Context Protocol (WCP)⁠ widget that brings your Cloudflare account into any WCP-compatible dashboard. View Workers and their bound domains, browse zones and DNS records, and manage API credentials — all without leaving the dashboard.

Specification: widgetcontextprotocol.com⁠ | Part of the Penrith Beacon WCP⁠ widget suite.

WCP 2.1.0 certified. Full theme reception, orchestration-aware state, Publish to Web, WCP export.


⁠Components

ComponentDefault sizeDescription
Workers12x6Cloudflare Workers with bound domains
Domains + DNS12x6Zones list + DNS records
Settings12x6API Token, Account ID, Worker repo mappings
Help12x6Setup guide, FAQ, reference links

⁠Quick Start

docker run -d \
  --name wcp-widget-cloudflare \
  -p 3742:3742 \
  -v cf-data:/app/data \
  -v cf_published:/app/published \
  -e CONTAINER_NAME=wcp-widget-cloudflare \
  --restart unless-stopped \
  docker.io/penrithbeacon/wcp-widget-cloudflare:latest

⁠Docker Compose

services:
  cloudflare:
    image: docker.io/penrithbeacon/wcp-widget-cloudflare:latest
    container_name: wcp-widget-cloudflare
    ports:
      - "3742:3742"
    volumes:
      - cf-data:/app/data
      - ./published:/app/published
    environment:
      - CONTAINER_NAME=wcp-widget-cloudflare
    restart: unless-stopped

volumes:
  cf-data:

⁠Setup Guide

You need a Cloudflare Account ID and an API Token with these permissions:

ResourcePermission
Zone > ZoneRead
Zone > DNSRead
Account > Workers ScriptsRead
Account > Worker RoutesRead

Create a token at My Profile > API Tokens⁠. Then open the Settings component and paste both values in.


⁠WCP Request Headers

HeaderRequiredDescription
Wcp-Instance-IdYesUnique card instance identifier
Wcp-Dashboard-IdYesDashboard installation identifier
Wcp-VersionYesWCP protocol version of the requesting dashboard
Wcp-Widget-IdYesWidget identifier within the dashboard
Wcp-Orchestration-IdNoActive orchestration identifier (for state scoping)
Wcp-Application-IdNoActive application identifier (for state scoping)

⁠Endpoints

EndpointDescription
GET /wcpContainer Directory — WCP two-tier discovery
GET /widget/wcpWidget Manifest with runtime publish status
OPTIONS /wcpCORS preflight (all widget routes)
GET /widget/Compact widget card (iframe)
GET /widget/indexWidget Index — lists all controls
GET /widget/healthHealth check with container name
GET /widget/icon.svgWidget icon (SVG)
GET /widget/api/guidsComponent UUIDs for orchestration binding
GET /widget/workersWorkers component page
GET /widget/domainsDomains + DNS component page
GET /widget/settingsSettings component page
GET /widget/helpHelp component page
POST /widget/configureSave credentials and repo mappings
GET /widget/api/config-statusConfiguration status (token masked)
GET /widget/api/workersWorkers list (30s cache)
GET /widget/api/zonesZones list (120s cache)
GET /widget/api/dns/<zone_id>DNS records for a zone (30s cache)
GET /widget/export.wcpSelf-export as .wcp package
POST /widget/publishAccept SPA HTML for Publish to Web
DELETE /widget/publishRemove published SPA
GET /Serve published SPA (if present)

⁠WCP Compatibility

PropertyValue
WCP Version2.1.0
Widget Version1.4.0
Render modeiframe
AuthNone (credentials stored server-side)
Default card size12x6
Multi-instanceYes (per Instance-Id)

⁠Technical Details

PropertyValue
Base imagepython:3.12-slim
Platformslinux/amd64, linux/arm64
Port3742
FrameworkFlask
DependenciesFlask, requests
Persistent storageNamed volume for per-instance credentials

⁠Tags

TagDescription
latestMost recent stable release
1.4.0-wcp2.1.0/widget/index directory page, audit compliance
1.3.0-wcp2.1.0/widget/health returns container name
1.2.0-wcp2.1.0WCP 2.1.0 upgrade, orchestration ID context
1.1.0-wcp2.0.0Container block, manifest image source
1.0.1-wcp1.4.0Server UUID, Container Directory, Wcp-Widget-Id
1.0.0-wcp1.3.1Initial release

⁠Source

Tag summary

Content type

Image

Digest

sha256:8c0a1ad44…

Size

47.2 MB

Last updated

4 months ago

docker pull penrithbeacon/wcp-widget-cloudflare