{"id":22957791,"url":"https://github.com/parvezmrobin/rn-docker-starter-kit","last_synced_at":"2025-04-02T01:46:09.029Z","repository":{"id":38919914,"uuid":"237018818","full_name":"parvezmrobin/rn-docker-starter-kit","owner":"parvezmrobin","description":"Could be just another RN starter kit but this one includes docker","archived":false,"fork":false,"pushed_at":"2023-01-05T06:00:02.000Z","size":2659,"stargazers_count":0,"open_issues_count":18,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T16:43:40.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parvezmrobin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-29T15:41:23.000Z","updated_at":"2020-03-16T04:00:24.000Z","dependencies_parsed_at":"2022-08-19T00:00:33.136Z","dependency_job_id":null,"html_url":"https://github.com/parvezmrobin/rn-docker-starter-kit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Frn-docker-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Frn-docker-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Frn-docker-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvezmrobin%2Frn-docker-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parvezmrobin","download_url":"https://codeload.github.com/parvezmrobin/rn-docker-starter-kit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741186,"owners_count":20826063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T17:20:29.220Z","updated_at":"2025-04-02T01:46:09.012Z","avatar_url":"https://github.com/parvezmrobin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RN Docker Starter Kit\n\n\u003e This app is configured for ANDROID ONLY.\n\u003e A lot more configuration is needed for apple build.\n\u003e Hence, this project is not recommended for apple.\n\n## Installation\n\n\u003e It is recommended to run the commands with super user privileges.\n\n- To install the dependencies, run \n```\nyarn install\n```\n\n- Now, you can carry on in either a contained docker environment or independently.\nIf you choose not to use docker container, skip this step.\nMake sure you have `docker@\u003e=19.03.5` and `docker-compose@\u003e=1.24.1`.\nNow run\n```\n./scripts/start.sh \n```\nThis will bring up a new shell. Run your next commands in this shell.\n\n- Copy Java codes from `node_modules` to `android` directory by running\n```\nyarn jetify\n```\n\n- Then open the `android` directory with `Android Studio` and sync gradle (Skip if using docker).\n\n- After that copy the file `.env.example` with name `.env`.\nProvide necessary values in `.env` file.\n\n- To bundle your JS files, run\n```\nyarn bundle\n```\n\n- To create the android app(apk), run\n```\nyarn make-unix # for linux and mac\nyarn make-win # for windows\n```\n\n\u003e For Mac or Linux: To fix the issue of './gradlew: Permission denied', run\n\u003e ``` \n\u003e sudo chmod 777 android/gradlew\n\u003e ```\n\nThis will create an apk file in `android/app/build/outputs/apk/debug`\nnamed `app-debug.apk`.\nWhile using `docker`, there is a possibility that the apk file created\ninside the container is not synced with host.\nCheck the creation time of the apk file to be sure.\nIf it's not synced, then delete the apk file and re-run the command.\n\nBefore creating a new apk, run `yarn jetify` if you installed a new\n`react-native` package and `yarn bundle` if you changed your JS codes.\n\n- Now, install the apk file to your mobile with `adb`.\nAlternatively, connect your mobile with USB and run\n```\nyarn install-unix # for linux and mac\nyarn install-win # for windows\n```\n\n## Live Update\nStart a react native server by running\n```\nyarn start\n```\n\nThen open the app and shake your phone real hard. This will bring a pop up menu.\nGo to settings. Go to **Debug server host \u0026 port for device**.\nIn the input field, insert `\u003cyour ip address\u003e:8081`. For example,\nif `192.168.1.10` is your IP address, then insert `192.168.1.10:8081`\nand press OK. Make sure your PC and android device is connected to the\nsame network.\n\nAfter that if you edit anything in the `app` directory and save,\nthe android app (running in the mobile) will be reloaded automatically.\n\n\u003e This will work only for JS file. Every time you change something in\n\u003ethe `android` directory, you have to make a new apk file.\n\n## Changing App Name\nGo to `android/app/src/main/res/values/strings.xml` and change the value\nof `app_name`.\n\n## Changing App Icon\nGo to `android/app/src/main/res`. There are several directories starting\nwith **mipmap**. There is a file named `ic_launcher.png` in every\n**mipmap** directory. Replace all files named `ic_launcher.png` with your\ndesired icon file.\n\n## Adding New Screen\nAdd your screen component to `app/screens` directory.\nOpen `app/screens/index.js`. Import your screen component there and\nadd it to `Screens` object. If your screen should be visible publicly,\nadd it to `PublicScreens` object rather. `app/screens/index.js` file\nexports a `navigate` object. If your screen name is `Screen1`, then\nnow you should be able to navigate to your screen as `navigate.to('Screen1')`.\nA link to your screen is also added to **Sidebar** as well. However,\nif you want a more convenient way to navigate to your screen, you may add\na helper to `navigateTo` variable. You will find this just above exporting\n`navigate` variable. For example, you can navigate to home by either\n`navigate.to('Home')` or `navigate.to.home()`.\n\n## Getting around `redux`\nA convention I followed in this app that data needed by only one component\n(or a limited number of sub-components) should use component's own state.\nOn the contrast, data needed by multiple components should be kept in `redux` store.\n\n### Action\nTo make a new action, first create UPPER_CASE constant holding the type\nof the action in any file inside `app/actions` directory. Then export the\naction function. An action function is a function that takes a number\nof parameters and returns an object containing the type of the action and other \nparameters. In most cases, you will just return an object that holds the type \nand params passed to the function. For example, `register` action is as the following\n\n```javascript\nexport const register = (username, password) =\u003e ({\n  type: REGISTER,\n  username,\n  password,\n});\n```\nAlso, don't forget the export the action type at the bottom in the `export default`\nexpression. The action function will be used in your component to create a new\naction and the types will be used by reducers.\n\n### Reducers\nA reducer is just a function that updates the state. I would rather call it\na mutator that mutates current state. A reducer function takes current `state` and\nan `action` and updates the state based on the action. You should not update the\n`state` object. Rather make a deep copy of it(possibly with `cloneDeep` function\nfrom `lodash`) and update the copy. A reducer function should also export the initial\nstate related to that particular reducer.\n\nThen import the reducer in `app/reducers/index.js` and add that to the object passed to\n`combineReducers` function.\n\n## Adding New Package\nAlthough, this project is built with `react-native@0.61.4`, the core Java files are\nreplaced by `react-native-navigation` files. As a result, automatic package linking \ndoes not work. While adding a new package, you need to follow instruction for\n`\u003c= react-native@0.59`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvezmrobin%2Frn-docker-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparvezmrobin%2Frn-docker-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvezmrobin%2Frn-docker-starter-kit/lists"}