The structure of Forsbergd

The technologies of use and the reasoning behind chosing them.

date icon

May 24, 2022

time icon

5 minutes

Brief overview

The sites’ frontend is written in Next.js which serves a static site (SSG) and uses libraries such as styled-components, next-auth, next-seo, next-sitemap, react-quill.

The backend backbone is built with Node.js and Express.js. With security applications such as Json web tokens (JWT) to secure CRUD routes. The server queries and mutates data on a Postgresql database with the main tables Posts and Projects. This workflow creates a very simple way to manage the website. Since there will only be one user (admin, that’s me!) I found it inefficient to make a whole User table on the database. Instead, by using the Github Authentication API, the only allowed user to access the admin dashboard is my Github account.

The backend combined with the admin dashboard on the frontend works as a content management system (CMS), like any other technology you would find on the web.

Problems and the Future

After becoming more intermediate with GraphQL I seek to recreate the server queries and mutations, going from using REST to GraphQL. The reasoning behind this is the simplicity of using GraphQL and staying up to date with the state of art technologies to keep the site healthy.

A current problem with the sites’ usage of the outdated React-quill library. Since the library is not up to date with the latest React versions I need to code a custom rich text editor. This will be a bit of a hassle since I want to keep the current way of saving and updating posts. While this problem is still active, I can not update the site to more recent Next.js versions, which by itself hurts SEO and security.