Skip to content
/ Blog Public

Blog. Vercel, Node.js, React, Next.js, Material-UI, Sanity.io.

License

Notifications You must be signed in to change notification settings

nandotess/Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Blog

Production Site (frontend)

Production CMS (backend)

Database Project

Backend Project (CMS)

Frontend Project (Blog)

Notes

  • The main benefit to having the 3 applications running in different servers with different URLs is the possibility to restrict access (improving security). On the backend application (CMS), we could restrict access to it using a VPN, for example. For now, we are using SSO (Google). On the frontend application (Site/Blog), the database is currently only accessible on the server, so the URL and any other sensitive data are already hidden from the final user.

  • Sanity.io is used as the database source for a few reasons:

    • It's a cloud solution with a generous free tier.
    • Easy to create new datasets and models with no UI, only using JavaScript and terminal.
    • They offer a query language (GROQ) similar to GraphQL but with more resources. The main benefit from GROQ (as well as GraphQL) is the possibility to get data with relationships in one single query (different from the REST API specification).
    • All the images stored in their servers have CDN ready to go.
    • It's possible to have custom tokens for each application. Currently, there is a token for the site/blog (READ) and a token for the CSM (READ + WRITE).
  • Next.js + Vercel was the combination chosen for the frontend application (Site/Blog), among other things, because it delivers a powerful combination of Server Side Rendering and Static Generation. With the Incremental Static Generation, it's possible to have the static pages generated with a revalidation of the content pretty generous (the current configuration is set to one minute, that means all the content updated on the CMS will be live to the user, not more than 1 minute later). On top of that, all this static content is stored in Vercel's CDN.

  • Next.js + Vercel + Material-UI was the combination chosen for the backend application (CMS), among other things, because it delivers a powerful set of components ready to go. Authentication, Grids, Forms, ... there are many resources that make the creation of a CRUD system easy, so we can focus only on the business rules and not standards already defined by the industry.

About

Blog. Vercel, Node.js, React, Next.js, Material-UI, Sanity.io.

Resources

License

Stars

Watchers

Forks