Goals of this proposal

  1. For every person to have a single authenticated digital identity containing all of their personal information
  2. To enforce all services, corporations, businesses and governments to use this digital identity as the source of truth and not store any personal information on their own servers.
  3. To give each person the power to control exactly who has access and to what personal information.
  4. The entire system to be decentralized and encrypted such as to not be susceptible to hacking or denial of access.

Benefits

Firstly who could possibly not want this:

Criminals. Since every person will only be allowed one identity and that single identity will be used with all…


Reusable GraphQL queries in Gatsby and Gridsome

_Background

After doing a few projects in both Gridsome and Gatsby, I found that certain queries or more specifically, the same data, was being requested more than once in different components, pages and views.

__Problem

This leads to to the same data being transferred over the wire multiple times, and because queries by default aren’t reusable, GraphQL doesn’t do any lookups to see if it might already have executed a similar query.

Less requests = Faster site

A simple example where this might happen is on a blog site. On the front page you might be displaying a list of the recent…


Building a PWA has become a lot easier with the help of plugins and libraries such as @vue/cli-plugin-pwa however, though they set up a service-worker and manifest file they don’t handle updates so well.

The reason for this is that cache isn’t properly cleared once a new site is built and installed, and from what I can tell it all has to do with the fact that the service-worker doesn’t tell the difference between different versions of your PWA.

Version it

Assuming you have used the aforementioned @vue/cli-plugin-pwa plugin, we need to update three files to get cache busting to work.

Service-worker.js

The…


This is a continuation on setting up rules for a very simple Firestore collection set. If you haven’t yet you can read the first part here. Read Part 1

Firestore-rules-starter is a GitHub repo containing the custom functions that we created in part 1. You can either use the entire file to start off with or just copy out the functions as you need.

We finished the rules for the users’ collection in part1 and can now start with the groups, polls & votes collection. Here is a reminder of what our Firestore database looks like:


Firestore logo

After spending 100s of hours trying to wrap my head around Firestore rules and the total lack of proven rules not available on the internet, I’ve decided to plot the gotchas, tradeoffs and pure silliness known as Firestore rules.

Firebase does mention a number of good rules in this article here which I won’t repeat but will rather be expanding on

The Setup

To put everything in perspective we’ll be creating a very simple polling app. We’ll have users that can update their own profile, create new groups, polls and cast votes on polls within groups they belong to. …


https://github.com/u12206050/gridsome-firebase-starter

UPDATED: The Gridsome Firebase Starter now includes the gridsome-source-firestore to build static pages and content with data directly from Firestore.

What is Gridsome?

Gridsome is a Vue based framework for building lightning fast static websites. Using data from your CMS, Markdown or any available data API and populating a GraphQL database, Gridsome generates and builds your website based on pages and templates you create. READ MORE

Gerard Lamusse

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store