Skip to content
Jon Crain edited this page Sep 16, 2020 · 4 revisions

Module creation is a now a simple endeavour, thanks to the new please make:module command.

Creating a module used to be a complex endeavour but thankfully there are plenty of examples and community support. Modules can really extend the functionality of MunkiReport, but care must be exercised to create them in such a way that does not create longer load times for the client and the server.

Design Principles for Modules

This is not meant to be an exhaustive list of principles, nor is it something that must be strictly followed. However, following these guidelines will hopefully create a better experience for all users.

  • use the please make:module to create the framework for the module
  • only send/store relevant data
  • don't send quickly changing data like timestamps. If quickly changing data is required, consider aggregating the data before sending
  • store states as booleans instead of strings (1 and 0's, not 'true' and 'false')
  • process the data client side as much as possible. Think distributed CPU vs. central CPU.
  • make all strings localizable via i18n
  • use the please make:migration script to create migrations
  • add some fancy graphs and widgets. The eye needs to be pleased as well!
  • document the module in the README.md
  • create proper indexes. Failure to do so may result in a slow running site.
Clone this wiki locally