Flarum extensions have their backend in PHP, and their frontend in Javascript. I would recommend that you start by taking a look at our documentation: https://flarum.org/docs/extend/, as well as the source code of some existing extensions. If you have questions, please feel free to ask!