This article presents a simple starter (with authentication) that use creating dynamic apps with Gatsby. It uses concepts from the client-only routes section of the “Building Apps with Gatsby” documentation.
For newcomers, Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps. It's pretty smart & trendy.
Geeks can find here the Demo & Github sources. Anyway, this sample will be used into a real (documentation) project with public/private zones, and to do so, I need an authentication mechanism to separate the 'sensitive' information from the public domain.
Totally unrelated to this subject, in case you need to build a Full-Stack App you can generate it in React, Vue.js or Express in a few minutes using our generator (no account needed). I'm done :)
This demo is not using a real database, the single user is hard coded but, with a small amount of work, this code can be extended to have a database, or maybe I'll do it when I found some free time available.
So, the code is written, stable, feel free to play with it and suggest any improvements you consider to be applicable. In my mind comes only two:
- a database, (SQLite maybe)
- user roles. Regarding this topic, I didn't find any usable example.