Core DevPre-alpha
Custom addons workspace
Goal: keep sumeru/ and sumeru_addons/ read-only while you develop client modules under addons/.
Summary
The sibling directory sumeru_custom_addons/ is a Go workspace with:
- Its own
go.modandreplacedirectives to core and standard apps - Generated
addonimports/zimports.go(blank imports for every addon onaddons_path) - Local
sumeru.conf(gitignored) - Makefile targets that delegate SWC builds to
../sumeru
Pre-shipped reference: addons/engagement_cookbook — kitchen-sink demo (all view types and widgets). It is not recreated by make new MODULE=engagement_cookbook; clone the repo to get it.
Quick start
- Copy
sumeru.conf.example→sumeru.confand set database +addons_path(typically../sumeru/addons,../sumeru_addons,./addons).
- From
sumeru_custom_addons/:
make setupmake install MODULES=engagement_cookbookmake run| Target | Effect |
|---|---|
make setup | go.mod replaces, make generate, SWC assets, create sumeru.conf if missing |
make run / make dev | generate → assets → HTTP server |
make generate | Refresh addonimports/zimports.go, each addon's zmodels.go / zrefs.go, overwrite init.go |
make new MODULE=x | Scaffold minimal module under addons/, then generate |
make install MODULES=x | -i then exit |
make update MODULES=x | -u then exit |
- After adding a model struct or changing
dependsin a manifest, runmake generateagain. Do not hand-edit generated files.
Client assets
Browser bundles are built in ../sumeru/core/engine/assets/ and are not committed to git. make setup and make run build them automatically. Requires Node.js on the machine running those commands.