# How to structure a plugin

## Plugin Folder

Your plugin must be uploaded in a .zip folder, with the manifest directly inside it, you should not place the manifest in any sub-folders.

Because of how Saturn detects and loads plugins, you must have your manifest in the root .zip file. It must not be in any sub-folders, Saturn won't load your plugin.

## manifest.json file

```
PluginSlug.zip
-> manifest.json
```

You can place the code, or anything else in sub-folders as long as you update your manifest to point to the correct file.

For example: If your main file is called main.php and it's in the /code folder. You should set your Startup value to "`code/main.php`"

Learn more about manifests here:

{% content-ref url="/pages/HTgUkip4BX3J5eLRrprO" %}
[Manifest](/1.0.0/dev/plugins/manifest.md)
{% endcontent-ref %}

## Your code

Your code can be in any number of sub-folders, as long as you link to it. Please see the above section for how to change your manifest.json to point to a sub-folder.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saturncms.net/1.0.0/dev/plugins/how-to-structure-a-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
