Publish starter plugin and theme resource catalog

This commit is contained in:
Dymas committed 2026-10-26 09:40:21 +01:00
commit dd67b20525
23 files changed
+168

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# Web Framework Resources
Reusable plugins and theme templates for [Web Framework](https://gitea.coreplay.eu/Dymas/web-framework).
The default catalog is `https://gitea.coreplay.eu/Dymas/web-framework-resources/raw/branch/main/catalog.json`.
Open **Config → Add resources**, search, and install a plugin or theme. Restart the application, then enable it under **Plugins** or select it under **Themes**. Existing bundled plugins and default themes remain available without downloading anything.
Each `plugins/<id>/plugin.json` or `themes/<id>/theme.json` declares an ID, name, description, and version. Plugins include `plugin.py`; the starter templates reuse the framework's factories. Themes declare `mode` (`dark`, `light`, `system`), `accent` (`violet`, `blue`, `green`), and `density` (`comfortable`, `compact`). Theme templates reuse the framework's design tokens and layouts.
## Publish resources
Store newly developed plugins and themes here. Keep source directories and versioned ZIP archives in the repository. ZIP files contain resource files at their root, with no enclosing directory. Add entries to `catalog.json` with `type`, all metadata fields, a relative `archive` URL and the archive's SHA-256 digest. Increment a resource's version whenever its files change. Framework installs do not overwrite existing resources; operators back up and remove an old installed directory before installing a replacement. Installed data stays in the application's control store.
Catalog schema version 1 uses a top-level `resources` array. Custom catalogs follow this same format. Only configure trusted repositories: installing plugins allows their Python code to execute at the next application startup. Downloads require no repository credentials, so publish catalogs and archives for read access by the application.
The initial six resources can be regenerated using `PYTHONPATH=. python tools/prepare_resources.py /path/to/web-framework-resources` in the framework repository. Add custom entries separately before publishing; the exporter regenerates the bundled catalog.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+68
View File
@@ -0,0 +1,68 @@
{
"schema_version": 1,
"resources": [
{
"id": "notes",
"name": "Notes",
"description": "Shared notes with persistent content.",
"version": "0.1.0",
"type": "plugin",
"archive": "archives/plugin-notes-0.1.0.zip",
"sha256": "e31e7f5183b26529b4d1dde5a6d63a9bb89a2c711fcd6df016c5ceaa94fcd192"
},
{
"id": "bookmarks",
"name": "Bookmarks",
"description": "A shared collection of useful links.",
"version": "0.1.0",
"type": "plugin",
"archive": "archives/plugin-bookmarks-0.1.0.zip",
"sha256": "108d9d997b6ada86085f24c365c0ecca84c751cf97e5908bb1ef7994440fd291"
},
{
"id": "status",
"name": "Workspace status",
"description": "Local uptime and configured integration counts. No external polling.",
"version": "0.1.0",
"type": "plugin",
"archive": "archives/plugin-status-0.1.0.zip",
"sha256": "d27edcc6dea923dac0d2ee8ffe3d097b14bf3937873ab0cdad0c1767c4b82260"
},
{
"id": "default",
"name": "Default",
"description": "The bundled default workspace theme template.",
"version": "0.1.0",
"mode": "dark",
"accent": "violet",
"density": "comfortable",
"type": "theme",
"archive": "archives/theme-default-0.1.0.zip",
"sha256": "c97e167fc1ba89739047c8fc1c7df2c3e8aee4b43be38c6ac3e0aba62f95f85f"
},
{
"id": "mint",
"name": "Mint",
"description": "The bundled mint workspace theme template.",
"version": "0.1.0",
"mode": "dark",
"accent": "green",
"density": "comfortable",
"type": "theme",
"archive": "archives/theme-mint-0.1.0.zip",
"sha256": "e1f377986a0bd8bd575b2d1df1f368d7c46c17018bdc71baad90b9358f66a3cb"
},
{
"id": "ocean",
"name": "Ocean",
"description": "The bundled ocean workspace theme template.",
"version": "0.1.0",
"mode": "dark",
"accent": "blue",
"density": "comfortable",
"type": "theme",
"archive": "archives/theme-ocean-0.1.0.zip",
"sha256": "73441601fdbb60efc37c754bb1042374945f217daab3c850f56ae539fd8b78c8"
}
]
}
+5
View File
@@ -0,0 +1,5 @@
# Bookmarks
Generated from the bookmarks template. Restart the workspace, then enable this plugin in Config → Plugins.
Add business logic in plugin.py. Use require_permission('content.write') for mutations; include csrf_token() in forms. Do not store secrets in templates.
+6
View File
@@ -0,0 +1,6 @@
{
"id": "bookmarks",
"name": "Bookmarks",
"description": "A shared collection of useful links.",
"version": "0.1.0"
}
+3
View File
@@ -0,0 +1,3 @@
from web_framework.starter_plugins import make_bookmarks
plugin = make_bookmarks()
+5
View File
@@ -0,0 +1,5 @@
[plugin]
id = "bookmarks"
name = "Bookmarks"
version = "0.1.0"
api_version = 1
+5
View File
@@ -0,0 +1,5 @@
# Notes
Generated from the notes template. Restart the workspace, then enable this plugin in Config → Plugins.
Add business logic in plugin.py. Use require_permission('content.write') for mutations; include csrf_token() in forms. Do not store secrets in templates.
+6
View File
@@ -0,0 +1,6 @@
{
"id": "notes",
"name": "Notes",
"description": "Shared notes with persistent content.",
"version": "0.1.0"
}
+3
View File
@@ -0,0 +1,3 @@
from web_framework.starter_plugins import make_notes
plugin = make_notes()
+5
View File
@@ -0,0 +1,5 @@
[plugin]
id = "notes"
name = "Notes"
version = "0.1.0"
api_version = 1
+5
View File
@@ -0,0 +1,5 @@
# Status
Generated from the status template. Restart the workspace, then enable this plugin in Config → Plugins.
Add business logic in plugin.py. Use require_permission('content.write') for mutations; include csrf_token() in forms. Do not store secrets in templates.
+6
View File
@@ -0,0 +1,6 @@
{
"id": "status",
"name": "Workspace status",
"description": "Local uptime and configured integration counts. No external polling.",
"version": "0.1.0"
}
+3
View File
@@ -0,0 +1,3 @@
from web_framework.starter_plugins import make_status
plugin = make_status()
+5
View File
@@ -0,0 +1,5 @@
[plugin]
id = "status"
name = "Status"
version = "0.1.0"
api_version = 1
+9
View File
@@ -0,0 +1,9 @@
{
"id": "default",
"name": "Default",
"description": "The bundled default workspace theme template.",
"version": "0.1.0",
"mode": "dark",
"accent": "violet",
"density": "comfortable"
}
+9
View File
@@ -0,0 +1,9 @@
{
"id": "mint",
"name": "Mint",
"description": "The bundled mint workspace theme template.",
"version": "0.1.0",
"mode": "dark",
"accent": "green",
"density": "comfortable"
}
+9
View File
@@ -0,0 +1,9 @@
{
"id": "ocean",
"name": "Ocean",
"description": "The bundled ocean workspace theme template.",
"version": "0.1.0",
"mode": "dark",
"accent": "blue",
"density": "comfortable"
}