vue-storefront-api icon indicating copy to clipboard operation
vue-storefront-api copied to clipboard

[RFC] NestJS based API

Open lukeromanowicz opened this issue 5 years ago • 1 comments

Summary

New, fully extensible, more flexible, hard-typed API that has autogenerated API specs with Swagger.

Motivation

Current API is extensible for new features but modifying existing endpoints might be a little bit troublesome. Moreover, it contains a lot of legacy code that should be reviewed and refactored. It's lacking some useful features like proper logging or autogenerating OpenAPI Specification, not mentioning code coverage with tests, docs and typing. The new API based on easier to maintain NestJS is the answer to our needs. It needs to provide a more separated and easy to use layers for data transformation and multi-platform support.

Drawbacks

  • a lot of work on rewriting
  • backward compatibility for old modules might be a little bit troublesome
  • noticeably higher entry-level for devs

Q&A

What about modules written for current version of vue storefront api?

New API should provide a wrapper that would enable old modules to work but new modules structure will most likely be much different.

Does development of new API mean leaving old API on it's own?

No, the old API will still be supported until the new version will be fully featured, stable and production-ready. Security fixes for old API will be provided even afterward.


Please, let us know what you think, what features you would like to see implemented and what are your concerns?

lukeromanowicz avatar Aug 01 '19 07:08 lukeromanowicz

DON’T KNOW. But some insights from my side:

  • NestJS is cool because Kamil did a great job bulding this thing and maybe would help us promoting the project across hiscommunity
  • I 100% agree with Sander: one single update
  • guys we can have “alternate” API till we feel it’s stable enought to replace the core vue-storefront-api (the same way we did with indexers); API is not changing a lot, it’s pretty stable
  • maybe some PoC for 2-3 days? showing how it could look like?
  • it’s for sure not a priority for 2.0
  • -but it can be done in parallel/in the unspecified future as long as we’ll keep up with the endpoint spec - and I think we’ll (@lromanowicz) as it’s not a point here - to change the data formats, whatever; just rewrite the code right?

pkarw avatar Aug 01 '19 08:08 pkarw