I recently began exploring Vercel for microservice development in a course I was teaching. Like any good professor, it's important to propose a course topic you only sort of know about. I knew web components; how hard could Microfrontend development be?
This series will detail some of the lessons learned in developing a series of microservice + web component projects the last few months. These are beginning to distill down to follow a common pattern:
- Front end brick that works anywhere (ala web components, lit based)
- Something to broker and manage the API calls (middleware / class on front end)
- End point that is blackboxy, returning expected output (Vercel for these examples, though really AWS Lambda)
I hope that by covering the similarities and differences in approaches I've taken to produce a few of these it can help others think through the potential benefits of web components.
Here's some links to start poking around:
- Our storybook hooked up to Vercel - https://haxapi.vercel.app/ look for the "microservice"
- Code Monorepo - https://github.com/elmsln/lrnwebcomponents/tree/master/ .
/apihas the endpoints for the microservices and
/elementscontains source for our web components