DEV Community

Cover image for Chapter 2 // Building a Decentralised Blog
Luke Barnard
Luke Barnard

Posted on

Chapter 2 // Building a Decentralised Blog

Previously: https://dev.to/luke/chapter-1--building-a-decentralised-blog-2n8e

Hey guys and gals. It's been a while!

I went travelling around Asia for a bit, lost myself, found myself, found some great food. It was good.

Anyway, I've just taken a look at where I left my epic challenge to redefine blogging for a decentralised world.

Things are looking good; I've got half a frontend and am on my way to having a personal blog site! The slightly unfortunate news is that I've barely got time to think at the moment as I settle into my new job. But I'm feeling positive and I think I can at least push this to the point where my personal blog (and yours if you so choose) is shiny and ready for decentralisation.

The Plan

The Plan is to create a fool-proof API for the frontend that will allow anyone to write blog posts and have them rendered beautifully without much thought. This first stage will have reduced functionality:

This isn't to say I won't try and make efforts to continue once this first chunk is done, but plans change and it would be nice to leave it in a nice place (if I have to leave it at all).

To repeat my beautiful ascii art:

                   (3) 
    journal backend-----[matrix]
      |  |                 |
  (2) |  |         ________| (4)
      |  |        |  
      |  |        |  next.js
  ____|__:________|_________
 |                          |
 | journal web UI frontend  |
 |__________________________|
       | :
   (1) | |(2)
       | |
   web browser
Enter fullscreen mode Exit fullscreen mode

Above is the architecture of the finished system.

The plan is to create a reduced functionality "journal backend" that can only:

  • list articles
  • retrieve individual articles
  • somehow expose author details

My current thinking is to have the backend serve a directory structure of articles plus some configuration for the author details.

This set of files will in future be the output of a more complicated backend capable of:

  • scraping the [matrix] federation
  • sending live updates to the frontend

But for now the humble personal blogger will be responsible.

Naturally this competes directly with dev.to, but I have to say I think dev.to currently provides more functionality.

That's all I've got for now. Follow me for more updates 🚀

Top comments (0)