Search code examples
databasenext.jsquillheadless-cmsgraphcms

Headless CMS like Graph CMS and Sanity CMS


I am creating a publishing website similar to medium.com where users can register and publish.

Therefore, I was considering using Graph CMS or Sanity CMS but I did not understand what they meant by only 3 or 4 non-admin users included in the pricing plan (like the basic plan). Does it mean only 3 or 4 people can publish and others can read-only?

If yes, I am considering a tech stack of Next.js and Prisma. I have found some good Next.js templates for my case and I need to connect to Prisma.

But there is one problem. I am not sure about how to deal with images in posts as posts can contain an arbitrary number of images. AFAIK, Quill.js automatically creates a base64 form of images.

In my case, Should I store images as base64 inside HTML string as follows:

quill.js example response

In other words, I would really appreciate if anyone can suggest to me the best deal with images. I have been researching about it for two days but could not find a good answer to my problem.

UPDATE: I have found this question: link

But I think this person also just saved images in base64 form


Solution

  • Go self-hosted. Then you aren't restricted by user seats (or changes in pricing structure which might lock you out in future).

    For small blogs I host on Heroku, which hibernates when you're not using it, so if you statically render you can make it cost effective.

    For managing multiple users etc, you might find Webiny a good solution. Once you have installed it on your AWS account, you aren't limited to the number of users, and can create them programmatically.

    Webiny would also solve the issue with images for you: it comes with a build in file manager that is cached over CDN, so it's pretty fast.

    If I'm not mistaken it already uses Quill too. Though I'm not sure on the specifics of image delivery.

    I recently built a starter for Next.js which might help you: https://github.com/webiny/nextjs-starter-webiny

    [UPDATE] Sorry, my bad: Quick is not the text editor we used, it was https://editorjs.io.