Skip to content

vandorjw/firefly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

firefly

Netlify Status

Netlify with Google Firebase

Web Projects from 10 years ago didn't need to be bundled and minified. All I needed to do was write some html, style it with some css, and add some JavaScript.

This project uses VueJS without needing a build environment. 🌟

Instead of downloading 200+ Mb of node packages 💩 before I can write a single line of code, I have included only the packages I needed via <script> tags on index.html. 👍

I used the code found in https://firebase.google.com/docs/auth/web/password-auth for authentication and wrapped it up in a Vue Component.

Tools used

Firebase Auth

I created a firebase project which uses the free spark plan. For Auth I have allowed email and google as my sign in methods.

Firestore Data Model

Firestore is a document store, a little different if you are used to SQL for keeping data organized. I have a couple of collections, and still experimenting but I'll try and publish the data model when I am more settled.

Firestore Rules

I watched this video on how to configure the rules to my firestore database.

These are the rules I came up with so far.

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users {
      match /{userID} {
        allow create: if request.auth.uid == userID;
      }
      match /{userID}/tasks/{taskID}{
        allow create, write, read: if request.auth.uid == userID;
      }
    }
    match /blogposts/{post} {
    	allow read: if true;
      allow create: if request.auth.uid != null;
      allow write: if request.auth.uid == resource.data.author;
    }
    match /{restOfPath=**} {
      allow read: if true;
      allow write: if false;
    }
  }
}

About

Netlify with Google Firebase, created using VueJS -->

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published