Hexo Node Admin revamped

The original Hexo Node Admin was published more than 2 years ago. I want to take this time to revamp this whole project so that it is still relevant. Take a look here.

This time I use React.js with Material UI to write the whole front end. I’ve been using Vue.js for quite some time before I started looking at React. Vue.js was quite intuitive because its .vue file structure is basically a combination of HTML+JS+CSS. This reduces a lot of problems if you are transitioning from the good old technologies. In React, basically we are writing Javascript, for everything. This means we have the most flexibility for almost anything, on the other hand, it messes things up for HTML and CSS if you are not doing the right things.

JSON Web Token is a good solution for authentication of these SPAs (single page application) because by using it, the whole back end can now be stateless, meaning it does not have to maintain state (if user is logged in) like we did in the v0 of Hexo Node Admin where the back end maintains sessions. This is achieved by tokens, tokens that are signed and verified by JWT libraries according to the protocol. Writing a simple middleware should do the job for a lot of cases.

Now that I have experienced Vue and React these two popular frameworks, I could say that personally I see myself like React more. This is largely due to React’s strong atmosphere of Javascript. I’m a huge fan of Javascript and that hits the spot. By adopting the syntax of Javascript, the file structure seems more clear and everything combined seems more consistent than what appears in Vue.