Write a paragraph about Alternative website architectures based on those bullet points:…
- User
Write a paragraph about Alternative website architectures based on those bullet points:
Typically, users navigate from the landing page or the home page to listing pages, info pages, product pages, and then to the basket (happy path).
Currently, when a user browses the website and goes from a homepage to a basket, they go through multiple apps with page reload navigation instead of next/link. In contrast, when someone changes languages, he or she stays in the same app.
It might be worth considering a new architecture where most of the happy path user journey would occur within a Next.js app.
If the new architecture is refactored, it might be possible to implement mono repo for all the frontend apps like turborepo.
There are 45 languages which could have 700 pages from CMS, which would increase build time significantly from currently 2 minutes if we pre-built the pages during the build phase.
As a way to achieve desired performance and the same time quick builds, it is possible to select only a few selected languages for pre-build and the most popular CMS pages. It would build the rest of the content on the fly when users request these resources (exactly as it does now).
This strategy could be achived by adding new field to Contentful “prebuild” flag (to mark document which be pick up to build on build phase)
hardcode wich languages to “prebuild” on build phase to reduce build time
Assistant
Sure! Here you go:
Traditional web architectures have users navigate from a home or landing page through listing, info, and product pages before reaching their basket (the "happy path"). However, this structure can be inefficient as each step requires page reloads and multiple apps. An alternative architecture could involve keeping users within one Next.js app for most of the happy path journey, which would improve efficiency and potentially allow for a mono repo of all frontend apps using turborepo. To avoid excessive build times with 45 languages and 700 CMS pages, only popular languages and pages could be pre-built, with the rest built on demand. This strategy could be achieved by adding a "prebuild" flag to Contentful to mark documents for pre-building and hardcoding which languages to pre-build.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.