How to create an extension contract?

I have created a NFT contract, but it only lets the admin to mint NFTs to an address, is there any way I can create an extension contract and have a minting logic which can be called by any address and mint NFT to that address?
I saw the function “mintExtension” but it doesn’t require admin to call them, so I hope this can be the solution I need, but I’m confused whether I need my extension contract to use Manifold’s libraries or something?
Can someone please shed some light on this to me?

You can find information on extensions here:

Hey thanks for this, I had gone through different extensions on Manifold’s GitHub, so I think the contract “ERC721EditionBase.sol” is suitable for my usage, how can I add it as an extension to my existing contract?

See here:

Hey Wilkins Thanks for that, now it’s more clear.
But I have some more doubts, so my requirement is that I need a custom mint function which doesn’t require the admin to call the call the mintNft function to mint the NFT to a particular address, can you give any insights on how I can achieve this?
From the docs I understood that to create a extension contract I need to implement the interface and then override respective function, but in your GitHub repo I can only see interfaces for buring approval & setTokenURI, not any interface for mint functionalities.
So in this particular repo I can see an interface which have mint functionalities, can I use them?
“packages/edition/contracts/IERC721Edition.sol”

your assistance on this would be really appreciated

Your extension can define any mint interface you like, and in turn calling that interface would call your token contracts mintExtension, which it would have access to once you register it.