My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Introducing: The BERN Stack

PhiGuy's photo
PhiGuy
·Aug 13, 2018

MERN & MEAN

Many applications and websites that we interact with on a daily basis have followed the MERN and MEAN stack. For those of you not in the know, those acronyms are broken down as follows

  • MERN: Mongo, Express, React, Node
  • MEAN: Mongo, Express, Angular, Node

This particular stack is a great combination of tools and frameworks that developers can learn and follow. The reason why developers follow one particular stack over another is for the continuous development on the integration of these individual tools. Developers are constantly writing new modules, packages and patches to make each of the components function better individually, and in combination.

Blockchain Web Applications

Blockchain web applications have been pieced together, typically with React or any number of other JavaScript frameworks. The problem is there is no standard, no tools, and no defined framework or stack to follow. MERN is not quite the right stack, because the blockchain does not store the data in a MongoDB. There is no express app mediating the connection between the website and the blockchain.

Furthermore, many cryptocurrency users are reasonably critical of the applications that they plug their sensitive private keys into on the web. These websites can be fraudulent, or compromised by hackers.

The BERN Stack

BERRN = Blockchain - Electron - (React - Redux) - Node

The BERRN stack aims to solve a number of the problems that the crypto world is facing at the moment.

The application needs to be able to connect to the blockchain safely and reliably. Electron allows us to do this because it allows us to write applications for the web, and package it into an app that is executable on our desktop machine. This isolated environment gives us a better experience for interacting with our cryptographic assets.

Websites that you store cryptocurrency on, should be SSL secured, but there is no real way of validating the developers of the website. With respect to running an electron application, you are immediately notified if the application is missing a developer certificate. The developer certificate will give you an indication into who developed the application that you are about to use and whether or not you can trust them.

Most applications that you interact with should ideally be open sourced so you (or someone more knowledgeable than you) can read the source code and validate that there is no malicious code that is going to expose the keys that you are using within the application. This has become a standard for the blockchains behind the magic, but not the applications that sit on top of the blockchain.

React and Redux are great libraries for developers dealing with Blockchains because most blockchains are essentially complex state machines. They have an internal state that is updated on a regular basis (whenever a block is published, or transactions are added to the system). Receiving updates from the blockchain can be handled by your javascript, funnelled into your redux store, and React will pick up and render the changes. A good crypto application should give you the most up to date reflection of what is happening on the blockchain, in real time.

Examples of BERN Applications