Nexo Maker Docs
  • Welcome
  • Getting Started
    • Basic Concepts
      • Starting a Expansion
      • Compiling your Expansion
  • Visual API
    • Modularjs
      • Modularjs Basics
      • Styling
      • useState()
      • useEffect()
      • useGlobalState()
      • useProjectState()
    • [Deprecated] Components
      • Custom HTML documents
    • Themes
      • Replace Assets
      • Assets List
  • Functional API
    • Post Functions
      • Post Sidebar Button
      • Post Editor Module
    • Get Functions
      • Load Assets
      • Load File
      • Get Project
  • API Changelogs
    • Changelog 0.6.1
Powered by GitBook
On this page
  • 🧩 What Are Expansions?
  • πŸ“‚ Where Do Expansions Live?
  • πŸš€ Creating Your First Expansion
  • πŸ“„ Basic Template
  • πŸ“‘ Accessing the API
  1. Getting Started
  2. Basic Concepts

Starting a Expansion

How to start making your expansion

🧩 What Are Expansions?

Expansions are JavaScript-based modules that extend the functionality of Nexo Maker. They can execute commands, send and receive data, and dynamically modify or add content to the platform.

Each Expansion interacts with the core platform through the Nexo Maker API, giving developers a powerful way to create custom tools, automations, and UI integrations.


πŸ“‚ Where Do Expansions Live?

Nexo Maker automatically detects Expansions by scanning the following directory:

Documents > NexoMaker > Expansions

For an Expansion to be recognized, it must meet the following requirements:

  • Be placed inside its own subfolder under Expansions/

  • Contain a main.js file as the entry point

πŸ“ Example Structure:

Documents/
└── NexoMaker/
    └── Expansions/
        └── MyAwesomeExpansion/
            β”œβ”€β”€ main.js
            └── assets/
                └── customImg.png

πŸš€ Creating Your First Expansion

  1. Navigate to Documents > NexoMaker > Expansions

  2. Create a new folder with your expansion’s name (e.g. MyAwesomeExpansion)

  3. Inside that folder, create a main.js file

This main.js file should export your logic using the module.exports.init method. This is the entry point Nexo Maker will run when the Expansion loads.


πŸ“„ Basic Template

// main.js

module.exports.init = async function () {

  // Your Extension Code goes HERE
  
}
module.exports.metadata = {
    id: "your-expansion",
    version: "0.1"
}

Once structured correctly, Nexo Maker will automatically recognize and execute your Expansion. Metadata ID is required to load and match with your registered project in the Developer Portal. Metadata Version is also required to specify which version is installed and recognize updates.


πŸ“‘ Accessing the API

To interact with Nexo Maker, use the provided API functions available on api.nexomaker. For convenience, you can create a shorthand reference:

const nm = api.nexomaker;

This allows you to call API methods more easily:

const customIMG = await nm.loadAsset(__dirname + "/assets/customImg.png");

PreviousBasic ConceptsNextCompiling your Expansion

Last updated 18 days ago