Routing Problems

I am new to App Development with Shopify and I have some questions about the routing system of the react-router app template.

If I understand correctly, I create a file and name it in a certain way. Dots mean / and the letters between the dots are the paths: eg. test.path.tsx –> path/test

For dynamic content in the path one can use a $ and an optional name afterwards. eg. test.$id.path.tsx –> path/:id/test

Now I was wondering if it was possible to tell the system to use folders as paths. I have a somewhat big api and do not want to have my named files everywhere. It would be nice to be able to move those files into a dedicated api folder in the routes folder.

I know there is a basic way to get folders like the auth.login folder working with a route.tsx file. Would that be an option worth trying, or is there a better way?

:waving_hand: Not sure if you’re talking about app development or Hydrogen storefront development but either way the answer is yes: File Route Conventions | React Router