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 386 forks source link

Integration with Gatsbyjs #250

Closed ramkumarkb closed 5 years ago

ramkumarkb commented 6 years ago

Given that Ponzu appears in the top-5 Headless CMS - https://headlesscms.org/, it will fantastic to have Ponzu-Gatsbyjs integration (similar to NetlifyCMS / Strapi)

References:

  1. Gatsbyjs - https://www.gatsbyjs.org/
  2. From React-Europe-2018 talk by @KyleAMathews - https://drive.google.com/file/d/1Zw-apX8HPnnWgL1hOENquDUeTnKkNlD4/view
  3. Gatsby Strapi plugin example: https://www.gatsbyjs.org/packages/gatsby-source-strapi/?=stra
nilslice commented 6 years ago

That sounds cool - I had started a JS / Typescript client for ponzu, based on the official Go client (https://github.com/ponzu-cms/go-client) but was distracted from the project. I'd love to see someone take the lead on it.

Do you have a proposal as to how you'd see this done? I have not used Gatsby but am familiar with the project. Ponzu exposes a very simple HTTP API, so writing a wrapper around some npm HTTP module would probably be fairly straightforward. This way, it could be integrated into other front-end frameworks as well.

ramkumarkb commented 6 years ago

Or another idea would be to offer GraphQL APIs natively (alongside REST APIs)?

There are some possible candidate Go libraries compared (listed in the 1st reference) and some discussions whether Models should be statically typed. Not sure which one would pan out better for Ponzu, having a pre-defined Schema would greatly reduce complexity?

References

  1. https://github.com/vektah/gqlgen
  2. https://news.ycombinator.com/item?id=16352611
vinceyoumans commented 6 years ago

interested... how is this project going? can I help out on this?

nilslice commented 6 years ago

@vinceyoumans - I don't think anything has started yet, so feel free to jump in however you see fit! If @ramkumarkb has any direction, maybe you could coordinate.

ghost commented 6 years ago

I am using qqlgen alot. It's a diamond in the rough. Clients don't need generated types which is freaking amazing.

I have integrated it with flutter and trinh to get it working with gophers / wasm now.

Ponzus place in all this is to be a content store. Types at this level can be generated from the graphql engine EASILY as well as the reference types. IPFS is using reference types too. The only thing ipfs adds is versioning which is just all type instances always doing an I sent and upping their version number. This is exactly how multi version sync between systems is evolving. You can garbage collect dead instances in the db when you need to later after szmymc.

The graphql engine is adaptable to different data stores.

Ponzus can be a great data store with a grpc top layer and great search and sync running all servers and clients and the material design inspector GUI. Or it can nclude the graphql tooling and bring it all together with a basic graphql GUI editor that reaches down into the existing ponzus per type GUI editor.

Seems like a perfect storm ?

olliephillips commented 5 years ago

Closing this issue. There's been no activity. Please reopen if need to.