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.
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 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.
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;
}
}
}