'Which file structure for my react (MERN) project

I begin to develop a website with MERN stack (mongodb, express, react, node). My project is a web platform for 2 schools (with a showcase and "authenticated" parts for the students and the teachers). I have ta make 1 website for the 2 school (with seperated parts in the database, ect.), just the external appearance should be the same. The Home page will be a kind of redirect portal to go to one or the other school.

My problem is that I don't know how to structured the frontend (with react).

Do I have to have 2 directory with copy pasted code ? It's quite annoying to have everything duplicated.

Thanks :)



Solution 1:[1]

You can make it inside 1 codebase, whether you want to host it in different domains or not, you can use config for the school name and some custom data for the site, because the other stuff (like appearance) is the same, as you said.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yitzhak Barzilay