ponzu-cms / ponzu

Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
https://docs.ponzu-cms.org
BSD 3-Clause "New" or "Revised" License
5.68k stars 387 forks source link

Best practicse wanted #283

Closed edl7878 closed 5 years ago

edl7878 commented 5 years ago

I think ponzu is fantastic.

after dig into the docs, I still have some thing to ask.

1 Is ponzu is designed as a datastore of contents and can generate apis to access contents? so, in theory, the front end (end user front such as web pages) whould have to be implimented seperatedly? and if things like this, what is the best practise to develop the front end(web pages)?

2 as ponzu contents could be added by admin user, but in working enviourment, admin would not be given to end user. so what is the best practise to setup users with roles? such as some roles can edit users content, while other roles can only edit product contents ,things like that.

3 any crud apis posting contents that provided by ponzu could be pended and have to be approved by admin, or auto approved by ponzu. while in the later situation, what is the best practise to apply role based control of content crud?

even through the admin can crud contents, but as doc shows that this is for developing, so the upper 3 question is vital for developing.

thanks for your attention.

olliephillips commented 5 years ago

This issue hasn't had an answer, and is now quite old. I am going to add an answer for completeness and close it.

  1. Yes. The front end could either be a clientside application using JavaScript to make requests to Ponzu, or a serverside application, running on the same server as Ponzu, or a different one. Which is chosen will depend on which technologies are most familiar.

  2. (and Q3 also) Beyond admin, there is no notion of roles in Ponzu. By default it is not possible to add items over the API. To open this up, the creatable and maybe mergeable interfaces should be looked at. The former allows item creation over API, while mergeable will remove the need for an admin user to review/approve, and automatically make it public for GET requests over the API.