Using next.js 14.2 and App Router, I want to follow best practices and recommendations from Next.js on my production ecommerce site. I suggest the following architectural flow which I will inform new developers to utilize. What do you think about this?
UI Component (SearchComponent) -> Orchestrator (SearchOrchestrator) -> API Route (SearchRoute) -> Services (Commerce/SearchSDKService or Commerce/SearchHTTPService) -> Service returns to API Route, API route returns HTTP response to Orchestrator -> Orchestrator uses the SearchModel for the field mapping -> Orchestrator returns the modelled API response and constructed object (e.g. a product with relevant fields) to UI component.
Please also see the attached diagram.