Custom endpoint deployement

Because of some requirement like search bar which searches in multiple collection types at a time and top searches I have created custom endpoint in by extending the strapi code. But for production this does not seem to be a logical choice, as other teams would also be working on it. Could someone recommend me a feasible way to deploy this custom endpoints. It will be self hosted and not in strapi cloud.

Strapi version: 4.25.8
node: v20.16.0