This application is named after the King of the Noldor in Tolkien's books. He was the first to sail from Middle-Earth to Valinor on the First Age, father of Fëanor, who created the Silmarils. I named it this way because this will be a huge ass boilerplate for many other applications due to re-usability, structure and ease of customization. Some (most) of these functionalities are separate packages or frameworks
It is intended (so far still up for discussion) that we will use the following stack:
Turborepo is a Vercel developed monorepo to allow us to manage multiple projects in a single directory. In our case, we will be using Turborepo as a boilerplate-esque framweork, so we don't have to set up any configurations and have the same clean architecture for every single web app that is forked from Fimwe.
This is an official npm starter turborepo.
This turborepo uses npm as a package manager. It includes the following packages/apps:
docs: a Next.js appweb: another Next.js appui: a stub React component library shared by bothwebanddocsapplicationseslint-config-custom:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)tsconfig:tsconfig.jsons used throughout the monorepo
Each package/app is 100% TypeScript.
This turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
npx turbo link
Learn more about the power of Turborepo: