├── .gitignore ├── .gitmodules ├── package.json ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "rn-super-app"] 2 | path = rn-super-app 3 | url = https://github.com/el173/rn-super-app.git 4 | [submodule "rn-mini-app-one"] 5 | path = rn-mini-app-one 6 | url = https://github.com/el173/rn-mini-app-one.git 7 | [submodule "rn-mini-app-two"] 8 | path = rn-mini-app-two 9 | url = https://github.com/el173/rn-mini-app-two.git 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@el173/rn-micro-frontend-boilerplate", 3 | "private": true, 4 | "scripts": { 5 | "bootstrap": "yarn --cwd rn-mini-app-one && yarn --cwd rn-mini-app-two && yarn --cwd rn-super-app", 6 | "pod-install": "cd rn-mini-app-one/ios/ && pod install && cd ../../rn-mini-app-two/ios/ && pod install && cd ../../rn-super-app/ios && pod install", 7 | "start:app1": "yarn --cwd rn-mini-app-one start", 8 | "start:app2": "yarn --cwd rn-mini-app-two start", 9 | "start:host": "yarn --cwd rn-super-app start", 10 | "run:host:ios": "yarn --cwd rn-super-app ios", 11 | "run:host:android": "yarn --cwd rn-super-app android", 12 | "run:app1:ios": "STANDALONE=1 yarn --cwd rn-mini-app-one ios", 13 | "run:app1:android": "STANDALONE=1 yarn --cwd rn-mini-app-one android", 14 | "run:app2:ios": "STANDALONE=1 yarn --cwd rn-mini-app-two ios", 15 | "run:app2:android": "STANDALONE=1 yarn --cwd rn-mini-app-two android" 16 | } 17 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rn-micro-frontend-boilerplate 2 | React Native (Super App) boilerplate for Micro Front Ends 3 | 4 | ## Usage 5 | 6 | Clone project with sub modules: 7 | ```bash 8 | git clone --recursive -j8 https://github.com/el173/rn-micro-frontend-boilerplate.git 9 | ``` 10 | 11 | 12 | 13 | Install dependencies: 14 | 15 | ```bash 16 | yarn bootstrap 17 | ``` 18 | 19 | Pod install iOS *(Only for iOS)* 20 | 21 | ```bash 22 | yarn pod-instal 23 | ``` 24 | 25 | 26 | Start development servers separately: 27 | 28 | ```bash 29 | # todo:: configure with yarn workspace 30 | yarn start:app1 31 | yarn start:app2 32 | yarn start:host 33 | ``` 34 | 35 | Run Host app: 36 | 37 | ```bash 38 | yarn run:host:ios 39 | yarn run:host:android 40 | ``` 41 | 42 | Run Standalone: 43 | ```bash 44 | # App One 45 | yarn run:app1:ios 46 | yarn run:app1:android 47 | 48 | # App Two 49 | yarn run:app2:ios 50 | yarn run:app2:android 51 | ``` 52 | 53 | Demo: 54 | 55 | ![iOS Demo App](https://miro.medium.com/v2/resize:fit:592/1*m2-9ahLJkGZI6sy6Jq8QWg.gif) 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Hashith Karunarathne 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------