Home > database >  React Native Firebase Functions - How to create a monorepo architecture
React Native Firebase Functions - How to create a monorepo architecture

Time:06-23

I am new in the concept of monorepo. If I haven't understood incorrectly, a monorepository is a single git repository that contains all the necessary code for all the different services/libs/sub-projects of a business.

In my app, I am using React Native, Firebase and Docusaurus (for documenting both the frontend and the backend).

I have thought to use the following architecture:

/
| -mobile/app/ (React Native Frontend   Firebase Client SDK)
|   |
|   | - docs/ (JSDoc autogenerated only for frontend)
|   | - components/ ...
|   | - screens/ ...
|   | - node_modules/ ...
|   | - App.jsx
|   | - index.js
|   | - app.json
|   | - package.json
|   | - yarn.lock
|   | - .eslintrc
|   | - .env
|   | - babel.config.js
|
| -functions/ (Firebase Functions serverless   Firebase Admin SDK)
|   | - services/
|   | - src/
|   | - utils/
|   | - .env
|   | - package.json
|   | - .eslintignore
|
| -website/ (Docusaurus website)
|   |
|   | - babel.config.js
|   | - node_modules/
|   | - package.json
|   | - pages/...
|
| (GLOBAL CONFIGURATION FOR ALL SUB-PROJECTS (CORRECT?))
| -.gitignore
| -LICENSE.md
| -.firebaserc
| -firebase.json
| -firestore.rules
| -firestore.indexes.json

As you can see, I have global files in the root of the 'monorepo' (not sure if this is a considered a monorepo), like .git/.gitignore/LICENSE.md ... Is this correct?

Is my current code organization considered a monorepository?

CodePudding user response:

If I haven't understood incorrectly, a monorepository is a single git repository that contains all the necessary code for all the different services/libs/sub-projects of a business.

Yes, this is a monorepo.

See also:

  • Related