Can a page URL be set to be under a group or folder?

Can I set a page url under a group e.g

/posts/slug instead of just /slug

I tried it but it shows a 404 page.

That should be fine, can you try publishing the project and then using create-plasmic-app to see if it shows up there?