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

  1. Obtain the Add-on

    • Download or clone the repository for the add-on you wish to install.

  2. Place in the nyra_packages Directory

    • Copy or move the add-on’s folder into the appropriate location (e.g., extension/ for standard modules).

  3. 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

  1. Initialization When the NYRA app starts, it checks the nyra_packages directory. Each add-on is initialized, registering its functionality with the NYRA runtime.

  2. Execution During operation, add-ons perform their tasksβ€”listening for events, sending data, or providing specialized features.

  3. 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