From dd67b20525f7583a2dc6c05fb9c754d2f7bbe1c4 Mon Sep 17 00:00:00 2001 From: Dymas Date: Mon, 26 Oct 2026 09:40:21 +0100 Subject: [PATCH] Publish starter plugin and theme resource catalog --- README.md | 16 +++++++ archives/plugin-bookmarks-0.1.0.zip | Bin 0 -> 831 bytes archives/plugin-notes-0.1.0.zip | Bin 0 -> 816 bytes archives/plugin-status-0.1.0.zip | Bin 0 -> 849 bytes archives/theme-default-0.1.0.zip | Bin 0 -> 252 bytes archives/theme-mint-0.1.0.zip | Bin 0 -> 248 bytes archives/theme-ocean-0.1.0.zip | Bin 0 -> 248 bytes catalog.json | 68 ++++++++++++++++++++++++++++ plugins/bookmarks/README.md | 5 ++ plugins/bookmarks/plugin.json | 6 +++ plugins/bookmarks/plugin.py | 3 ++ plugins/bookmarks/plugin.toml | 5 ++ plugins/notes/README.md | 5 ++ plugins/notes/plugin.json | 6 +++ plugins/notes/plugin.py | 3 ++ plugins/notes/plugin.toml | 5 ++ plugins/status/README.md | 5 ++ plugins/status/plugin.json | 6 +++ plugins/status/plugin.py | 3 ++ plugins/status/plugin.toml | 5 ++ themes/default/theme.json | 9 ++++ themes/mint/theme.json | 9 ++++ themes/ocean/theme.json | 9 ++++ 23 files changed, 168 insertions(+) create mode 100644 README.md create mode 100644 archives/plugin-bookmarks-0.1.0.zip create mode 100644 archives/plugin-notes-0.1.0.zip create mode 100644 archives/plugin-status-0.1.0.zip create mode 100644 archives/theme-default-0.1.0.zip create mode 100644 archives/theme-mint-0.1.0.zip create mode 100644 archives/theme-ocean-0.1.0.zip create mode 100644 catalog.json create mode 100644 plugins/bookmarks/README.md create mode 100644 plugins/bookmarks/plugin.json create mode 100644 plugins/bookmarks/plugin.py create mode 100644 plugins/bookmarks/plugin.toml create mode 100644 plugins/notes/README.md create mode 100644 plugins/notes/plugin.json create mode 100644 plugins/notes/plugin.py create mode 100644 plugins/notes/plugin.toml create mode 100644 plugins/status/README.md create mode 100644 plugins/status/plugin.json create mode 100644 plugins/status/plugin.py create mode 100644 plugins/status/plugin.toml create mode 100644 themes/default/theme.json create mode 100644 themes/mint/theme.json create mode 100644 themes/ocean/theme.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..6b26068 --- /dev/null +++ b/README.md @@ -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//plugin.json` or `themes//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. diff --git a/archives/plugin-bookmarks-0.1.0.zip b/archives/plugin-bookmarks-0.1.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..1df492f62da0bd4bae880bfa5f7b4948ce2133dc GIT binary patch literal 831 zcmWIWW@Zs#U|`??Vnv3!1sm&60a>Dq3=Et=I>^=0#n)9YH^sEyH|wwiPwRKPqs@Ag z9AbnaT|`y)#( zW*%4(^dP?FpWnlfSCNJ8^OTz{zHx80lYX_yZ|22Up%rI@>-58G z?znKrez)Oy5q{byEh6Pq=H`F;t-pjnWU?%MZ>l|4EAwPpWW|2(Lw;`_uDO|6en6vZ zQ`Hx@w<}whq{?!fEV0>n=E(2E)9&OPWxB_r!&e;G6c|)=`@`S;Ww+!5P&^#G-cc?N z=+QbL<_6+|oYM5nJiV;q{JhZ9hI|bQJPsG<2Aj;~J$ThOzbQbOapl5CNqcrH?%J_$ ze!V6Gj~x4fnU;CmTn?^F+$L>0@828G7|!2<7Tc|w)@+-=eq3{6HqRah(WtB@ks^`5 zed?k=)fQLh2Hbtci0X`GQ!{6}0<8}LVov`&EdFpoQpV0I@e?~j(#2MWa`dWb}e9!px`ky*~{+zGQDZOWpnmn{`Eb`3AC}Lzl zwJUGc$2c3H9sWR!^gSr2FlBa;X-?xX~?4Gfkvf+%>xLf3{KArMUr3`-h60+~qB sgRT)h2oV}9fQcC%py=ArLj$4h2|^nvYy!Ml*+7ykK==SidoqD|02(zB>i_@% literal 0 HcmV?d00001 diff --git a/archives/plugin-notes-0.1.0.zip b/archives/plugin-notes-0.1.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..68579910bcf4541c700ddfd81a40c5362d3534dc GIT binary patch literal 816 zcmWIWW@Zs#U|`??Vnv3weZB{d16jO`3=Et=I>^=0#n)9YH^sEy(Tl~A$Mt({7r$N_ z+Y-G8ULtooIo7q$dv!n8@UG|VC6ap@*gtg4JF-epv0LT+^U3wi>AY3fZ38oE3l3!L zQn<&N$#O7tuC_us?~($m9gp?c z8|D-;PFZDAV5C^69{hT}QSX(Vn&BHaO}(Lc`1gU6Q40d)ZKk*=h8q5QZ=+Ka{$Vr! zi@fg)s7~lecxB`WwAu%VK>-eRLP4ds_Nnus8vedr{@Pw=e09(3pSq^4=c%LRsoSN0 zLeuyB8SStWXLL{KYXzS0J>%DV{fD zBtJK&TMukr_tR58fg3^tPJv7cdvwbCj4x~9UxhoHt}J?V=8w&Uj>dTl=QRq2Cpo6s zI9-{*4YYufNrV}9+5y@G21^=26g(xNYeSC&h$aSxC5`WZOr$75*N7f;2#tln)C&(t fbZzJ%fzWmnp$!x+0p6@^AW0S=d;p}am_R%L@ahDT literal 0 HcmV?d00001 diff --git a/archives/plugin-status-0.1.0.zip b/archives/plugin-status-0.1.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..3fa1572ea929c903d534f207f29dc914aed34347 GIT binary patch literal 849 zcmWIWW@Zs#U|`??Vnv4K-=$+u0$Kcw3=Et=I>^=0#n)9YH^sEy(eJPWkL!2KR#mZF zRTJ@qR)?f+hc&B9J_)<|zB%}9#Vgh-hQ1S?1x*w7Z1}rx|DX3S?pEhtE7ecPcrTF= z5_!Vjahqb1PAT7{7rYyT?muw-lC$;vj(B&qg8Es4wT7#TXLAK#nfxI_?bpuQ%dfX> zxl-DH*kO5EYogm`AJz4j_Ad@u-)YCQzUTKnO%_=6TFkTG5c+Kt_0`5+b&Yp=8v_!t*&>l9y?>r=+zYQ^jKwy z*MX!d)_SFn6qhmTiN46ZlDaNRw^gt#PRb&6PVq2m*goQbZcCOa8W1A>3H{y9sa@t#186c8o(xjEf>VB@-n9jnkD0+&~)`nM9azCoZ5> zV6dbSM8T69x;FGUf@or3Skm|b$V7@UbdBgihtN0)n7rWuiLMPjC=l9yBD8@5CcvAO Q4J63|gb#ppG!uvi04NX_uK)l5 literal 0 HcmV?d00001 diff --git a/archives/theme-default-0.1.0.zip b/archives/theme-default-0.1.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..22dc6fceda897c705c6701a48ad70bb9817d02f4 GIT binary patch literal 252 zcmWIWW@Zs#U|`??Vnv1@2RCkN1G0_-F&7Y*WTfV%>SYz@=lP!X<~wA-!*Ze4KQXm; z(Wcb1f;$?d{jaY08PXZuB2eCbfotQ(N0G*#-*ohd7b_}DRPtu|^$NM0?D@BN!LCQ* zUoE%Z&t>Axp2VTQ458J;fp*>Ps~hGLIf zIiD>bY@fgCx_k2U$1}P=2_)M6K-OL$<^tl9jMUszy{zK=JlkGJJ|;y0miNEAIMbc4 zt*-y@j6EVFc9X#bM$=*3URPe2aYy}ePfoK$_QgrPu`Cbb zXLqmf_si{iu5wj}F{{cqKfs%jNrV}^|Ffd^IXpw@-Zn2v_7o!H(Y3z zlDoI1S6t%3OjT|k#<1j`@^G=Btq+o#&0xBBnR$RWBa;X-ZnpxR3kFLXK@`H}0p6@^AQ46&v;fkpKpX}D DJ(5zG literal 0 HcmV?d00001 diff --git a/catalog.json b/catalog.json new file mode 100644 index 0000000..ff74e1c --- /dev/null +++ b/catalog.json @@ -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" + } + ] +} diff --git a/plugins/bookmarks/README.md b/plugins/bookmarks/README.md new file mode 100644 index 0000000..15157ac --- /dev/null +++ b/plugins/bookmarks/README.md @@ -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. diff --git a/plugins/bookmarks/plugin.json b/plugins/bookmarks/plugin.json new file mode 100644 index 0000000..9afd277 --- /dev/null +++ b/plugins/bookmarks/plugin.json @@ -0,0 +1,6 @@ +{ + "id": "bookmarks", + "name": "Bookmarks", + "description": "A shared collection of useful links.", + "version": "0.1.0" +} diff --git a/plugins/bookmarks/plugin.py b/plugins/bookmarks/plugin.py new file mode 100644 index 0000000..f2481bd --- /dev/null +++ b/plugins/bookmarks/plugin.py @@ -0,0 +1,3 @@ +from web_framework.starter_plugins import make_bookmarks + +plugin = make_bookmarks() diff --git a/plugins/bookmarks/plugin.toml b/plugins/bookmarks/plugin.toml new file mode 100644 index 0000000..587ca1c --- /dev/null +++ b/plugins/bookmarks/plugin.toml @@ -0,0 +1,5 @@ +[plugin] +id = "bookmarks" +name = "Bookmarks" +version = "0.1.0" +api_version = 1 diff --git a/plugins/notes/README.md b/plugins/notes/README.md new file mode 100644 index 0000000..511a06d --- /dev/null +++ b/plugins/notes/README.md @@ -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. diff --git a/plugins/notes/plugin.json b/plugins/notes/plugin.json new file mode 100644 index 0000000..429fe89 --- /dev/null +++ b/plugins/notes/plugin.json @@ -0,0 +1,6 @@ +{ + "id": "notes", + "name": "Notes", + "description": "Shared notes with persistent content.", + "version": "0.1.0" +} diff --git a/plugins/notes/plugin.py b/plugins/notes/plugin.py new file mode 100644 index 0000000..a5edec1 --- /dev/null +++ b/plugins/notes/plugin.py @@ -0,0 +1,3 @@ +from web_framework.starter_plugins import make_notes + +plugin = make_notes() diff --git a/plugins/notes/plugin.toml b/plugins/notes/plugin.toml new file mode 100644 index 0000000..22b8330 --- /dev/null +++ b/plugins/notes/plugin.toml @@ -0,0 +1,5 @@ +[plugin] +id = "notes" +name = "Notes" +version = "0.1.0" +api_version = 1 diff --git a/plugins/status/README.md b/plugins/status/README.md new file mode 100644 index 0000000..80dca95 --- /dev/null +++ b/plugins/status/README.md @@ -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. diff --git a/plugins/status/plugin.json b/plugins/status/plugin.json new file mode 100644 index 0000000..fe1d273 --- /dev/null +++ b/plugins/status/plugin.json @@ -0,0 +1,6 @@ +{ + "id": "status", + "name": "Workspace status", + "description": "Local uptime and configured integration counts. No external polling.", + "version": "0.1.0" +} diff --git a/plugins/status/plugin.py b/plugins/status/plugin.py new file mode 100644 index 0000000..08c05b8 --- /dev/null +++ b/plugins/status/plugin.py @@ -0,0 +1,3 @@ +from web_framework.starter_plugins import make_status + +plugin = make_status() diff --git a/plugins/status/plugin.toml b/plugins/status/plugin.toml new file mode 100644 index 0000000..8124a1d --- /dev/null +++ b/plugins/status/plugin.toml @@ -0,0 +1,5 @@ +[plugin] +id = "status" +name = "Status" +version = "0.1.0" +api_version = 1 diff --git a/themes/default/theme.json b/themes/default/theme.json new file mode 100644 index 0000000..b0ba23c --- /dev/null +++ b/themes/default/theme.json @@ -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" +} diff --git a/themes/mint/theme.json b/themes/mint/theme.json new file mode 100644 index 0000000..9f9a79f --- /dev/null +++ b/themes/mint/theme.json @@ -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" +} diff --git a/themes/ocean/theme.json b/themes/ocean/theme.json new file mode 100644 index 0000000..24869cd --- /dev/null +++ b/themes/ocean/theme.json @@ -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" +}