I created something I believe is exactly like this a while ago, one called xrest [0] which resolves the API endpoint routes from the file tree structure at runtime, and another called restree [1] which generates the routes before runtime by generating code.<p>[0] <a href="https://github.com/rajnathani/xrest" rel="nofollow">https://github.com/rajnathani/xrest</a><p>[1] <a href="https://github.com/rajnathani/restree" rel="nofollow">https://github.com/rajnathani/restree</a>