Giter Site home page Giter Site logo

tylim88 / firelaw Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 1.61 MB

🔥Write truly safe and scalable Firestore Rules, Transpile Typescript to Security Rules!

License: MIT License

JavaScript 6.42% TypeScript 93.34% Shell 0.24%
typescript firebase firestore firestore-rules transpiler scalable

firelaw's Introduction

Firelaw 烈火戒

Created by tylim88   License   dependency count   package size   github action   code coverage   GitHub issues   code coverage   Total alerts   Language grade: JavaScript

I decided to stop working on this project after I found out that the security rule methods does not support nested object well enough, the language has too much limitation.

Hence it is pointless to continue this project, there is no enough value.

You should be ok with read operations, because read rule is quite simple, but this is not the case with write operations.

My advice is to validate your data in cloud function instead, and use good libraries like yup, joi and zod.

You lose optimistic update in front end, but I think that is acceptable.

If you don't want keep the optimistic update, use trigger instead.

TLDR, Firestore security rule suck, don't use it with nested object.

Update

I will repurpose this library into VS Code extension that lint types of Firestore Security Rules based on Firelord type

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.