but just know, the sparkplug kit is quite outdated (patches welcome!). It may serve as a guide though.
after looking through the sparkplug kit, you should also download the spark source code from https://github.com/IgniteRealtime/Spark and see how the plugins are done there (under src/plugins).