Frameworks
Often used framworks and how we use them
Our Guideline
We primarily use Vue and Nuxt for building our frontends. We create them statically to keep APIs/backends and frontend separate. There are some caveats to static generation that needs to be considered from the start of a project, such as i18n/internationalisation.
If we need storage, authentication, logging and so forth. It is exposed through an API/backend. Content from an API can either be fetched at build time (when data changes which triggers a rebuild of the whole website) and if it's needed real time, we fetch it during runtime (when browser loads).
The static generation method gives us the possibility to use a content delivery network (CDN) and in practice never have downtime. It also requires less resources, is easier to secure and doesn't require computational power every time someone visits our websites. It also conforms to good practice principles since the websites are only responsiblity is being a information page or an interface for an API. This means the interface can easily be replaced and the API can be be used by third parties without having to go through our websites.
Other frameworks
Even though we primarily use Vue/Nuxt, it might not be the best fit for the project, especially for things like simple one-off pages, sometimes a template engine, different framework or a handwritten page might be best. Using a complex SSG/SSR framework requires keeping dependencies up to date, add overhead, libraries become outdated and implementations become deprecated. So even though we supplement keeping dependencies with a powerful versioning pipeline that automates most of these problems, choosing a simpler solution where it fits might be best.
Information pages and documentation
When we create information pages, we can use markdown and a static site generator such as Nuxt Content. Nuxt Content allows us to create components that can be used with markdown and also exposes a powerful "local" API that can be used to fetch content through a database like query language. Searching the whole site, including the content in pages with fuzzy search is also supported in newer versions, which allows a quick indexed search that uses a combination of files from a CDN and local "cached" content in the browser.
The upside about writing information in markdown is that it's a very well established standard that has a lot of tooling around it and will most likely survive any modern framework. The things we write today can be easily copied around as files from/to other systems and that will most likely persist for several decades to come.
We also have customer facing websites that uses a full content management system (CMS), in those cases, the CMS itself might be fully or partially responsible for displaying the pages. Examples of this is CraftCMS, PayloadCMS, Wordpress, Strapi and more.