This is a monorepo of all of Intectum's internal TypeScript projects. It includes VanillaJS websites, React Native apps, Firebase backends etc.
This monorepo uses npm workspaces. The following is a list of all the workspaces included:
- apps
- homa-and-mukto: the Homa & Mukto app
- intectum-website: the intectum website
- vaga-*: components of the Vaga project
- packages
- apps-core: core functions
- apps-firebase: common firebase functions
- apps-mobile: common react native components, hooks etc.
- apps-web: common web functions
- vaga-core: common functions for the Vaga project
The easiest way I found to build Firebase projects within the monorepo that are ready for deployment was to use ncc instead of the default tsc
A few modifications were needed to get React Native working within the monorepo:
- A symlink to the monorepo's
node_modulesfolder must be created in the root of the React Native project - Any dependencies from
apps-mobilethat have a native component must be added to the dependencies of the React Native project'spackage.jsonwith a version of*file (this allows React Native to recognise that the project uses them and configure the project correctly) - Metro must be configured (
metro.config.js) to watch the root folder of the monorepo (this allows Metro to resolve and watch files from the monorepo'snode_modulesfolder as well as all the of package workspaces) - Android's
settings.gradlefile must be modified so that the relative paths to thenode_modulesfolder point to the monorepo'snode_modulesfolder (this is not needed to get the project to build via the CLI but Android Studio requires it to build the project correctly, I guess it cannot follow the symlink)