loopbackio/loopback-next

[EPIC] e-commerce demo scenario

dhmlau opened this issue · 4 comments

Description / Steps to reproduce / Feature proposal

#1449

APIs to support the front page of a major retail e-shop. Components:

  • user profile (from a database) #1480
  • shopping cart (stored in a distributed in-memory cache, e.g. Redis) #1481
  • product recommendation (fetched from a SOAP/REST service connected to AI) #1482
  • order history (data related to user profile, stored in a database). #1483

A user sign-up (registration), where the client app is submitting new model data.

It would be great if

  • it can be turned to a tutorial
  • includes deployment topology

This demo scenario is meant to be a single LB application and code resided in a separate repo other than loopback-next.

@raymondfeng @bajtos , are we thinking of having this as monorepo?

I thought this will be implemented as a single service. I am not sure if it's worth to break this down into multiple micro services. For example, we would have to figure out how to aggregate APIs of individual microservices into a single API server for clients, perhaps using some sort of a gateway.

To me, the primary purpose of this demo is to verify easy of use of our solution for integrating with different data sources, not an exercise in micro-services.

With that said, there is still a question whether this example should live in our main loopback-next monorepo, or in its own GitHub repo. Considering the cost of setting up a Redis instance, a database server, etc. I think we should keep this example out of our main monorepo. I don't want to start a Docker container with Redis every time I test a change in loopback-next!

If we decide to build the example app as a bunch of microservices, then I think the new GitHub repo containing this example should follow monorepo layout. The less GitHub repos we have to watch and maintain, the better for us.

OK. It's true that the purpose of this demo scenario is to identify any gaps in LB for building a production-ready application, but not to illustrate how the microservices each built by LB app can work together.

I agree that it should be a separate repo from loopback-next.

Let me update the original description. Thanks!

This Epic is now complete! 🎉