Addon System
Overview
NYRA add-ons offer:
Modular Expansion β Add features or custom logic without modifying NYRA itself.
Easy Distribution β Package and share add-ons so others can reuse or adapt them.
Automatic Loading β Simply place add-ons in the correct directory, and theyβll be detected when the NYRA app runs.
Add-on Directory Structure
Below is the default directory layout. When you place add-ons under nyra_packages/, the NYRA app will automatically load them at startup:
. βββ nyra_packages/
βββ extension/
β βββ <extension_foo>/
β βββ <extension_bar>/
βββ extension_group/
β βββ <extension_group_x>/
βββ protocol/
βββ <protocol_a>/Each subfolder corresponds to a particular category of add-on:
extension/ β Holds individual extensions or modules.
extension_group/ β Contains add-ons designed to run in specific thread groups.
protocol/ β Manages protocol-specific implementations for data handling or networking.
Installing an Add-on
Obtain the Add-on
Download or clone the repository for the add-on you wish to install.
Place in the nyra_packages Directory
Copy or move the add-onβs folder into the appropriate location (e.g., extension/ for standard modules).
Start or Restart the NYRA App
The NYRA runtime scans nyra_packages/ at launch and automatically loads recognized add-ons.
Uninstalling an Add-on
Removing an add-on is as simple as deleting its folder from nyra_packages/. Be sure to check that nothing else in your app depends on it.
Versioning and Updates
Version Checks β Keep track of add-on versions to ensure compatibility with your NYRA runtime.
Updates β If a newer version of the add-on is released, replace the old folder with the updated one. Restart the app to load the latest version.
Add-on Lifecycle
Initialization When the NYRA app starts, it checks the nyra_packages directory. Each add-on is initialized, registering its functionality with the NYRA runtime.
Execution During operation, add-ons perform their tasksβlistening for events, sending data, or providing specialized features.
Deactivation or Removal You can deactivate or remove an add-on by deleting its folder or disabling it through configuration files (if supported).
Best Practices
Keep Add-ons Self-Contained β Bundle all necessary scripts or dependencies within the add-on folder.
Document Each Add-on β Provide a README for future reference or collaborators.
Test Thoroughly β Test add-ons both standalone (if possible) and integrated within a full NYRA application.
Summary
The NYRA Add-on System allows for seamless, modular enhancements to your applications. By placing add-ons in nyra_packages/, you ensure automatic loading at startup. This approach simplifies development, promotes code reusability, and keeps your core NYRA framework clean and maintainable.
Last updated