I’m a little confused by the new ColdBox template structure and was hoping someone could clarify the current best practice.
Back in 2025, when building a REST API with the default ColdBox template, I was used to organizing versioned API modules like this:
modules_app/api/modules_app/v1/
That would usually give me routes like:
/api/v1/
With the newer template, though, the whole application now seems to live under /app , so I’m not sure whether that same convention still applies.
If I’m building a REST API with the new template, should I still be organizing things the old way with modules_app/api/modules_app/v1/ , or is there now a newer preferred structure for versioned API endpoints?
Just trying to understand what the recommended approach is now.
I don’t think the new web root approach affects how you organize the app modules. That hasn’t changed. Also, it’s worth pointing that just because some of our templates use the inside-out approach, doesn’t mean you have to. You’re free to still use the typical “everything in the webroot” approach if you prefer it.
Your API module would use the same structure, just in the /app folder, /app/modules_app/api/modules_app/v1/ which would still give you the /api/v1/ route you are used to
Essentially, if the client needs direct access to something (like CSS, Images, etc) it would go in /public and if it is being processed through CF (ColdBox) it would be in the /app folder. This allows your ColdBox app to be outside of the directly accessible web root.