···11+# Module level architectural overview
22+Modules are groups of commands, events and more.
33+They export those, and provide a combined title, description and the discord name of the user who created them, using the author field.
44+55+## Modules
66+Each module *can* contain a set of commands, events or subscribers.
77+88+Subsribers are similar to events, but are related to the internal Lifecycle management of the bot, not Discord.
99+1010+These are the properties a module is required to provide:
1111+- name (a small and concise name for the module, e.g. "statistics")
1212+- description (a small text, which describes the use-cases of the module)
1313+- author (discord username of the module's author)
1414+- exports (an array of ModuleExportItem's, each containing a `source` and uninstantiated `loader` property)
+24
docs/architecture/registry-level.md
···11+# Registry level architectural overview
22+The Registry level of our architecture mainly focuses on Registries, exported Module data structure, Lifecycle events, and first database interactions, to track Registry/Module states.
33+44+## Registries
55+All Registries will follow a common Registry structure.
66+77+The following properties are required:
88+- store (Where the raw structure of imported Modules is stored)
99+1010+The following methods are required:
1111+- collect (uses the ModuleLoader to collect the raw JSON output of all registry modules) [registry::preCollect, registry::postCollect]
1212+- load (uses various loaders to prepare Module contents, based on the Module's exports property, which exports an array of ModuleExportItem's.) [registry::preLoad, registry::postLoad]
1313+- activate (activates the registry and all contained features) [registry::preActivate, registry::postActivate]
1414+- unload (deactivates all modules stored in the registry and the registry itself) [registry::preUnload, registry::postUnload]
1515+1616+1717+### ModuleExportItem
1818+Each Module provides a public `exports` property, which is an array of ModuleExportItem's, each ModuleFetchItem provides a `source` and a `loader` property.
1919+2020+The `source` property is a simple path, pointing to a directory or file.
2121+The `loader` property takes an uninitialized loader class, which is then instantiated by the Registry, while loading the Module.
2222+2323+2424+@Todo: document registry error-notify feature, which uses a Module's author field, to notify the user of an error, directly within Discord.