A Widget Context Protocol (WCP) widget that generates QR codes for any text or URL. Fully self-contained — no external API calls, works offline.
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.
| Component | Default size | Description |
|---|---|---|
| QR Generator | 4x3 | QR code generator for any text or URL, with adjustable size |
docker run -d \
--name wcp-widget-qr-generator \
-p 3747:3747 \
-v qr_published:/app/published \
-e CONTAINER_NAME=wcp-widget-qr-generator \
--restart unless-stopped \
docker.io/penrithbeacon/wcp-widget-qr-generator:latest
services:
qr-generator:
image: docker.io/penrithbeacon/wcp-widget-qr-generator:latest
container_name: wcp-widget-qr-generator
ports:
- "3747:3747"
volumes:
- ./published:/app/published
environment:
- CONTAINER_NAME=wcp-widget-qr-generator
restart: unless-stopped
| Header | Required | Description |
|---|---|---|
Wcp-Instance-Id | Yes | Unique card instance identifier |
Wcp-Dashboard-Id | Yes | Dashboard installation identifier |
Wcp-Version | Yes | WCP protocol version of the requesting dashboard |
Wcp-Widget-Id | Yes | Widget identifier within the dashboard |
Wcp-Orchestration-Id | No | Active orchestration identifier (for state scoping) |
Wcp-Application-Id | No | Active application identifier (for state scoping) |
| Endpoint | Description |
|---|---|
GET /wcp | Container Directory — WCP two-tier discovery |
GET /widget/wcp | Widget Manifest with runtime publish status |
OPTIONS /wcp | CORS preflight (all widget routes) |
GET /widget/ | Compact dashboard view |
GET /widget/index | Widget Index — lists all controls |
GET /widget/health | Health check with container name |
GET /widget/icon.svg | Widget icon (SVG) |
GET /widget/api/guids | Component UUIDs for orchestration binding |
GET /widget/full | Full-page QR generator |
GET /widget/manifest | Lightweight manifest subset |
POST /widget/api/qr | Generate a QR code (JSON body) |
GET /widget/export.wcp | Self-export as .wcp package |
POST /widget/publish | Accept SPA HTML for Publish to Web |
DELETE /widget/publish | Remove published SPA |
GET / | Serve published SPA (if present) |
Generate a QR code:
curl -X POST http://localhost:3747/widget/api/qr \
-H "Content-Type: application/json" \
-d '{"text": "https://example.com", "size": 300}'
Response:
{
"status": "Success",
"text": "https://example.com",
"size": 300,
"format": "png",
"base64Image": "<base64-encoded PNG>"
}
| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | required | Text or URL to encode |
size | integer | 300 | Output image size in pixels (50-2000) |
| Property | Value |
|---|---|
| WCP Version | 2.1.0 |
| Widget Version | 1.8.0 |
| Render mode | iframe |
| Auth | None |
| Default card size | 4x3 |
| Multi-instance | Yes (stateless) |
| Property | Value |
|---|---|
| Base image | python:3.12-slim |
| Platforms | linux/amd64, linux/arm64 |
| Port | 3747 |
| Framework | Flask |
| Dependencies | Flask, qrcode, Pillow |
| Persistent storage | Published SPA only |
| Tag | Description |
|---|---|
latest | Most recent stable release |
1.8.0-wcp2.1.0 | /widget/index directory page, audit compliance |
1.7.0-wcp2.1.0 | /widget/health returns container name |
1.6.0-wcp2.1.0 | WCP 2.1.0 upgrade, orchestration ID context |
1.3.0-wcp2.0.0 | Container block, manifest image source |
1.2.1-wcp1.4.0 | Server UUID, Container Directory, Wcp-Widget-Id |
1.2.0-wcp1.3.1 | CORS headers, multi-instance support |
1.1.0-wcp1.3.0 | Mandatory components array |
Content type
Image
Digest
sha256:b19176b71…
Size
51.3 MB
Last updated
5 months ago
docker pull penrithbeacon/wcp-widget-qr-generator