Create a special package

I want to make a package that installs some code and some prerequisite packages.
Where can I start?

my simple advice is to keep track of the packages you install and why they were installed by you (because in the near future the package(s) might not be available anymore)

if you need to do it after installing openwrt on your router, you can create your custom script with the list of commands to install the software you want

if you still need to do this before installing openwrt on your router then you could use:

I think there are tons of info available: