My experience decapitating Mujina.se

Headless statue

How I rebuilt mujina.se headless using Sanity.io and Chakra UI.

For what crime?

Any young being will unavoidably go through some changes in image, behaviour and preferences before settling down. It is true for most things. Mujina is still an ambitious youngster sucking up all the knowledge it can get. Hence changes are all happening quickly.

The first iteration of the mujina website was built around a year ago as of typing this post. Our stack then was not really as up to snuff as it is today. While still very good and we are very proud of it. Most strings where either hardcoded and or stored in json files inside the repo. No big issue as long as you are a developer.

What led to this change then. Well we have since then built quite a few sites for clients. Clients are rarely if ever developers themselves. We then needed to use a CMS for content so the client could take care of the sites content. Well, what is easier then than looking through even the most structured of json files? Well a simple and nice interface of course.

code

Get Sane

We want customizability so we quickly decided that Sanity was the CMS for us. We were already using NextJS as our primary framework for any webapp we built, even the first version of Mujina.se was in NextJS. NextJS and Sanity seemed to get along splendidly so of we go.

So what is the most annoying part of next. Well, static props are at the page level. Fetching data on component level is a nono… unless, Next Data Hooks to the rescue. get the data on the page use it anywhere. Should be smooth sailing from here on right?


Author

Anton Appelblom
Happy Anton Appelblom

Anton Appelblom

Javascript-Developer

A developer that enjoys working on most things code. Multilingual, both in code and life.

Work.
  • Portfolio
Contact.
  • info@mujina.se
  • +46762951753
  • GDPR

Läs på svenska

© 2024 Mujina. All rights reserved