- Navigate to the root of the repo
- Start books microservice with command:
./start.sh books
- Once you see, server ready message, you can navigate to GraphQL Explorer to query your server.
- Once your server is running, in a different terminal window, start react client:
./start.sh client
and navigate to React Application
- Start db:
./start.sh db
(note that./start.sh books
already handles this for you) - Run lint for entire project:
./start.sh lint
- Run UTs + Snapshots for client, ITs for microservice:
./start.sh test
Implement a books catalog. The website should contain two views:
The list of available books, on this page you should be able to view all available books, please skip pagination
- Book's page, on this page you can see extra books' fields.
- Book's fields:
- Title
- Year
- Description
Build a books catalog covering as much of the following :
- React
- TypeScript
- NodeJS
- Express
- Jest
- Styled Components (using TailwindCSS instead)
- gRpc
- Type-GraphQL
- Lerna
- Antd
- PostCSS
- SSR (using Next.JS)
- MongoDB
- Docker
- Nginx
- RabbitMQ
- Redis
Since this was also built with a microservices (msvcs) first approach - some orchestration mechanism was required. Given that the project needed to be portable (i.e. self-contained and no provisioning of AWS resources or other such costs):
- I've gone with local k8s (docker desktop with k8s enabled)
- Skaffold for management of resources and hot reloading of containers
It's important to note that local development with this setup was incredibly heavy (90+% of memory consumption on my local machine). Both for end-to-end development of msvcs, and for automated CICD provisioning of PR environments, we should prefer cloud k8s like EKS with GitOps based provisioning of resources.
After some experimentation, I finally set up an alternative, much easier setup which can be readily containerized if need be.
Options for state management:
- Redux (Redux Toolkit) + Saga - Redux DevTools is a big plus here
- RxJS Subjects - personal preference for mid-sized project, esp. because cleaner paradigm
Having worked with React and Angular in the past, the state management solution takes inspiration from the best of both worlds and uses RxJS subjects at its core.
As we start adding more msvcs, we need to integrate some eventing mechanism for cross msvc communication.
Options:
- AWS SQS - past experience + comfort pick
- NATS Streaming Server - Easy to integrate as a self-contained k8s resource
- RabbitMQ - need to try
- Kafka - need to try