{"repo":"expo/entity","free":true,"listed":false,"github":"https://github.com/expo/entity","clone":"git clone https://github.com/expo/entity.git","description":"Entity is a privacy-aware data layer for defining, caching, and authorizing access to application data models.","language":"TypeScript","stars":162,"topics":["data","privacy","authorization"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Entity Entity is a privacy-aware data layer for defining, caching, and authorizing access to application data models. Core Features - Typescript ORM. - Declarative actor pre-authorization of all CRUD operations using Privacy Policies. - Configurable data storage using Database Adapters. - Configurable, optional, full-object read-through caching using Cache Adapters. - Dataloader in-memory batching and read-through caching. Getting Started - Example application - Documentation Background Authorization is the process of determining whether a user has access to a piece of data or a feature. One could imagine a simple application with users and their photos. The authorization logic is simple: when the user loads their photos, only query photos WHERE user id = user.id . A more complex authorization system is most likely overkill at this point. Now, lets add teams to our simple application, where users on the same team can see each others' photos. The authorization logic becomes more complex: WHERE user id = user.id OR user id IN (list of users for all organizations that user belongs to) . While still maintainable, one can see that as requirements are added, this logic becomes increasingly difficult to express in just the query or simple checks in code. A common next step is to add an authorization system on top of the data loading layer. Pundit, Django Rules, and Laravel Policies are examples of excellent libraries that provide a method to authorize a piece of loaded data in the f","default_branch":null,"files":null,"tree":[],"storefront":"/r/expo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/expo/entity/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}