write-with-webiny
write-with-webiny copied to clipboard
Build a Monorepo for your Internationalized Frontends with Nx and Webiny
Introduction
Nx is a popular workspace management tool that helps manage dependencies and provides other useful features such as computation caching, smart rebuilds and easy code sharing when building groups of sites, APIs and libraries in a monorepo.
Although you can use Webiny to manage your frontend projects as well, some teams like to separate concerns by having a separate monorepo for the frontend and the backend.
Goals
In this article we will demonstrate how to build a monorepo in NX with a shared UI library for sites which share components but whose content is written in 2 different languages using Webiny's built-in internationalization feature.
Outline
- Introduction
-
- What is a monorepo
-
- Introduction to Webiny
-
- Introduction to Nx
- Setting up a Webiny project with 2 languages
-
- Setting up content models in each locale
-
- Writing content in each locale
- Setting up a Monorepo with Nx
-
- Setting up a shared UI library
-
- Set up shared helper functions ilbrary
-
- Set up 2 applications (using existing Nx plugins for Svelte / Next / Astro)
-
- Connecting to each locale on the frontend
-
- Fetching article content and rendering a home page
- Conclusion
Sample articles
No response
Set up 2 applications using existing Nx Plugins for Svelte / Next / Astro
You mean either Svelte, Next or Astro and not all of them, right? @endymion1818
Yes that's correct. Nx is very opinionated, it's for iterating on one core concept so one of these technologies is suitable.
I would like to on this
Hi @Nziokitech thanks for your interest! Have you worked with Nx before? I'd also really like to see some of your written content. Could you share some articles? Send me a DM in the community slack if that's easier 🙂
Hi @Nziokitech, how are you getting on with writing this article? Please respond soon or I will have to assign it to someone else.