Coder Social home page Coder Social logo

habibtalib / vuexfire-admin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vue-bulma/vuexfire-admin

0.0 1.0 0.0 194 KB

A Vue / Vuexfire app with Firebase auth. Based on vue-admin, using vuex, vuexfire, vue-router and firebase as the backend.

License: MIT License

JavaScript 24.74% Vue 75.13% HTML 0.13%

vuexfire-admin's Introduction

vuexfire-admin

A Vue.js 2 admin app, based on vue-admin, using vuex, vuexfire, vue-router and firebase as the backend.

This project aims to be a template for using Firebase as a backend, and vue-admin as a frontend.

A lot of work has been done in a private repository and I'm currently in the progress of migrating this across to this public repo.

Current features developed:

  • Vuexfire for Firebase integration
  • Firebase auth
  • Ability to set a password (including Firebase reauth flow handling)
  • Ability to link multiple auth providers
  • Frontend Notification dispatching system (ie. not integrated with Cloud Messaging) and default notifications
  • Protected Routes
  • A User dashboard
  • A basic User Notes taking feature, where completed / incompleted notes are shown on the User dashboard. Along with new note form that accepts a title, and wysiwyg body field (Quill)

Installation

NOTE: This app assumes you have a working Firebase instance with at least one of the auth providers; Google, Facebook, Github or Password enabled.

  1. Update config/firebase.env.js with your firebase config variables
  2. npm install
  3. Open node_modules/bulma/sass/utilities/mixins.sass and add @import './variables' to first line. (issue with Bulma 0.5.0)
  4. npm run dev

Firebase Rules

This app requires the following firebase rules (for notes facility)

{
  "rules": {
    // ".read": true,
    // ".write": false,
    "users": {
      ".indexOn": "ID",
      "$uid": {
        ".validate": "$uid === auth.uid",
        // grants write access to the owner of this user account
        // whose uid must exactly match the key ($uid)
        ".write": "$uid === auth.uid",
        ".read": "auth != null && auth.uid == $uid"
      }
    },
    "notes": {
      ".indexOn": "uid",
        ".read" : "data.child(auth.uid).exists()",
      "$uid": {
        ".write": "$uid == auth.uid",
      }
    }
  }
}

WARNING !!!

THIS APP SETS FIREBASE REFS /users AND /notes !!!!

If you already have data at these refs, be sure to change the ref names in the file /client/firebase-setup/ref-types.js. Otherwise, it will most likely be overwritten.

Additional work

I have a companion node.js server app that runs on heroku. It watches the firebase database and performs database actions using firebase-admin sdk.

I will aim to make this app publicly available too, but optional (ie. not required for vuexfire-admin to work).


Credits

This project is inspired or powered by these people or projects so I want to thank them

vuexfire-admin's People

Contributors

pi-ron avatar

Watchers

Habib Talib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.