loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.92k stars 1.06k forks source link

Wish list of LoopBack Next extensions #512

Closed raymondfeng closed 3 years ago

raymondfeng commented 7 years ago

A list of potential extensions for LoopBack Next.

Add a πŸ‘ reaction to any of the comments below if you are interested in seeing these features / extensions

ritch commented 7 years ago
  1. Actions for REST/HTTP req/res processing
    • CORS
    • Logging
    • Rate Limiting
    • Authorization
    • Express/KOA middleware
ritch commented 7 years ago
  1. Transports/protocols
    • WebSocket
    • MQTT
    • gRPC (HTTP2 & ProtoBuffer3)
ritch commented 7 years ago
  1. API styles
ritch commented 7 years ago
  1. Cloud native integration
    • Docker/compose/k8s/
    • Istio: Metrics/Distributed tracing
    • Bluemix/AWS/Azure
ritch commented 7 years ago
  1. Built-in models
    • User/Team/Organization
    • Application
    • AccessToken
ritch commented 7 years ago
  1. Mixins
ritch commented 7 years ago
  1. Connectors
ritch commented 7 years ago
  1. CLI commands
ritch commented 7 years ago
  1. Caching
ritch commented 7 years ago
  1. Boot
    • OpenAPI Specs
    • Controllers
    • Repositories/Services
    • Components
    • Model definitions
    • JSON schemas
    • OpenAPI specs
    • WSDL/XML Schema
    • GraphQL Schema
    • ...
    • Data sources
    • Connectors
    • gRPC service/message
    • ...
proreact-mj commented 6 years ago

A visual builder/app inspector to develop, modify and debug a Loopback4 app. ARC, but more functionality API Connect Developer Toolkit, but without the IBM account tie-in. Node-RED, but for Loopback :)

VMois commented 6 years ago
  1. Connectors
jpventura commented 6 years ago

A well defined connector fintech/payment interface whose services such as credit cards, Plaid, PayPal, Android Pay, Apple Pay could be reduced to.

VinayaSathyanarayana commented 6 years ago

CMS like Keystone.js

kattsushi commented 6 years ago
howientc commented 6 years ago

Left and Inner Joins on queries. Perhaps just use GraphQL with something like Join Monster to generate smart SQL behind the scenes.

bajtos commented 6 years ago

Cross-posting from https://github.com/strongloop/loopback-next/issues/540 (cc @delebash)

Offline first synchronization

In loopback 3 you have offline sync abilities. I think being able to have two way sync from local to remote database is very important. At least for me :)

PouchDB is a good example of offline first synchronization

Another example not reliant on CouchDB is DexieJs seems like they have a nice synchronization component built in and are nearing version 2.0 release

ovidius72 commented 6 years ago

A customizable control panel for administrators similar to strapi.io ? Could this be provided as an extension ?

ElBiG12 commented 6 years ago
ganeshkbhat commented 6 years ago

Feature/External Component Support

Please remove whatever is implemented. I have not read 4.0 docs completely

Extarys commented 6 years ago
Extarys commented 6 years ago
Extarys commented 6 years ago

To extend what @jpventura said about a payment interface. Could add Stripe.

stablehacks commented 6 years ago

FireStore connector

sbacem commented 6 years ago

Client SDK for Angular

ernie58 commented 6 years ago

Soft Deletes

rhysjtevans commented 6 years ago

Multi-Tenant Model Generator

isrmicha commented 6 years ago

Integrating SDK for Angular 2+

bajtos commented 5 years ago

Crypto shredding

Quoting from the latest ThoughtWorks Technology Radar:

Maintaining proper control over sensitive data is difficult, especially whenβ€”for backup and recovery purposesβ€”data is copied outside of a master system of record. Crypto shredding is the practice of rendering sensitive data unreadable by deliberately overwriting or deleting encryption keys used to secure that data. For example, an entire table of customer personal details could be encrypted using random keys for each record, with a different table storing the keys. If a customer exercised their "right to be forgotten," we can simply delete the appropriate key, effectively "shredding" the encrypted data. This technique can be useful where we're confident of maintaining appropriate control of a smaller set of encryption keys but less confident about control over a larger data set.

bajtos commented 5 years ago

A connector for CockroachDB.

Quoting from https://www.thoughtworks.com/radar/platforms/cockroachdb:

CockroachDB is an open source distributed database inspired by the white paper Spanner: Google's distributed database. In CockroachDB, data is automatically divided into ranges, usually 64MB, and distributed across nodes in the cluster. Each range has a consensus group and, because it uses the Raft consensus algorithm/, the data is always kept in sync. With its unique design, CockroachDB provides distributed transactions and geo-partitioning while still supporting SQL. Unlike Spannerr, which relies on TrueTime with atomic clock for linearizability, CockroachDB uses NTPl for clock synchronization and provides serializability as the default isolation level. If you're working with structured data that fits in a single node, then choose a traditional relational database. However, if your data needs to scale across nodes, be consistent and survive failures, then we recommend you take a closer look at CockroachDB.

clayrisser commented 5 years ago

Access control

marioabc commented 5 years ago

Access control Authorization

clayrisser commented 5 years ago

For those looking for loopback 4 access control, you can use a third party service to handle it. https://github.com/ory/keto

I've had great success with ORY Keto.

I made a typescript client for it if anyone is interested. https://github.com/codejamninja/ory-keto-client

Honestly, in a microservice environment, your services probably shouldn't be handling access control anyways.

clayrisser commented 5 years ago

I'm also delegating Authorization to another ORY 3rd party service called Hydra. https://github.com/ory/hydra

It's fully Oauth2 compliant, which is highly recommended for new services in a time where handling and securing user data is getting scrutinized under a microscope.

You can see my loopback integration code in the following repos . . . https://github.com/codejamninja/loopback4-hydra https://github.com/codejamninja/ory-stack https://github.com/codejamninja/login-ui

clayrisser commented 5 years ago

I'm kinda thinking if people choose to use third-party services for access control and authorization, it will free up the loopback team to focus on other important features third-party services can't solve, like better database support and more database relations.

uribalb commented 5 years ago

Mongodb transactions support

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-322518526 from @kjdelisle.

8 πŸ‘ in the original post


RequestContext Extension

Purpose

Using the existing ParameterObject definitions, and your OpenAPI spec, make a new custom Sequence extension that automatically converts incoming requests into POTOs (Plain Old TypeScript Objects) that will simplify handling of incoming arguments and parameters.

Example:

const offsetSpec: ParameterObject = {
         name: 'offsetSpec',
         type: 'number',
         in: 'query',
};

const pageSizeSpec: ParameterObject = {
         name: 'pageSize',
         type: 'number',
         in: 'query',
};

const List: RequestObject = {
   parameters: [
     offsetSpec,
     pageSizeSpec,
   ]
};

class MyController {
  @operation('get', '/', {responses})
  @request(List)
  list(list: List) {
    // Auto-populate a List (RequestObject) instance based on provided values
  }
}

See https://github.com/strongloop/loopback-next/issues/476 for a complete proposal.

Why?

Estimated Development Time

Assuming no technical blockers, I'd roughly estimate this to take approx. two weeks for development and unit testing

Will You Build It?

I would be willing to build this myself, with some help of course. :)

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-328367346 from @MartinCerny-awin .

20 πŸ‘ in the original post


Audit Log

Log changes performed on models. It would help to keep track of who used, created or changed an entity and the point in time this happened.

The same model that is being audited would be created with added properties mentioned in what should be stored section. This model will get updated when audit action happens.

When should audit happen (taken from #2872)

  1. We give users the option which RESTfull endpoint (or which model) they want to have the audit middleware active for. Or introducing exceptions option which makes the middleware active for all endpoints except the ones mentioned in exceptions
  2. We give them option which req.methods they want to have this middleware active for... I think it does not make sense to have this middleware active for req.method == 'GET' since this middleware would become a bottleneck of the application and you would not get that useful information either.

What should be stored

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-329100530 from @bajtos .

17 πŸ‘ in the original post


Cross-posting from #119

Real-Time features

I'm opening this thread to discuss and define a scope for real-time functionalities possibly provided by LB-Next.

Currently there are implemented functionalities like event streams, but honestly are not helpful at all when building real life applications, therefore I have built several real-time approaches on top of loopback, which I believe 2 were the most important.

1.- Implemented PubSub functionality. 2.- Implemented Firebase alike interface.

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-340876230 from @jackrvaughan .

14 πŸ‘ in the original post


ACL Restrictions on Model Properties

Restrict certain model properties to different user types. For example, a user model could have an account-type property that could only be changed by an admin and not by the owner (but the rest of the model could be changed by the owner).

Will You Build It?

I don't think I'd know where/how to start - but I could definitely try with some guidance.

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-342788573 from @akashjarad.

9 πŸ‘ in the original post


Loopback mqtt/amqp support. make an extension for MQTT protocol. Will You Build It? i am willing to contribute , and need guidance .

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-348083203 from @rpinaa .

5 πŸ‘ in the original post


Features!

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-358761993 from @monster910 .


API Tool Improvements

  1. Make a custom API and expose it to explorer https://groups.google.com/forum/#!searchin/loopbackjs/swagger%7Csort:date/loopbackjs/l6FQGCjNpEY/rrTqHFbZAQAJ

  2. Make a custom API and generate swagger def from it. Same as #1 above except make sure the export to swagger works

  3. Improved error handing for APIs using 400 and 500 HTML status codes and allow the explorer to test those cases

  4. Generate swagger properly from #3 above

  5. Ability to defined a API that is NOT attached to a model

Will You Build It?

Perhaps

dhmlau commented 5 years ago

Merging #509 into this issue so that we have all extension wish list in one place

Cross posting https://github.com/strongloop/loopback-next/issues/509#issuecomment-374447040 from @ganeshkbhat .

2 πŸ‘ in the original post


Feature/External Component Support

Please remove whatever is implemented. I have not read 4.0 docs completely

Will you build it?

I would definitely like to contribute if I have guidance

Royedc4 commented 5 years ago
clayrisser commented 5 years ago

Metrics

mdbetancourt commented 5 years ago

firestore connector

JoergFechner commented 5 years ago

Open the where-filter, to get something like this

labels @> ARRAY['pommes','ketchup']::varchar[]

to work.

jheysen commented 5 years ago

Is there any plan to add support for Compression Middleware? Also, it would be nice to have some form of logging out of the box, maybe with morgan

bajtos commented 5 years ago

Is there any plan to add support for Compression Middleware? Also, it would be nice to have some form of logging out of the box, maybe with morgan

Eventually, we would like to allow LB4 applications to mount any Express middleware for request pre-processing, but we are not there yet. See https://github.com/strongloop/loopback-next/issues/1293.

For now, you can mount LB4 application on a top-level Express application and configure middleware like compression and morgan on that Express application. See https://loopback.io/doc/en/lb4/express-with-lb4-rest-tutorial.html

Personally, I'd prefer to use 🌲pino🌲 as the default logger, because of its performance.