> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upio.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> How to create your custom RocketCore Plugin

Hello! This is a guide on how to create your own plugin for RocketCore. **This documentation is incomplete and made by reverse engineering the RocketCore Plugin API** so it **may not be completely accurate!**

<Info>
  **Prerequisite** Have a basic understanding of javascript
</Info>

# Creating your first plugin

Find where your RocketCore folder (**and not where the bootstrapper is located**)
Then open the data/Plugins folder and create a new folder with the name of your plugin.
Next add a `index.js` file inside of your newly created folder.

Inside the `index.js` file, you are expected to export a function named `initialize` which will be called by RocketCore when the plugin is loaded.
Here is an example of a simple plugin:

```js RocketCore/data/Plugins/ExamplePlugin/index.js theme={null}
const fs = require("node:fs");

// unfortunately, the rocketcore console is not implemented yet
// in the meantime, we will create a file to test the plugin api
function createPlugin(PluginApi, dataFolderPath) {
  fs.writeFileSync(dataFolderPath + "/test.txt", "Hello World!");
}

module.exports = {
  initialize: createPlugin
}
```

`dataFolderPath` is the path to the folder where the "RocketCore" folder is located. **NOT WHERE THE BOOTSTRAPPER IS LOCATED**

To learn more about the Plugin API, check out the [Plugin API Documentation](/rocketcore/plugins/plugin_api)
