restoapp

Custom Module Development


Overview

A RestoApp module is a self-contained Sails.js hook installed under the modules/ directory. The framework discovers and loads all folders there automatically — no registration needed.

Modules can:

The demo-mode module in modules/demo-mode/ is the canonical reference implementation — all patterns shown here are taken from it.


Quick start

# Copy the demo-mode scaffold
cp -r modules/demo-mode modules/my-module

# Edit identity
# → modules/my-module/package.json  (name, appId, hookName)
# → modules/my-module/defaults.js   (default config key)

Restart the app — your module loads automatically.


Next steps

Topic File
Directory layout and required files structure.md
Defining Waterline models models.md
Startup code and hook lifecycle bootstrap.md
Adding pages to the admin panel adminpanel.md
Registering MCP tools mcp-tools.md
Updating modules to v2.4 how-to-update-modules-for-v2.4.md