Below is my current routes:
api/v1/users/loginapi/v1/users/registerapi/v1/users/forgot
And so on...
I want to know, how can I create all these routes keeping a single file auth.dart let's say. So that I will be having all the code in single file related to authentications but the routes will remain as they are above mentioned.
Here's the current folder structure that is creating routes:

Dart Frog does not support having multiple routes in a single file, as it is a file-based routing framework.
What you can do however is setup the routes as you have in the screenshot, and define both a middleware and inject an
AuthManager:If you want your
AuthManagerto be per request, instead of using a global value you can construct it every time thecreate, that is the method you pass to the provider, is called:See the docs about dependency injection for more information