I want to implement my own plugin, what should i look out for?

if i would like to customize and extend gitea, how can i do it without affecting gitea upgrades and being compatible with gitea in future?