Angular Youtube clone with Module Federation. Turborepo edition.

Overview

Youtube microfrontend using Angular, Module Federation. Turborepo edition.

Youtube Angular brand


NOTE:

This is project is for education purpose only and was made to illustrate example of building microfrontend using Angular, Module Federation.


There is 1 host (shell) and 3 remote apps (watch-app, likes-app, history-app). Each app is deployed to different hosting storage.

There are 3 versions of source codes available:
Turborepo (Current Repo)
Nx
Lerna


NOTE:

Server side rendering is implemented only on Lerna and Turborepo edition


Features:

Multiple Angular applications on different domains
Shared UI components and utils
NgRx Store state management on each application
Communication between angular applications
Routing between applications
Server Side Rendering

Mission:

My mission is to make complex microfrontend app as much as possible to have many cases for developers.

Demo:

https://youtube.vugar.app

NOTE:

Hosted application is using Turborepo edition repo


Getting Started 🚀

Prerequisites

Since workspaces are available from npm v7, you should have NodeJs 16+ installed.

1- Install turbo globally:

npm install [email protected] -g

2- On root project install dependencies:

npm install

3- Start project and navigate to localhost:4200:

npm run serve

Other commands: please see package.json for other commands.


NOTE:

In case of error that components are not exported from youtube/common-ui, on project root run command npm run clean:cache and then npm run serve


Tech Stack:

Angular Angular Material Angular Universal Angular Universal NgRx store NgRx store Turborepo

Pros and cons of Nx, Turborepo and Lerna tools

Below are just my experiences working in those tools. They can be inaccurate.

Lerna

Supports both same and different versions of libraries (such as Angular, RxJs)
Native - Use Angular CLI
Configuration of applications required a change to angular.json to make it work. Switched to ngx-build-plus builders to support custom webpack config.
Slow development efficiency. Rebuild everytime you make changes to common packages such as UI
No dependency graph

Nx

Not supports both same and different versions of libraries (such as Angular, RxJs). Only Monorepo.
Not native. Uses Nx CLI
Configuration of applications required a change to angular.json to make it work. Switched to Nx Officially Supported Builders to support custom webpack config.
Problems with adding new packages (such as ssr)
Very fast development efficiency
Powerful dependency graph

Turborepo

Not supports both same and different versions of libraries (such as Angular, RxJs). Only Monorepo.
Native - Use Angular CLI
Configuration of applications required a change to angular.json to make it work. Switched to ngx-build-plus builders to support custom webpack config.
Fast development efficiency
Dependency graph

What is next?

Currently, the unit tests were not aded since the project was focused on main features such as module federation, managing state, intercommucation and so on. It can be started soon.

Backlog

  1. Add I18n translations
  2. Add Authorization with Auth0 to enable faster api fetcing and more features.

Contribution guide 🌴

Want to contribute to improve community app? Looking forward for pull requests. Let's get started :)

Supporting guide

Found repo useful? :) Let's star it

References

Book: https://www.angulararchitects.io/en/book/
My blog: https://medium.com/p/258f331bc11e
Big thanks to https://github.com/manfredsteyer for his contribution for a lot of useful blogs + book for building microfrontend.

About me 🌴 🏌️

Xtreme Junior Front end developer focused on nice architecture and long term webapps.

You might also like...

Clone da GUI do Windows 11 desenvolvida utilizando ReactJS, NextJS, MaterialUI e ReactDND.

Clone da GUI do Windows 11 desenvolvida utilizando ReactJS, NextJS, MaterialUI e ReactDND.

Vídeo demonstração Iniciando a execução: npm run dev Frameworks & Bibliotecas: React.js - uma biblioteca JavaScript para a criação de interfaces de us

Dec 19, 2022

Airbnb-React - In this project, An Airbnb experience page clone is created to learn and implement React props concepts.

Airbnb-React - In this project, An Airbnb experience page clone is created to learn and implement React props concepts.

Create React Airbnb App In this project An airbnb experience page clone is created to learn and implement React props concepts. Objectives Learn about

Jun 28, 2022

React sce instagram clone

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: ya

Jan 5, 2022

NetflixClone - Netflix clone with react , styled components and firebase with user authentication.........

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Jan 3, 2022

Twitter-client - client for twitter-clone

Twitter (Client-Side Rendering) Please star this repo if you like ⭐ It's motivates me a lot! Getting Started This project was bootstrapped with Create

Jul 29, 2022

The clone of Apple's notes app

Notes App Exactly like Apple's notes app but web version (so windows users can write notes too). Try it out right now (hosted on firebase) Top feature

Jan 10, 2022

Netflix clone app with React.js and Redux

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Dec 9, 2022

The Tesla Clone built in React Native FrameWork

The Tesla Clone built in React Native FrameWork

Tesla Clone The Tesla Clone built in React Native FrameWork Features Flat Infinite Scroll List View with animations. Design is responsive to different

Feb 10, 2022

Clone of playsnake.org using React and TypeScript

Snake Game Clone of playsnake using React and TypeScript References Keycode React TypeScript Cheatsheet .ts vs .tsx ES6 import from root What does 'de

Dec 29, 2022
Comments
  • docs(readme): fix info about configuration changes

    docs(readme): fix info about configuration changes

    Hey :)

    The information regarding the configuration changes required in the angular.json file appears to be incorrect.

    From what I can see looking at the project, the angular.json file has required a change to the builder used to build and serve the angular app.

    Understandably, this is required to allow for additional webpack config to be passed to the Angular Devkit, which is required to allow the setup of the Module Federation Plugin.

    However, in the README, it states that there were no changes required to angular.json for Lerna and Turborepo, despite changes having actually been made in those repos.

    This PR aims to address that miscommunication.

    This is a cool project!!

    opened by Coly010 1
  • Search error with empty value

    Search error with empty value

    Steps to reproduce:

    1. Open youtube.vugar.app
    2. Click on search input and type something without doing search
    3. Remove all what you typed
    4. Open console

    Environment: Google Chrome Stable/Dev 99

    opened by rustam-mukhametshin 1
  • Feature/upgrade apps to angular v15

    Feature/upgrade apps to angular v15

    Upgrade Angular to v15.0.0 with ng update Upgrade Angular Material v15.0.0 with ng update Upgrade Angular universal to v15.0.0 Upgrade angular-architects/module-federation and tools to v15.0.2 Upgrade Angular eslint to v15.0.0

    opened by vugar005 0
Releases(2.0)
Owner
Vugar
Xtreme Junior Front End Angular developer.
Vugar
Turborepo with Tailwind CSS setup for shared ui components.

Turborepo starter This is an official Yarn v1 starter turborepo. What's inside? This turborepo uses Yarn as a package manager. It includes the followi

George Carl 46 Jan 2, 2023
Twitter-Clone-Nextjs - Twitter Clone Built With React JS, Next JS, Recoil for State Management and Firebase as Backend

Twitter Clone This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn de

Basudev 0 Feb 7, 2022
This is not my code, just trained with "From Scratch - Développement Web" youtube video

React-Countries-API DISCLAIMER FR : Ceci n'est pas mon code, je me suis juste entraîné à partir de la vidéo de From Scratch - Développement Web ! EN :

LejusVDP 1 Jan 4, 2022
A Google Clone which built with ReactJS. You can click the demo and search whatever you want!

Google Clone with ReactJS A small web app that imitate the desktop web version of google site, you can search whatever you want. Google Clone Demo Lin

Özge Coşkun Gürsucu 36 Aug 14, 2022
İnstagram Clone.You can sign in, sign up, upload image, make comment 📷 Used ReactJS, Material UI, Firebase, Firestore Database

?? instagram-clone This is a instagram clone. You can sign in, sign up, upload image, make comment ?? ⚡ LIVE To check out the live demo of this app AB

null 22 Apr 20, 2022
A Facebook Clone which built with reactJS. You can sign in with your Google Account and send realtime posts.

Facebook Clone with ReactJS A Facebook Clone application that you can sign in with your Google Account and send realtime posts. Facebook Clone Demo Li

Mert Çankaya 23 Nov 25, 2022
This is my portfolio GitHub clone website. The frontend is build using NextJS and TailwindCSS.

Github Clone Portfolio Website Tech Stack used: NextJS Tailwind CSS The contact form in this website is connected to Notion. If you want to integrate

Unnati Bamania 22 Oct 5, 2022
uber-eats-clone react native

Uber Eats Clone Uber Eats Clone React Native Tools and technology react-native Stripe payment checkout expo tailwind css yelp API Firebase (Authentica

Khalid Saifullah 18 Dec 7, 2022
trying to clone tiktok using next, typescript, tailwindcss and hasura graphql. For educational purposes only

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

null 2 Jan 4, 2022
Creating this clone to learn the fundamentals of Next Js and Tailwind CSS.

Next.js + Tailwind CSS Example This example shows how to use Tailwind CSS (v3.0) with Next.js. It follows the steps outlined in the official Tailwind

Premveer Tomar 2 Feb 2, 2022