EzyPlatform Plugin Development Quickstart
Updated at 1784975202000Overview
This post walks through everything you need to go from zero to a working EzyPlatform plugin running on your machine. It's a roadmap for developers who are new to building plugins/themes for EzyPlatform, pulling together the existing detailed guides in the order you should actually follow them.
If you prefer learning by video, check out the EzyPlatform Theme & Plugin Programming course, which follows roughly the same path as this post.
Prerequisites
Before you start, make sure your machine has:
- JDK 8 (EzyPlatform currently runs on JDK 8).
- MySQL as the database.
- Apache Maven to build the project.
- IntelliJ IDEA (the Community edition is enough).
Install EzyPlatform (without Docker)
First, you need a local EzyPlatform server for your plugin to be installed into and tested against.
Main things to do:
- Install JDK 8 and set the
JAVA_HOMEenvironment variable, then verify withjava -version. - Install MySQL.
- Download the EzyPlatform package and extract it.
- Open
settings/setup.propertiesand fill in your MySQL connection details. - Run
bash cli.sh "console admin"(Linux/MacOS) or.cli.bat "console admin"(Windows). Once you seeEZYHTTP READY, the admin server has started successfully. - Go to
http://localhost:9090/setup-adminto create your first super admin account.
It's also a good idea to set an `EZYPLATFORM_HOME` environment variable pointing to your installation folder — it makes the later steps easier to manage.
Detailed guide: Install EzyPlatform
Install the EzyPlatform SDK
The EzyPlatform SDK provides the
ezy.sh/ezy.bat command-line tool, which lets you scaffold plugin projects, export modules, link plugins, and more, instead of doing everything by hand.Main things to do:
- Download the EzyPlatform SDK from ezyplatform.com and extract it, for example into
app/ezyplatform-sdk. - Set the
EZYPLATFORM_SDKenvironment variable to point to that folder. - Add
$EZYPLATFORM_SDK/binto yourPATHso you can callezy.sh/ezy.batfrom anywhere. - Clone the
ezyplatform-developmentrepository and runbash build.sh(or.build.baton Windows) to build the shared libraries needed for plugin development.
Detailed guide: Install the EzyPlatform SDK
Install IntelliJ IDEA
Download and install IntelliJ IDEA if you don't already have it — the free Community edition at [github.com/jetbrains/intellij-community](https://github.com/jetbrains/intellij-community) works fine. This is the IDE you'll use throughout the rest of the guide to import, build, and run your plugin.
Create a plugin
Once the SDK is set up, use the
ezy.sh cp (create project) command to scaffold a new plugin project with the standard structure.For example, to create a project called
hello-world with admin plugin, theme, and web plugin modules:ezy.sh cp hello-world -g com.example -i admin-plugin,theme,web-plugin
After that:
- Import the project into IntelliJ as a Maven project.
- Run
bash export.sh(or.export.bat) to export the modules to your local EzyPlatform server. - Run the
HelloWorldAdminPluginStartupTesttest class to start the server in dev mode. - Go to
http://localhost:9090, log in as admin, and activate the plugin you just created.
Note: In IntelliJ, change the run configuration's working directory to the specific module's folder instead of leaving it at the project root — this is what makes static assets (CSS/JS/images) auto-reload when you edit them.
Detailed guide: Create a plugin
Fix IntelliJ not recognizing path variables (if needed)
On Windows, IntelliJ sometimes fails to pick up environment variables like
EZYPLATFORM_HOME, which breaks the build. If you run into this, work through the following escalating steps and stop as soon as the error is gone:- Create the
EZYPLATFORM_HOMEenvironment variable at the OS level. - Re-declare that path variable in IntelliJ's settings.
- Add the VM option
-Denv.EZYPLATFORM_HOME=/your/pathplus a matching environment variable in your Maven configuration (both for importing and running). - Set it directly in the project-level run configuration, on the startup class itself.
Detailed guide: Fix IntelliJ not recognizing path variable
Learn the plugin project structure
Before writing code, it's worth spending a few minutes reading through the project structure generated in step 4 so you know where things go. A plugin project typically has these modules:
- admin-plugin: models, controllers, static files, and templates for the admin interface.
- sdk: shared classes used across the other modules.
- socket-app / socket-plugin: handles socket-based communication.
- theme: web theme resources.
- web-plugin: models, controllers, and views for the web-facing side.
Each module follows standard Maven conventions (
src/main/java, src/main/resources), where static/ holds images/CSS/JS and templates/ holds Thymeleaf templates. Two config files matter most: module.properties (module metadata, required for every module except sdk) and menus.properties (admin sidebar menu definitions).
You can also look at the book-store example on GitHub to see how a real plugin is organized.
Detailed guide: The structure of a plugin project
Link a plugin
When your plugin needs to reuse another plugin's API or source code (say, EzyArticle), you "link" that plugin into your project instead of rewriting it from scratch.
Main things to do:
- Make sure EzyPlatform is running, then download the plugin you need (e.g. EzyArticle) from the marketplace and activate it.
- From your project's root directory, run the link command:
ezy.sh link ezyarticle
(on Windows, use
ezy.bat link ezyarticle)- Verify the result: the relevant modules' `pom.xml` files will have the new dependency added automatically, and the linked plugin's package will show up in the
@ComponentsScanof theXxxStartupTestclasses.
Once linked: a linked admin plugin adds menu items to the admin sidebar, a linked web plugin exposes additional APIs you can call, and a linked socket plugin makes its socket controllers available to you.
Note: You need the EzyPlatform SDK installed (step 2) before you can do this.
Detailed guide: Link a plugin
What's next
After completing these 7 steps, you will have a working plugin running on your local EzyPlatform. From here, you can explore the EzyPlatform CLI commands to manage the server more conveniently, or go deeper with the EzyPlatform Theme & Plugin Programming course.