├── .gitignore
├── LICENSE
├── README.md
├── courses_app
├── .buckconfig
├── .eslintrc.js
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── README.md
├── __tests__
│ └── App-test.js
├── android
│ ├── app
│ │ ├── BUCK
│ │ ├── build.gradle
│ │ ├── build_defs.bzl
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── courses_app
│ │ │ │ └── ReactNativeFlipper.java
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── courses_app
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
│ ├── Podfile
│ ├── courses_app-tvOS
│ │ └── Info.plist
│ ├── courses_app-tvOSTests
│ │ └── Info.plist
│ ├── courses_app.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── courses_app-tvOS.xcscheme
│ │ │ └── courses_app.xcscheme
│ ├── courses_app
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── main.m
│ └── courses_appTests
│ │ ├── Info.plist
│ │ └── courses_appTests.m
├── metro.config.js
├── package.json
├── src
│ ├── App.js
│ ├── assets
│ │ ├── icons
│ │ │ └── FriesMenu.png
│ │ ├── illustrations
│ │ │ ├── 3647007.png
│ │ │ ├── 4991639.png
│ │ │ ├── 9814.png
│ │ │ └── Wavy_Bus-35_Single-03.png
│ │ └── photos
│ │ │ └── photo-1494790108377-be9c29b29330.jpg
│ ├── components
│ │ ├── CourseDetail
│ │ │ ├── courseDetailStyle.js
│ │ │ └── index.js
│ │ └── index.js
│ ├── context
│ │ └── index.js
│ ├── navigators
│ │ └── Stack.js
│ ├── screens
│ │ ├── CoursesList
│ │ │ ├── coursesListStyle.js
│ │ │ └── index.js
│ │ ├── Home
│ │ │ ├── homeStyle.js
│ │ │ └── index.js
│ │ └── index.js
│ ├── store
│ │ ├── reducer
│ │ │ ├── appReducer.js
│ │ │ └── index.js
│ │ └── state.js
│ └── utils
│ │ └── index.js
└── yarn.lock
├── furniture_shop
├── .buckconfig
├── .eslintrc.js
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── README.md
├── __tests__
│ └── App-test.js
├── android
│ ├── app
│ │ ├── BUCK
│ │ ├── build.gradle
│ │ ├── build_defs.bzl
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── furniture_shop_app
│ │ │ │ └── ReactNativeFlipper.java
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── furniture_shop_app
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
│ ├── Podfile
│ ├── furniture_shop_app-tvOS
│ │ └── Info.plist
│ ├── furniture_shop_app-tvOSTests
│ │ └── Info.plist
│ ├── furniture_shop_app.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── furniture_shop_app-tvOS.xcscheme
│ │ │ └── furniture_shop_app.xcscheme
│ ├── furniture_shop_app
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── main.m
│ └── furniture_shop_appTests
│ │ ├── Info.plist
│ │ └── furniture_shop_appTests.m
├── metro.config.js
├── package.json
├── src
│ ├── App.js
│ ├── assets
│ │ └── icons
│ │ │ └── HotDogMenu.png
│ ├── components
│ │ ├── FeaturedProduct
│ │ │ ├── featuredProductStyle.js
│ │ │ └── index.js
│ │ ├── NewProduct
│ │ │ ├── index.js
│ │ │ └── newProductStyle.js
│ │ └── index.js
│ ├── context
│ │ └── index.js
│ ├── navigators
│ │ └── Stack.js
│ ├── screens
│ │ ├── Home
│ │ │ ├── homeStyle.js
│ │ │ └── index.js
│ │ ├── ProductDetail
│ │ │ ├── index.js
│ │ │ └── productDetailStyle.js
│ │ └── index.js
│ └── store
│ │ ├── reducer
│ │ ├── appReducer.js
│ │ └── index.js
│ │ └── state.js
└── yarn.lock
├── job_finder_app
├── .buckconfig
├── .eslintrc.js
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── README.md
├── __tests__
│ └── App-test.js
├── android
│ ├── app
│ │ ├── BUCK
│ │ ├── build.gradle
│ │ ├── build_defs.bzl
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── job_finder_app
│ │ │ │ └── ReactNativeFlipper.java
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── job_finder_app
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
│ ├── Podfile
│ ├── job_finder_app-tvOS
│ │ └── Info.plist
│ ├── job_finder_app-tvOSTests
│ │ └── Info.plist
│ ├── job_finder_app.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── job_finder_app-tvOS.xcscheme
│ │ │ └── job_finder_app.xcscheme
│ ├── job_finder_app
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── main.m
│ └── job_finder_appTests
│ │ ├── Info.plist
│ │ └── job_finder_appTests.m
├── metro.config.js
├── package.json
├── src
│ ├── App.js
│ ├── components
│ │ ├── Category
│ │ │ ├── categoryStyle.js
│ │ │ └── index.js
│ │ ├── Job
│ │ │ ├── index.js
│ │ │ └── jobStyle.js
│ │ └── index.js
│ ├── context
│ │ └── index.js
│ ├── navigators
│ │ ├── NavigatorHandler.js
│ │ └── Stack.js
│ ├── screens
│ │ ├── Bookmarks
│ │ │ ├── bookmarksStyle.js
│ │ │ └── index.js
│ │ ├── Home
│ │ │ ├── homeStyle.js
│ │ │ └── index.js
│ │ ├── JobDetail
│ │ │ ├── index.js
│ │ │ └── jobDetailStyle.js
│ │ ├── Messages
│ │ │ ├── index.js
│ │ │ └── messagesStyle.js
│ │ ├── Notifications
│ │ │ ├── index.js
│ │ │ └── notificationsStyle.js
│ │ ├── Settings
│ │ │ ├── index.js
│ │ │ └── settingsStyle.js
│ │ └── index.js
│ ├── store
│ │ ├── reducer
│ │ │ ├── appReducer.js
│ │ │ └── index.js
│ │ └── state.js
│ └── utils
│ │ └── navigationHelper.js
└── yarn.lock
├── meditation_app
├── .buckconfig
├── .eslintrc.js
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── App.js
├── __tests__
│ └── App-test.js
├── android
│ ├── app
│ │ ├── BUCK
│ │ ├── build.gradle
│ │ ├── build_defs.bzl
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── meditation_app
│ │ │ │ └── ReactNativeFlipper.java
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── meditation_app
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
│ ├── Podfile
│ ├── meditation_app-tvOS
│ │ └── Info.plist
│ ├── meditation_app-tvOSTests
│ │ └── Info.plist
│ ├── meditation_app.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── meditation_app-tvOS.xcscheme
│ │ │ └── meditation_app.xcscheme
│ ├── meditation_app
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── main.m
│ └── meditation_appTests
│ │ ├── Info.plist
│ │ └── meditation_appTests.m
├── metro.config.js
├── package.json
└── yarn.lock
└── music_app_ui
├── .buckconfig
├── .eslintrc.js
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── __tests__
└── App-test.js
├── android
├── app
│ ├── BUCK
│ ├── build.gradle
│ ├── build_defs.bzl
│ ├── debug.keystore
│ ├── proguard-rules.pro
│ └── src
│ │ ├── debug
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── music_app_ui
│ │ │ └── ReactNativeFlipper.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── music_app_ui
│ │ │ ├── MainActivity.java
│ │ │ └── MainApplication.java
│ │ └── res
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
├── Podfile
├── music_app_ui-tvOS
│ └── Info.plist
├── music_app_ui-tvOSTests
│ └── Info.plist
├── music_app_ui.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── music_app_ui-tvOS.xcscheme
│ │ └── music_app_ui.xcscheme
├── music_app_ui
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Info.plist
│ ├── LaunchScreen.storyboard
│ └── main.m
└── music_app_uiTests
│ ├── Info.plist
│ └── music_app_uiTests.m
├── metro.config.js
├── package.json
├── src
├── App.js
├── assets
│ ├── logo.png
│ └── menu-icon.png
├── components
│ ├── CustomText
│ │ └── index.js
│ ├── NavDrawerHeader
│ │ ├── index.js
│ │ └── navDrawerHeaderStyle.js
│ └── index.js
├── navigators
│ ├── RootNavigation.js
│ └── Stack.js
├── screens
│ ├── Track
│ │ └── index.js
│ ├── Upload
│ │ ├── index.js
│ │ └── uploadStyle.js
│ └── index.js
└── utils
│ └── navigationHelper.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Princewill Iroka
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React-Native-UI-Templates
2 |
3 | React-Native templates/kits for different types of apps
4 |
5 | The templates are based on open source UI designs.
6 | Feel free to use any of these templates as a starter/guide for your own app.
7 |
8 | ### Usage and Setup
9 | - Clone this repo. Open your terminal and navigate into any of the app folders e.g *cd courses_app* and run *yarn* to install the dependencies.
10 | - Then run *yarn start* && *yarn android* in 2 separate terminals to run the app on an Android device. You could also run on iOS simulator too
11 |
12 | ### Want to suggest a UI ?
13 | If you would love to suggest a UI for me to work on, you can message me on **[Twitter](https://twitter.com/PrincewillIroka)** and I'll consider it.
14 |
15 | ### Want to support? Buy me a coffee
16 |
17 |
18 | ### Screenshots
19 |
20 | 1. **[Courses App UI Template](https://github.com/PrincewillIroka/React-Native-UI-Templates/tree/main/courses_app)**
21 |
22 | 
23 |
24 | 2. **[Furniture Shop UI Template](https://github.com/PrincewillIroka/React-Native-UI-Templates/tree/main/furniture_shop)**
25 |
26 | 
27 |
28 | 3. **[Job Finder App Template](https://github.com/PrincewillIroka/React-Native-UI-Templates/tree/main/job_finder_app)**
29 |
30 | 
31 |
32 | ###
33 | Note
34 | All information/assets used in these templates are for demo purposes.
35 |
36 | This project is licensed under the terms of the [MIT license.]https://github.com/PrincewillIroka/React-Native-UI-Templates/blob/main/LICENSE)
37 |
--------------------------------------------------------------------------------
/courses_app/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/courses_app/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/courses_app/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
41 |
42 | suppress_type=$FlowIssue
43 | suppress_type=$FlowFixMe
44 | suppress_type=$FlowFixMeProps
45 | suppress_type=$FlowFixMeState
46 |
47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50 |
51 | [lints]
52 | sketchy-null-number=warn
53 | sketchy-null-mixed=warn
54 | sketchy-number=warn
55 | untyped-type-import=warn
56 | nonstrict-import=warn
57 | deprecated-type=warn
58 | unsafe-getters-setters=warn
59 | unnecessary-invariant=warn
60 | signature-verification-failure=warn
61 | deprecated-utility=error
62 |
63 | [strict]
64 | deprecated-type
65 | nonstrict-import
66 | sketchy-null
67 | unclear-type
68 | unsafe-getters-setters
69 | untyped-import
70 | untyped-type-import
71 |
72 | [version]
73 | ^0.122.0
74 |
--------------------------------------------------------------------------------
/courses_app/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/courses_app/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
61 | .yarn
62 |
--------------------------------------------------------------------------------
/courses_app/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/courses_app/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/courses_app/README.md:
--------------------------------------------------------------------------------
1 | # Courses App
2 |
3 | React-Native template/kit for Courses App
4 |
5 | ### Screenshots
6 |
7 |   
8 |
--------------------------------------------------------------------------------
/courses_app/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/courses_app/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.courses_app",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.courses_app",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/courses_app/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/courses_app/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/debug.keystore
--------------------------------------------------------------------------------
/courses_app/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/courses_app/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/java/com/courses_app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.courses_app;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "courses_app";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | courses_app
3 |
4 |
--------------------------------------------------------------------------------
/courses_app/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/courses_app/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "29.0.2"
6 | minSdkVersion = 16
7 | compileSdkVersion = 29
8 | targetSdkVersion = 29
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | mavenLocal()
24 | maven {
25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26 | url("$rootDir/../node_modules/react-native/android")
27 | }
28 | maven {
29 | // Android JSC is installed from npm
30 | url("$rootDir/../node_modules/jsc-android/dist")
31 | }
32 |
33 | google()
34 | jcenter()
35 | maven { url 'https://www.jitpack.io' }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/courses_app/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.54.0
29 |
--------------------------------------------------------------------------------
/courses_app/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/courses_app/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/courses_app/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'courses_app'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/courses_app/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "courses_app",
3 | "displayName": "courses_app"
4 | }
--------------------------------------------------------------------------------
/courses_app/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/courses_app/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './src/App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/courses_app/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'courses_app' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(:path => config["reactNativePath"])
10 |
11 | target 'courses_appTests' do
12 | inherit! :complete
13 | # Pods for testing
14 | end
15 |
16 | # Enables Flipper.
17 | #
18 | # Note that if you have use_frameworks! enabled, Flipper will not work and
19 | # you should disable these next few lines.
20 | use_flipper!
21 | post_install do |installer|
22 | flipper_post_install(installer)
23 | end
24 | end
25 |
26 | target 'courses_app-tvOS' do
27 | # Pods for courses_app-tvOS
28 |
29 | target 'courses_app-tvOSTests' do
30 | inherit! :search_paths
31 | # Pods for testing
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 | #import
5 | #import
6 |
7 | #ifdef FB_SONARKIT_ENABLED
8 | #import
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import
14 |
15 | static void InitializeFlipper(UIApplication *application) {
16 | FlipperClient *client = [FlipperClient sharedClient];
17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
20 | [client addPlugin:[FlipperKitReactPlugin new]];
21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
22 | [client start];
23 | }
24 | #endif
25 |
26 | @implementation AppDelegate
27 |
28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
29 | {
30 | #ifdef FB_SONARKIT_ENABLED
31 | InitializeFlipper(application);
32 | #endif
33 |
34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
36 | moduleName:@"courses_app"
37 | initialProperties:nil];
38 |
39 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
40 |
41 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
42 | UIViewController *rootViewController = [UIViewController new];
43 | rootViewController.view = rootView;
44 | self.window.rootViewController = rootViewController;
45 | [self.window makeKeyAndVisible];
46 | return YES;
47 | }
48 |
49 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
50 | {
51 | #if DEBUG
52 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
53 | #else
54 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
55 | #endif
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/courses_app/ios/courses_app/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | courses_app
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_app/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_appTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/courses_app/ios/courses_appTests/courses_appTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface courses_appTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation courses_appTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
38 | if (level >= RCTLogLevelError) {
39 | redboxError = message;
40 | }
41 | });
42 | #endif
43 |
44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 |
48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
50 | return YES;
51 | }
52 | return NO;
53 | }];
54 | }
55 |
56 | #ifdef DEBUG
57 | RCTSetLogFunction(RCTDefaultLogFunction);
58 | #endif
59 |
60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62 | }
63 |
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/courses_app/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/courses_app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "courses_app",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "@react-navigation/drawer": "^5.12.3",
14 | "@react-navigation/native": "^5.9.2",
15 | "@react-navigation/stack": "^5.14.2",
16 | "react": "16.13.1",
17 | "react-native": "0.63.4",
18 | "react-native-dropdown-picker": "^4.0.2",
19 | "react-native-gesture-handler": "^1.10.1",
20 | "react-native-reanimated": "^1.13.2",
21 | "react-native-safe-area-context": "^3.1.9",
22 | "react-native-screens": "^2.17.1",
23 | "react-native-vector-icons": "^8.0.0",
24 | "shortid": "^2.2.16"
25 | },
26 | "devDependencies": {
27 | "@babel/core": "^7.12.16",
28 | "@babel/runtime": "^7.12.13",
29 | "@react-native-community/eslint-config": "^2.0.0",
30 | "babel-jest": "^26.6.3",
31 | "eslint": "^7.20.0",
32 | "jest": "^26.6.3",
33 | "metro-react-native-babel-preset": "^0.65.0",
34 | "react-test-renderer": "16.13.1"
35 | },
36 | "jest": {
37 | "preset": "react-native"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/courses_app/src/App.js:
--------------------------------------------------------------------------------
1 | import React, {useReducer} from 'react';
2 | import {SafeAreaView, StyleSheet, StatusBar} from 'react-native';
3 | import {NavigationContainer} from '@react-navigation/native';
4 | import AppStack from './navigators/Stack';
5 | import initialState from './store/state';
6 | import reducer from './store/reducer';
7 | import {AuthContext} from './context';
8 |
9 | const App = () => {
10 | const [state, dispatch] = useReducer(reducer, initialState);
11 |
12 | return (
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | );
26 | };
27 |
28 | const styles = StyleSheet.create({
29 | areaContainer: {
30 | flex: 1,
31 | },
32 | });
33 |
34 | export default App;
35 |
--------------------------------------------------------------------------------
/courses_app/src/assets/icons/FriesMenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/src/assets/icons/FriesMenu.png
--------------------------------------------------------------------------------
/courses_app/src/assets/illustrations/3647007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/src/assets/illustrations/3647007.png
--------------------------------------------------------------------------------
/courses_app/src/assets/illustrations/4991639.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/src/assets/illustrations/4991639.png
--------------------------------------------------------------------------------
/courses_app/src/assets/illustrations/9814.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/src/assets/illustrations/9814.png
--------------------------------------------------------------------------------
/courses_app/src/assets/illustrations/Wavy_Bus-35_Single-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/src/assets/illustrations/Wavy_Bus-35_Single-03.png
--------------------------------------------------------------------------------
/courses_app/src/assets/photos/photo-1494790108377-be9c29b29330.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/courses_app/src/assets/photos/photo-1494790108377-be9c29b29330.jpg
--------------------------------------------------------------------------------
/courses_app/src/components/CourseDetail/index.js:
--------------------------------------------------------------------------------
1 | import React, {useContext} from 'react';
2 | import {View, Text, ImageBackground, TouchableOpacity} from 'react-native';
3 | import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
4 | import styles from './courseDetailStyle';
5 | import {AuthContext} from '../../context';
6 |
7 | export function CourseDetail({courseDetail}) {
8 | const {state, dispatch} = useContext(AuthContext);
9 |
10 | const handleBookmark = () => {
11 | dispatch({
12 | type: 'addBookmark',
13 | payload: {courseDetail},
14 | });
15 | };
16 |
17 | return (
18 |
19 |
25 |
26 |
27 |
28 |
29 |
30 | handleBookmark()}>
31 | {courseDetail?.isBookmarked ? (
32 |
38 | ) : (
39 |
45 | )}
46 |
47 | {courseDetail?.noOfVideos} videos
48 |
49 | {courseDetail?.title}
50 |
51 |
52 |
57 |
58 |
59 |
60 | );
61 | }
62 |
--------------------------------------------------------------------------------
/courses_app/src/components/index.js:
--------------------------------------------------------------------------------
1 | export * from './CourseDetail';
2 |
--------------------------------------------------------------------------------
/courses_app/src/context/index.js:
--------------------------------------------------------------------------------
1 | import React, {createContext} from 'react';
2 |
3 | export const AuthContext = createContext({});
4 |
--------------------------------------------------------------------------------
/courses_app/src/navigators/Stack.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {createDrawerNavigator, DrawerItem} from '@react-navigation/drawer';
3 | import {createStackNavigator} from '@react-navigation/stack';
4 | import {Home, CoursesList} from '../screens';
5 |
6 | const Stack = createStackNavigator();
7 | const Drawer = createDrawerNavigator();
8 |
9 | const DrawerStack = () => {
10 | return (
11 |
12 |
17 |
18 | );
19 | };
20 |
21 | const SingleStack = () => {
22 | return (
23 |
24 |
29 |
30 | );
31 | };
32 |
33 | function AppStack() {
34 | return (
35 |
36 |
41 |
46 |
47 | );
48 | }
49 |
50 | export default AppStack;
51 |
--------------------------------------------------------------------------------
/courses_app/src/screens/CoursesList/index.js:
--------------------------------------------------------------------------------
1 | import React, {useContext} from 'react';
2 | import {
3 | View,
4 | Text,
5 | ImageBackground,
6 | TouchableOpacity,
7 | FlatList,
8 | } from 'react-native';
9 | import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
10 | import shortid from 'shortid';
11 | import styles from './coursesListStyle';
12 | import {getIllustration, getBackground} from '../../utils';
13 | import {AuthContext} from '../../context';
14 | import {CourseDetail} from '../../components';
15 |
16 | export function CoursesList({route, navigation}) {
17 | const course = route?.params;
18 |
19 | const {state, dispatch} = useContext(AuthContext);
20 |
21 | const handleBackButton = () => {
22 | navigation?.goBack();
23 | };
24 |
25 | const renderCourseList = ({item}) => {
26 | return ;
27 | };
28 |
29 | return (
30 |
31 |
32 |
36 | handleBackButton()}>
39 |
40 |
41 |
42 |
43 |
44 |
45 | {course?.title} Courses List
46 |
47 | shortid.generate()}
50 | renderItem={renderCourseList}
51 | horizontal={false}
52 | showsVerticalScrollIndicator={false}
53 | contentContainerStyle={styles.sectionScrollContainer}
54 | />
55 |
56 |
57 | );
58 | }
59 |
--------------------------------------------------------------------------------
/courses_app/src/screens/index.js:
--------------------------------------------------------------------------------
1 | export * from './Home';
2 | export * from './CoursesList';
3 |
--------------------------------------------------------------------------------
/courses_app/src/store/reducer/appReducer.js:
--------------------------------------------------------------------------------
1 | import initialState from '../state';
2 |
3 | export const appReducer = (state = initialState, action) => {
4 | switch (action.type) {
5 | case 'addBookmark': {
6 | const courseDetail = action?.payload?.courseDetail;
7 | let courses = state?.courses;
8 |
9 | courses = courses.map((course) => {
10 | if (course.id === courseDetail.id) {
11 | let isBookmarked = course.isBookmarked ? false : true;
12 | course.isBookmarked = isBookmarked;
13 | }
14 | return course;
15 | });
16 |
17 | return {
18 | ...state,
19 | courses,
20 | };
21 | }
22 | default:
23 | return state;
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/courses_app/src/store/reducer/index.js:
--------------------------------------------------------------------------------
1 | import {appReducer} from './appReducer';
2 |
3 | const reduceReducers = (...reducers) => (prevState, value, ...args) =>
4 | reducers.reduce(
5 | (newState, reducer) => reducer(newState, value, ...args),
6 | prevState,
7 | );
8 |
9 | export default reduceReducers(appReducer);
10 |
--------------------------------------------------------------------------------
/courses_app/src/utils/index.js:
--------------------------------------------------------------------------------
1 | import UXImage from '../assets/illustrations/3647007.png';
2 | import PSImage from '../assets/illustrations/4991639.png';
3 | import DVImage from '../assets/illustrations/9814.png';
4 | import IlImage from '../assets/illustrations/Wavy_Bus-35_Single-03.png';
5 |
6 | export const getIllustration = (id) => {
7 | return id === 0 ? UXImage : id === 1 ? PSImage : id === 2 ? IlImage : DVImage;
8 | };
9 |
10 | export const getBackground = (id) => {
11 | return id === 0
12 | ? {backgroundColor: '#FDAAB0'}
13 | : id === 1
14 | ? {backgroundColor: '#E296DE'}
15 | : id === 2
16 | ? {backgroundColor: '#9E7CF4'}
17 | : {backgroundColor: '#96D8CA'};
18 | };
19 |
--------------------------------------------------------------------------------
/furniture_shop/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/furniture_shop/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/furniture_shop/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
41 |
42 | suppress_type=$FlowIssue
43 | suppress_type=$FlowFixMe
44 | suppress_type=$FlowFixMeProps
45 | suppress_type=$FlowFixMeState
46 |
47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50 |
51 | [lints]
52 | sketchy-null-number=warn
53 | sketchy-null-mixed=warn
54 | sketchy-number=warn
55 | untyped-type-import=warn
56 | nonstrict-import=warn
57 | deprecated-type=warn
58 | unsafe-getters-setters=warn
59 | unnecessary-invariant=warn
60 | signature-verification-failure=warn
61 | deprecated-utility=error
62 |
63 | [strict]
64 | deprecated-type
65 | nonstrict-import
66 | sketchy-null
67 | unclear-type
68 | unsafe-getters-setters
69 | untyped-import
70 | untyped-type-import
71 |
72 | [version]
73 | ^0.122.0
74 |
--------------------------------------------------------------------------------
/furniture_shop/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/furniture_shop/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/furniture_shop/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/furniture_shop/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/furniture_shop/README.md:
--------------------------------------------------------------------------------
1 | # Furniture Shop
2 |
3 | React-Native template/kit for Furniture Shop
4 |
5 | ### Screenshots
6 |
7 |   
8 |
--------------------------------------------------------------------------------
/furniture_shop/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.furniture_shop",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.furniture_shop",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/debug.keystore
--------------------------------------------------------------------------------
/furniture_shop/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/java/com/furniture_shop_app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.furniture_shop;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "furniture_shop";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | furniture_shop
3 |
4 |
--------------------------------------------------------------------------------
/furniture_shop/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/furniture_shop/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "29.0.2"
6 | minSdkVersion = 16
7 | compileSdkVersion = 29
8 | targetSdkVersion = 29
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | mavenLocal()
24 | maven {
25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26 | url("$rootDir/../node_modules/react-native/android")
27 | }
28 | maven {
29 | // Android JSC is installed from npm
30 | url("$rootDir/../node_modules/jsc-android/dist")
31 | }
32 |
33 | google()
34 | jcenter()
35 | maven { url 'https://www.jitpack.io' }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/furniture_shop/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.54.0
29 |
--------------------------------------------------------------------------------
/furniture_shop/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/furniture_shop/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/furniture_shop/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'furniture_shop'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/furniture_shop/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "furniture_shop",
3 | "displayName": "furniture_shop"
4 | }
--------------------------------------------------------------------------------
/furniture_shop/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/furniture_shop/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './src/App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/furniture_shop/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'furniture_shop' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(:path => config["reactNativePath"])
10 |
11 | target 'furniture_shopTests' do
12 | inherit! :complete
13 | # Pods for testing
14 | end
15 |
16 | # Enables Flipper.
17 | #
18 | # Note that if you have use_frameworks! enabled, Flipper will not work and
19 | # you should disable these next few lines.
20 | use_flipper!
21 | post_install do |installer|
22 | flipper_post_install(installer)
23 | end
24 | end
25 |
26 | target 'furniture_shop-tvOS' do
27 | # Pods for furniture_shop-tvOS
28 |
29 | target 'furniture_shop-tvOSTests' do
30 | inherit! :search_paths
31 | # Pods for testing
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | furniture_shop
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_app/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_appTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/furniture_shop/ios/furniture_shop_appTests/furniture_shop_appTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface furniture_shopTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation furniture_shopTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
38 | if (level >= RCTLogLevelError) {
39 | redboxError = message;
40 | }
41 | });
42 | #endif
43 |
44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 |
48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
50 | return YES;
51 | }
52 | return NO;
53 | }];
54 | }
55 |
56 | #ifdef DEBUG
57 | RCTSetLogFunction(RCTDefaultLogFunction);
58 | #endif
59 |
60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62 | }
63 |
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/furniture_shop/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/furniture_shop/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "furniture_shop",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "@react-navigation/native": "^5.9.2",
14 | "@react-navigation/stack": "^5.14.2",
15 | "react": "16.13.1",
16 | "react-native": "0.63.4",
17 | "react-native-gesture-handler": "^1.10.1",
18 | "react-native-safe-area-context": "^3.1.9",
19 | "react-native-screens": "^2.17.1",
20 | "react-native-vector-icons": "^8.0.0",
21 | "shortid": "^2.2.16"
22 | },
23 | "devDependencies": {
24 | "@babel/core": "^7.12.16",
25 | "@babel/runtime": "^7.12.13",
26 | "@react-native-community/eslint-config": "^2.0.0",
27 | "babel-jest": "^26.6.3",
28 | "eslint": "^7.20.0",
29 | "jest": "^26.6.3",
30 | "metro-react-native-babel-preset": "^0.65.1",
31 | "react-test-renderer": "16.13.1"
32 | },
33 | "jest": {
34 | "preset": "react-native"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/furniture_shop/src/App.js:
--------------------------------------------------------------------------------
1 | import React,{useReducer} from 'react';
2 | import {SafeAreaView, StyleSheet, StatusBar} from 'react-native';
3 | import {NavigationContainer} from '@react-navigation/native';
4 | import AppStack from './navigators/Stack';
5 | import initialState from './store/state';
6 | import reducer from './store/reducer';
7 | import {AuthContext} from './context';
8 |
9 | const App = () => {
10 | const [state, dispatch] = useReducer(reducer, initialState);
11 |
12 | return (
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | );
26 | };
27 |
28 | const styles = StyleSheet.create({
29 | areaContainer: {
30 | flex: 1,
31 | },
32 | });
33 |
34 | export default App;
35 |
--------------------------------------------------------------------------------
/furniture_shop/src/assets/icons/HotDogMenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/furniture_shop/src/assets/icons/HotDogMenu.png
--------------------------------------------------------------------------------
/furniture_shop/src/components/FeaturedProduct/featuredProductStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Dimensions} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | furnitureContainer: {
5 | backgroundColor: '#fff',
6 | borderRadius: 5,
7 | width: Dimensions.get('window').width / 2.5,
8 | padding: 10,
9 | shadowColor: '#000',
10 | shadowOffset: {
11 | width: 0,
12 | height: 0.5,
13 | },
14 | shadowOpacity: 0,
15 | shadowRadius: 0.5,
16 | elevation: 2,
17 | marginRight: Dimensions.get('window').width / 10,
18 | display: 'flex',
19 | justifyContent: 'center',
20 | alignItems: 'center',
21 | },
22 | furnitureImage: {
23 | height: 100,
24 | width: 100,
25 | marginBottom: 5,
26 | },
27 | furnitureName: {
28 | width: '100%',
29 | fontWeight: 'bold',
30 | opacity: 0.8,
31 | },
32 | furnitureType: {
33 | width: '100%',
34 | opacity: 0.5,
35 | marginBottom: 10,
36 | fontSize: 13,
37 | },
38 | furnitureBottomRow: {
39 | display: 'flex',
40 | flexDirection: 'row',
41 | justifyContent: 'space-between',
42 | width: '100%',
43 | alignItems: 'center',
44 | },
45 | furniturePrice: {
46 | opacity: 0.7,
47 | fontSize: 13
48 | },
49 | addToCartBtn: {
50 | backgroundColor: '#B48B49',
51 | padding: 5,
52 | borderRadius: 50,
53 | },
54 | });
55 |
56 | export default styles;
57 |
--------------------------------------------------------------------------------
/furniture_shop/src/components/FeaturedProduct/index.js:
--------------------------------------------------------------------------------
1 | import React, {useContext} from 'react';
2 | import {View, Text, Image, TouchableOpacity} from 'react-native';
3 | import AntDesign from 'react-native-vector-icons/AntDesign';
4 | import styles from './featuredProductStyle.js';
5 | import {AuthContext} from '../../context';
6 |
7 | export function FeaturedProduct({furniture, onNavigate}) {
8 | const {state, dispatch} = useContext(AuthContext);
9 |
10 | const handleNoInCart = (type) => {
11 | dispatch({
12 | type: 'addToCart',
13 | payload: {furniture, type},
14 | });
15 | };
16 |
17 | return (
18 |
19 | onNavigate('ProductDetail', furniture)}>
20 |
21 |
22 |
23 | {furniture?.name}
24 |
25 |
26 | {furniture?.type}
27 |
28 |
29 | ${furniture?.price}
30 | handleNoInCart('add')}>
33 |
34 |
35 |
36 |
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/furniture_shop/src/components/NewProduct/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text, Image, TouchableOpacity} from 'react-native';
3 | import styles from './newProductStyle.js';
4 |
5 | export function NewProduct({furniture, onNavigate}) {
6 | return (
7 |
8 | onNavigate('ProductDetail', furniture)}
10 | style={styles.furnitureImageWrapper}>
11 |
12 |
13 |
14 | {furniture?.name}
15 |
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/furniture_shop/src/components/NewProduct/newProductStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Dimensions} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | furnitureContainer: {
5 | width: Dimensions.get('window').width / 2.8,
6 | display: 'flex',
7 | alignItems: 'center',
8 | justifyContent: 'center',
9 | paddingBottom: 7,
10 | marginRight: Dimensions.get('window').width / 20,
11 | height: 130,
12 | },
13 | furnitureImageWrapper: {
14 | height: '80%',
15 | width: '100%',
16 | marginBottom: 5,
17 | },
18 | furnitureImage: {
19 | height: '100%',
20 | width: '100%',
21 | borderRadius: 15,
22 | },
23 | furnitureName: {
24 | width: '85%',
25 | fontWeight: 'bold',
26 | opacity: 0.6,
27 | textAlign: 'center',
28 | fontSize: 12,
29 | },
30 | });
31 |
32 | export default styles;
33 |
--------------------------------------------------------------------------------
/furniture_shop/src/components/index.js:
--------------------------------------------------------------------------------
1 | export * from './FeaturedProduct';
2 | export * from './NewProduct';
3 |
--------------------------------------------------------------------------------
/furniture_shop/src/context/index.js:
--------------------------------------------------------------------------------
1 | import React, {createContext} from 'react';
2 |
3 | export const AuthContext = createContext({});
4 |
--------------------------------------------------------------------------------
/furniture_shop/src/navigators/Stack.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {createStackNavigator} from '@react-navigation/stack';
3 | import {Home, ProductDetail} from '../screens';
4 |
5 | const Stack = createStackNavigator();
6 |
7 | function AppStack() {
8 | return (
9 |
10 |
15 |
20 |
21 | );
22 | }
23 |
24 | export default AppStack;
25 |
--------------------------------------------------------------------------------
/furniture_shop/src/screens/index.js:
--------------------------------------------------------------------------------
1 | export * from './Home';
2 | export * from './ProductDetail';
3 |
--------------------------------------------------------------------------------
/furniture_shop/src/store/reducer/appReducer.js:
--------------------------------------------------------------------------------
1 | import initialState from '../state';
2 |
3 | export const appReducer = (state = initialState, action) => {
4 | switch (action.type) {
5 | case 'addToCart': {
6 | const {furniture, type} = action.payload;
7 | let cart = state?.cart;
8 | let isFound = cart?.some((item) => item.id === furniture.id);
9 | if (!isFound && type === 'add') {
10 | furniture.noInCart = 1;
11 | cart.push(furniture);
12 | } else {
13 | cart = cart.map((product) => {
14 | if (product.id === furniture.id) {
15 | if (type === 'add') {
16 | product.noInCart = product.noInCart + 1;
17 | } else if (type === 'subtract' && product.noInCart !== 0) {
18 | product.noInCart = product.noInCart - 1;
19 | }
20 | }
21 | return product;
22 | });
23 | }
24 |
25 | return {
26 | ...state,
27 | cart,
28 | };
29 | }
30 | default:
31 | return state;
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/furniture_shop/src/store/reducer/index.js:
--------------------------------------------------------------------------------
1 | import {appReducer} from './appReducer';
2 |
3 | const reduceReducers = (...reducers) => (prevState, value, ...args) =>
4 | reducers.reduce(
5 | (newState, reducer) => reducer(newState, value, ...args),
6 | prevState,
7 | );
8 |
9 | export default reduceReducers(appReducer);
10 |
--------------------------------------------------------------------------------
/job_finder_app/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/job_finder_app/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/job_finder_app/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
41 |
42 | suppress_type=$FlowIssue
43 | suppress_type=$FlowFixMe
44 | suppress_type=$FlowFixMeProps
45 | suppress_type=$FlowFixMeState
46 |
47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50 |
51 | [lints]
52 | sketchy-null-number=warn
53 | sketchy-null-mixed=warn
54 | sketchy-number=warn
55 | untyped-type-import=warn
56 | nonstrict-import=warn
57 | deprecated-type=warn
58 | unsafe-getters-setters=warn
59 | unnecessary-invariant=warn
60 | signature-verification-failure=warn
61 | deprecated-utility=error
62 |
63 | [strict]
64 | deprecated-type
65 | nonstrict-import
66 | sketchy-null
67 | unclear-type
68 | unsafe-getters-setters
69 | untyped-import
70 | untyped-type-import
71 |
72 | [version]
73 | ^0.122.0
74 |
--------------------------------------------------------------------------------
/job_finder_app/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/job_finder_app/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/job_finder_app/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/job_finder_app/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/job_finder_app/README.md:
--------------------------------------------------------------------------------
1 | # Job Finder App
2 |
3 | React-Native template/kit for Job Finder App
4 |
5 | ### Screenshots
6 |
7 |   
8 |
--------------------------------------------------------------------------------
/job_finder_app/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.job_finder_app",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.job_finder_app",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/debug.keystore
--------------------------------------------------------------------------------
/job_finder_app/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/java/com/job_finder_app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.job_finder_app;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "job_finder_app";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | job_finder_app
3 |
4 |
--------------------------------------------------------------------------------
/job_finder_app/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/job_finder_app/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "29.0.2"
6 | minSdkVersion = 16
7 | compileSdkVersion = 29
8 | targetSdkVersion = 29
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | mavenLocal()
24 | maven {
25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26 | url("$rootDir/../node_modules/react-native/android")
27 | }
28 | maven {
29 | // Android JSC is installed from npm
30 | url("$rootDir/../node_modules/jsc-android/dist")
31 | }
32 |
33 | google()
34 | jcenter()
35 | maven { url 'https://www.jitpack.io' }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/job_finder_app/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.54.0
29 |
--------------------------------------------------------------------------------
/job_finder_app/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/job_finder_app/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/job_finder_app/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'job_finder_app'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/job_finder_app/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "job_finder_app",
3 | "displayName": "job_finder_app"
4 | }
--------------------------------------------------------------------------------
/job_finder_app/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/job_finder_app/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './src/App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/job_finder_app/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'job_finder_app' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(:path => config["reactNativePath"])
10 |
11 | target 'job_finder_appTests' do
12 | inherit! :complete
13 | # Pods for testing
14 | end
15 |
16 | # Enables Flipper.
17 | #
18 | # Note that if you have use_frameworks! enabled, Flipper will not work and
19 | # you should disable these next few lines.
20 | use_flipper!
21 | post_install do |installer|
22 | flipper_post_install(installer)
23 | end
24 | end
25 |
26 | target 'job_finder_app-tvOS' do
27 | # Pods for job_finder_app-tvOS
28 |
29 | target 'job_finder_app-tvOSTests' do
30 | inherit! :search_paths
31 | # Pods for testing
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | job_finder_app
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_app/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_appTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/job_finder_app/ios/job_finder_appTests/job_finder_appTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface job_finder_appTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation job_finder_appTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
38 | if (level >= RCTLogLevelError) {
39 | redboxError = message;
40 | }
41 | });
42 | #endif
43 |
44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 |
48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
50 | return YES;
51 | }
52 | return NO;
53 | }];
54 | }
55 |
56 | #ifdef DEBUG
57 | RCTSetLogFunction(RCTDefaultLogFunction);
58 | #endif
59 |
60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62 | }
63 |
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/job_finder_app/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/job_finder_app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "job_finder_app",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "@react-native-community/masked-view": "^0.1.10",
14 | "@react-navigation/bottom-tabs": "^5.11.7",
15 | "@react-navigation/native": "^5.9.2",
16 | "@react-navigation/stack": "^5.14.2",
17 | "react": "16.13.1",
18 | "react-native": "0.63.4",
19 | "react-native-gesture-handler": "^1.10.1",
20 | "react-native-safe-area-context": "^3.1.9",
21 | "react-native-screens": "^2.17.1",
22 | "react-native-vector-icons": "^8.0.0",
23 | "shortid": "^2.2.16"
24 | },
25 | "devDependencies": {
26 | "@babel/core": "^7.12.17",
27 | "@babel/runtime": "^7.12.18",
28 | "@react-native-community/eslint-config": "^2.0.0",
29 | "babel-jest": "^26.6.3",
30 | "eslint": "^7.20.0",
31 | "jest": "^26.6.3",
32 | "metro-react-native-babel-preset": "^0.65.1",
33 | "react-test-renderer": "16.13.1"
34 | },
35 | "jest": {
36 | "preset": "react-native"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/job_finder_app/src/App.js:
--------------------------------------------------------------------------------
1 | import React, {useReducer} from 'react';
2 | import {SafeAreaView, StyleSheet, StatusBar} from 'react-native';
3 | import {NavigationContainer} from '@react-navigation/native';
4 | import AppStack from './navigators/Stack';
5 | import initialState from './store/state';
6 | import reducer from './store/reducer';
7 | import {AuthContext} from './context';
8 |
9 | const App = () => {
10 | const [state, dispatch] = useReducer(reducer, initialState);
11 |
12 | return (
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | );
26 | };
27 |
28 | const styles = StyleSheet.create({
29 | areaContainer: {
30 | flex: 1,
31 | },
32 | });
33 |
34 | export default App;
35 |
--------------------------------------------------------------------------------
/job_finder_app/src/components/Category/categoryStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Dimensions} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | categoryContainer: {
5 | backgroundColor: '#fff',
6 | borderRadius: 5,
7 | width: Dimensions.get('window').width / 2.5,
8 | padding: 10,
9 | paddingTop: 5,
10 | shadowColor: '#000',
11 | shadowOffset: {
12 | width: 0,
13 | height: 0.5,
14 | },
15 | shadowOpacity: 0,
16 | shadowRadius: 0.5,
17 | elevation: 2,
18 | marginRight: Dimensions.get('window').width / 10,
19 | display: 'flex',
20 | justifyContent: 'center',
21 | alignItems: 'center',
22 | },
23 | categoryImage: {
24 | height: 100,
25 | width: '100%',
26 | resizeMode: 'contain',
27 | marginBottom: 10,
28 | borderRadius: 5,
29 | },
30 | categoryTitle: {
31 | fontWeight: 'bold',
32 | fontSize: 15,
33 | marginBottom: 5,
34 | },
35 | categoryNoOfJobs: {
36 | opacity: 0.5,
37 | },
38 | });
39 |
40 | export default styles;
41 |
--------------------------------------------------------------------------------
/job_finder_app/src/components/Category/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {Text, Image, TouchableOpacity} from 'react-native';
3 | import styles from './categoryStyle.js';
4 |
5 | export function Category({category}) {
6 | return (
7 |
8 |
9 |
10 | {category?.title}
11 |
12 |
16 | {category?.noOfJobs} Jobs
17 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/job_finder_app/src/components/Job/index.js:
--------------------------------------------------------------------------------
1 | import React, {useContext} from 'react';
2 | import {View, Text, Image, TouchableOpacity} from 'react-native';
3 | import FontAwesome from 'react-native-vector-icons/FontAwesome';
4 | import styles from './jobStyle.js';
5 | import {AuthContext} from '../../context';
6 | import {handleNestedNavigation} from '../../navigators/NavigatorHandler';
7 | import {getScreenParent} from '../../utils/navigationHelper';
8 |
9 | export function Job({job, navigation}) {
10 | const {state, dispatch} = useContext(AuthContext);
11 |
12 | const isBookmarked = () => {
13 | let value;
14 | let bookmarkedJobs = state?.bookmarks;
15 | value = bookmarkedJobs?.find(
16 | (bookmarkedJob) => bookmarkedJob.id === job.id,
17 | );
18 | return value;
19 | };
20 |
21 | const handleNavigation = (route, params) => {
22 | handleNestedNavigation(navigation, getScreenParent(route), route, params);
23 | };
24 |
25 | return (
26 | handleNavigation('JobDetail', {job})}>
29 |
30 |
31 |
32 | {job?.company?.name}
33 |
34 |
35 | {job?.role}
36 |
37 |
38 |
39 | {job?.salary} |
40 |
41 |
45 | {job?.location}
46 |
47 |
48 |
49 | {isBookmarked() ? (
50 |
51 | ) : (
52 |
53 | )}
54 |
55 | );
56 | }
57 |
--------------------------------------------------------------------------------
/job_finder_app/src/components/Job/jobStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Dimensions} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | jobContainer: {
5 | backgroundColor: '#fff',
6 | borderRadius: 5,
7 | display: 'flex',
8 | flexDirection: 'row',
9 | justifyContent: 'space-between',
10 | alignItems: 'center',
11 | shadowColor: '#000',
12 | shadowOffset: {
13 | width: 0,
14 | height: 0.5,
15 | },
16 | shadowOpacity: 0,
17 | shadowRadius: 0.5,
18 | elevation: 2,
19 | paddingHorizontal: 10,
20 | paddingVertical: 5,
21 | marginBottom: 20,
22 | },
23 | jobImage: {
24 | height: 80,
25 | width: '23%',
26 | resizeMode: 'contain',
27 | },
28 | jobInfo: {
29 | width: '60%',
30 | },
31 | flexRow: {
32 | display: 'flex',
33 | flexDirection: 'row',
34 | alignItems: 'center',
35 | },
36 | jobCompany: {
37 | width: '100%',
38 | opacity: 0.5,
39 | fontSize: 13,
40 | fontWeight: 'bold',
41 | },
42 | jobRole: {
43 | fontWeight: 'bold',
44 | fontSize: 14,
45 | width: '100%',
46 | opacity: 0.9,
47 | },
48 | jobSalary: {
49 | fontSize: 13,
50 | },
51 | jobLocation: {
52 | fontSize: 13,
53 | marginLeft: 5,
54 | },
55 | });
56 |
57 | export default styles;
58 |
--------------------------------------------------------------------------------
/job_finder_app/src/components/index.js:
--------------------------------------------------------------------------------
1 | export * from './Category';
2 | export * from './Job';
3 |
--------------------------------------------------------------------------------
/job_finder_app/src/context/index.js:
--------------------------------------------------------------------------------
1 | import React, {createContext} from 'react';
2 |
3 | export const AuthContext = createContext({});
4 |
--------------------------------------------------------------------------------
/job_finder_app/src/navigators/NavigatorHandler.js:
--------------------------------------------------------------------------------
1 | export const handleScreenNavigation = (navigation, route, params) => {
2 | navigation?.navigate(route, {
3 | params,
4 | });
5 | };
6 |
7 | export const handleScreenReplace = (navigation, route, params) => {
8 | navigation?.replace(route, {
9 | params,
10 | });
11 | };
12 |
13 | export const handleNestedNavigation = (navigation, parent, route, params) => {
14 | navigation?.navigate(parent, {screen: route, params});
15 | };
16 |
17 | export const handleNestedReplace = (navigation, parent, route, params) => {
18 | navigation?.replace(parent, {screen: route, params});
19 | };
20 |
21 | export const handleScreenBack = (navigation) => {
22 | navigation?.goBack();
23 | };
24 |
25 | export const handleRemoveScreen = (navigation) => {
26 | navigation?.pop();
27 | };
28 |
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Bookmarks/bookmarksStyle.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/src/screens/Bookmarks/bookmarksStyle.js
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Bookmarks/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text} from 'react-native';
3 |
4 | export function Bookmarks() {
5 | return (
6 |
7 | Bookmarks
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Home/homeStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | homeContainer: {
5 | flex: 1,
6 | backgroundColor: '#fafafa',
7 | },
8 | homeContent: {
9 | height: '100%',
10 | padding: 16,
11 | },
12 | homeHeader: {
13 | display: 'flex',
14 | justifyContent: 'space-between',
15 | flexDirection: 'row',
16 | alignItems: 'center',
17 | marginBottom: 40,
18 | },
19 | usernameText: {
20 | fontWeight: 'bold',
21 | opacity: 0.3,
22 | },
23 | findJobText: {fontSize: 17, fontWeight: 'bold'},
24 | profilePic: {
25 | height: 35,
26 | width: 35,
27 | borderRadius: 10,
28 | },
29 | profilePicWrapper: {
30 | borderColor: '#CECECE',
31 | borderWidth: 1,
32 | borderRadius: 15,
33 | padding: 5,
34 | },
35 | searchContainer: {
36 | height: 40,
37 | width: '100%',
38 | display: 'flex',
39 | flexDirection: 'row',
40 | marginBottom: 60,
41 | },
42 | searchInput: {
43 | width: '85%',
44 | height: 40,
45 | fontSize: 15,
46 | backgroundColor: '#ececec',
47 | borderTopLeftRadius: 15,
48 | borderBottomLeftRadius: 15,
49 | paddingLeft: 15,
50 | paddingRight: 5,
51 | },
52 | searchButton: {
53 | backgroundColor: '#31A854',
54 | width: '15%',
55 | display: 'flex',
56 | alignItems: 'center',
57 | justifyContent: 'center',
58 | borderTopRightRadius: 15,
59 | borderBottomRightRadius: 15,
60 | },
61 | heading: {
62 | fontWeight: 'bold',
63 | fontSize: 15.5,
64 | opacity: 0.9,
65 | marginBottom: 10,
66 | },
67 | scrollViewContent: {
68 | // paddingBottom: 40,
69 | },
70 | container: {
71 | display: 'flex',
72 | },
73 | section: {
74 | display: 'flex',
75 | marginBottom: 50,
76 | },
77 | sectionScrollContainer: {
78 | paddingVertical: 1,
79 | paddingHorizontal: 1,
80 | },
81 | });
82 |
83 | export default styles;
84 |
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Messages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text} from 'react-native';
3 |
4 | export function Messages() {
5 | return (
6 |
7 | Messages
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Messages/messagesStyle.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/src/screens/Messages/messagesStyle.js
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Notifications/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text} from 'react-native';
3 |
4 | export function Notifications() {
5 | return (
6 |
7 | Notifications
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Notifications/notificationsStyle.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/src/screens/Notifications/notificationsStyle.js
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Settings/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text} from 'react-native';
3 |
4 | export function Settings() {
5 | return (
6 |
7 | Settings
8 |
9 | );
10 | }
11 |
--------------------------------------------------------------------------------
/job_finder_app/src/screens/Settings/settingsStyle.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/job_finder_app/src/screens/Settings/settingsStyle.js
--------------------------------------------------------------------------------
/job_finder_app/src/screens/index.js:
--------------------------------------------------------------------------------
1 | export * from './Home';
2 | export * from './JobDetail';
3 | export * from './Bookmarks';
4 | export * from './Messages';
5 | export * from './Notifications';
6 | export * from './Settings';
7 |
--------------------------------------------------------------------------------
/job_finder_app/src/store/reducer/appReducer.js:
--------------------------------------------------------------------------------
1 | import initialState from '../state';
2 |
3 | export const appReducer = (state = initialState, action) => {
4 | switch (action.type) {
5 | case 'addBookmark': {
6 | const jobDetail = action?.payload?.jobDetail;
7 | let jobs = state?.jobs;
8 |
9 | jobs = jobs.map((job) => {
10 | if (job.id === jobDetail.id) {
11 | let isBookmarked = job.isBookmarked ? false : true;
12 | job.isBookmarked = isBookmarked;
13 | }
14 | return job;
15 | });
16 |
17 | return {
18 | ...state,
19 | jobs,
20 | };
21 | }
22 | default:
23 | return state;
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/job_finder_app/src/store/reducer/index.js:
--------------------------------------------------------------------------------
1 | import {appReducer} from './appReducer';
2 |
3 | const reduceReducers = (...reducers) => (prevState, value, ...args) =>
4 | reducers.reduce(
5 | (newState, reducer) => reducer(newState, value, ...args),
6 | prevState,
7 | );
8 |
9 | export default reduceReducers(appReducer);
10 |
--------------------------------------------------------------------------------
/job_finder_app/src/store/state.js:
--------------------------------------------------------------------------------
1 | export default state = {
2 | categories: [
3 | {
4 | title: 'DevOps',
5 | noOfJobs: 120,
6 | image:
7 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR020A6piMuQDzh0K3L-Se2x7m1IaPjK3waug&usqp=CAU',
8 | },
9 | {
10 | title: 'Software Development',
11 | noOfJobs: 148,
12 | image:
13 | 'https://www.yourtrainingedge.com/wp-content/uploads/2019/07/artificial-intelligence-blur-close-up-546819.jpg',
14 | },
15 | {
16 | title: 'UI/UX Design',
17 | noOfJobs: 195,
18 | image:
19 | 'https://www.dailyhostnews.com/wp-content/uploads/2020/12/post-featured-compressed-14-compressed-2100x1200.jpg',
20 | },
21 | ],
22 | jobs: [
23 | {
24 | id: 'A123',
25 | company: {
26 | name: 'Spotify',
27 | logo:
28 | 'https://1000logos.net/wp-content/uploads/2017/08/Spotify-Logo.png',
29 | },
30 | role: 'Senior UI Designer',
31 | salary: '$50/hr',
32 | location: 'Remote',
33 | },
34 | {
35 | id: 'B567',
36 | company: {
37 | name: 'Google',
38 | logo:
39 | 'https://i.pinimg.com/originals/00/ef/95/00ef95babba98ec1c4a326be11775602.png',
40 | },
41 | role: 'Product Manager',
42 | salary: '$100/hr',
43 | location: 'Full time',
44 | },
45 | {
46 | id: 'C789',
47 | company: {
48 | name: 'Coca-cola',
49 | logo:
50 | 'https://upload.wikimedia.org/wikipedia/commons/c/ce/Coca-Cola_logo.svg',
51 | },
52 | role: 'React Developer',
53 | salary: '$50/hr',
54 | location: 'Remote',
55 | },
56 | {
57 | id: 'D215',
58 | company: {
59 | name: 'Behance',
60 | logo: 'https://cdn.worldvectorlogo.com/logos/behance-1.svg',
61 | },
62 | role: 'C# Developer',
63 | salary: '$100/hr',
64 | location: 'Full time',
65 | },
66 | ],
67 | bookmarks: [
68 | {
69 | id: 'A123',
70 | company: {
71 | name: 'Spotify',
72 | logo:
73 | 'https://1000logos.net/wp-content/uploads/2017/08/Spotify-Logo.png',
74 | },
75 | role: 'UI Designer',
76 | salary: '$50/hr',
77 | location: 'Remote',
78 | },
79 | ],
80 | };
81 |
--------------------------------------------------------------------------------
/job_finder_app/src/utils/navigationHelper.js:
--------------------------------------------------------------------------------
1 | export const getScreenParent = (route) => {
2 | let parent;
3 | let isNavStack = route === 'JobDetail';
4 |
5 | let isTabStack = route === 'Home' || route === 'Bookmarks';
6 |
7 | if (isNavStack) {
8 | parent = 'NavStack';
9 | } else if (isTabStack) {
10 | parent = 'TabStack';
11 | }
12 | return parent;
13 | };
14 |
--------------------------------------------------------------------------------
/meditation_app/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/meditation_app/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/meditation_app/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
41 |
42 | suppress_type=$FlowIssue
43 | suppress_type=$FlowFixMe
44 | suppress_type=$FlowFixMeProps
45 | suppress_type=$FlowFixMeState
46 |
47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50 |
51 | [lints]
52 | sketchy-null-number=warn
53 | sketchy-null-mixed=warn
54 | sketchy-number=warn
55 | untyped-type-import=warn
56 | nonstrict-import=warn
57 | deprecated-type=warn
58 | unsafe-getters-setters=warn
59 | unnecessary-invariant=warn
60 | signature-verification-failure=warn
61 | deprecated-utility=error
62 |
63 | [strict]
64 | deprecated-type
65 | nonstrict-import
66 | sketchy-null
67 | unclear-type
68 | unsafe-getters-setters
69 | untyped-import
70 | untyped-type-import
71 |
72 | [version]
73 | ^0.122.0
74 |
--------------------------------------------------------------------------------
/meditation_app/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/meditation_app/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/meditation_app/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/meditation_app/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/meditation_app/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/meditation_app/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.meditation_app",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.meditation_app",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/meditation_app/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/meditation_app/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/debug.keystore
--------------------------------------------------------------------------------
/meditation_app/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/meditation_app/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/java/com/meditation_app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.meditation_app;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "meditation_app";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | meditation_app
3 |
4 |
--------------------------------------------------------------------------------
/meditation_app/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/meditation_app/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "29.0.2"
6 | minSdkVersion = 16
7 | compileSdkVersion = 29
8 | targetSdkVersion = 29
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | mavenLocal()
24 | maven {
25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26 | url("$rootDir/../node_modules/react-native/android")
27 | }
28 | maven {
29 | // Android JSC is installed from npm
30 | url("$rootDir/../node_modules/jsc-android/dist")
31 | }
32 |
33 | google()
34 | jcenter()
35 | maven { url 'https://www.jitpack.io' }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/meditation_app/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.54.0
29 |
--------------------------------------------------------------------------------
/meditation_app/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/meditation_app/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/meditation_app/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/meditation_app/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'meditation_app'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/meditation_app/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "meditation_app",
3 | "displayName": "meditation_app"
4 | }
--------------------------------------------------------------------------------
/meditation_app/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/meditation_app/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/meditation_app/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'meditation_app' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(:path => config["reactNativePath"])
10 |
11 | target 'meditation_appTests' do
12 | inherit! :complete
13 | # Pods for testing
14 | end
15 |
16 | # Enables Flipper.
17 | #
18 | # Note that if you have use_frameworks! enabled, Flipper will not work and
19 | # you should disable these next few lines.
20 | use_flipper!
21 | post_install do |installer|
22 | flipper_post_install(installer)
23 | end
24 | end
25 |
26 | target 'meditation_app-tvOS' do
27 | # Pods for meditation_app-tvOS
28 |
29 | target 'meditation_app-tvOSTests' do
30 | inherit! :search_paths
31 | # Pods for testing
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | meditation_app
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_app/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_appTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/meditation_app/ios/meditation_appTests/meditation_appTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface meditation_appTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation meditation_appTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
38 | if (level >= RCTLogLevelError) {
39 | redboxError = message;
40 | }
41 | });
42 | #endif
43 |
44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 |
48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
50 | return YES;
51 | }
52 | return NO;
53 | }];
54 | }
55 |
56 | #ifdef DEBUG
57 | RCTSetLogFunction(RCTDefaultLogFunction);
58 | #endif
59 |
60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62 | }
63 |
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/meditation_app/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/meditation_app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "meditation_app",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "react": "16.13.1",
14 | "react-native": "0.63.4"
15 | },
16 | "devDependencies": {
17 | "@babel/core": "^7.12.17",
18 | "@babel/runtime": "^7.12.18",
19 | "@react-native-community/eslint-config": "^2.0.0",
20 | "babel-jest": "^26.6.3",
21 | "eslint": "^7.20.0",
22 | "jest": "^26.6.3",
23 | "metro-react-native-babel-preset": "^0.65.1",
24 | "react-test-renderer": "16.13.1"
25 | },
26 | "jest": {
27 | "preset": "react-native"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/music_app_ui/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/music_app_ui/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/music_app_ui/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; These should not be required directly
12 | ; require from fbjs/lib instead: require('fbjs/lib/warning')
13 | node_modules/warning/.*
14 |
15 | ; Flow doesn't support platforms
16 | .*/Libraries/Utilities/LoadingView.js
17 |
18 | [untyped]
19 | .*/node_modules/@react-native-community/cli/.*/.*
20 |
21 | [include]
22 |
23 | [libs]
24 | node_modules/react-native/interface.js
25 | node_modules/react-native/flow/
26 |
27 | [options]
28 | emoji=true
29 |
30 | esproposal.optional_chaining=enable
31 | esproposal.nullish_coalescing=enable
32 |
33 | module.file_ext=.js
34 | module.file_ext=.json
35 | module.file_ext=.ios.js
36 |
37 | munge_underscores=true
38 |
39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
41 |
42 | suppress_type=$FlowIssue
43 | suppress_type=$FlowFixMe
44 | suppress_type=$FlowFixMeProps
45 | suppress_type=$FlowFixMeState
46 |
47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
50 |
51 | [lints]
52 | sketchy-null-number=warn
53 | sketchy-null-mixed=warn
54 | sketchy-number=warn
55 | untyped-type-import=warn
56 | nonstrict-import=warn
57 | deprecated-type=warn
58 | unsafe-getters-setters=warn
59 | unnecessary-invariant=warn
60 | signature-verification-failure=warn
61 | deprecated-utility=error
62 |
63 | [strict]
64 | deprecated-type
65 | nonstrict-import
66 | sketchy-null
67 | unclear-type
68 | unsafe-getters-setters
69 | untyped-import
70 | untyped-type-import
71 |
72 | [version]
73 | ^0.122.0
74 |
--------------------------------------------------------------------------------
/music_app_ui/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/music_app_ui/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/music_app_ui/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | };
7 |
--------------------------------------------------------------------------------
/music_app_ui/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/music_app_ui/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.music_app_ui",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.music_app_ui",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/debug.keystore
--------------------------------------------------------------------------------
/music_app_ui/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/java/com/music_app_ui/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.music_app_ui;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "music_app_ui";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | music_app_ui
3 |
4 |
--------------------------------------------------------------------------------
/music_app_ui/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/music_app_ui/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "29.0.2"
6 | minSdkVersion = 16
7 | compileSdkVersion = 29
8 | targetSdkVersion = 29
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | mavenLocal()
24 | maven {
25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
26 | url("$rootDir/../node_modules/react-native/android")
27 | }
28 | maven {
29 | // Android JSC is installed from npm
30 | url("$rootDir/../node_modules/jsc-android/dist")
31 | }
32 |
33 | google()
34 | jcenter()
35 | maven { url 'https://www.jitpack.io' }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/music_app_ui/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.54.0
29 |
--------------------------------------------------------------------------------
/music_app_ui/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/music_app_ui/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/music_app_ui/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'music_app_ui'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/music_app_ui/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "music_app_ui",
3 | "displayName": "music_app_ui"
4 | }
--------------------------------------------------------------------------------
/music_app_ui/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/music_app_ui/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './src/App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/music_app_ui/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'music_app_ui' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(:path => config["reactNativePath"])
10 |
11 | target 'music_app_uiTests' do
12 | inherit! :complete
13 | # Pods for testing
14 | end
15 |
16 | # Enables Flipper.
17 | #
18 | # Note that if you have use_frameworks! enabled, Flipper will not work and
19 | # you should disable these next few lines.
20 | use_flipper!
21 | post_install do |installer|
22 | flipper_post_install(installer)
23 | end
24 | end
25 |
26 | target 'music_app_ui-tvOS' do
27 | # Pods for music_app_ui-tvOS
28 |
29 | target 'music_app_ui-tvOSTests' do
30 | inherit! :search_paths
31 | # Pods for testing
32 | end
33 | end
34 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSExceptionDomains
28 |
29 | localhost
30 |
31 | NSExceptionAllowsInsecureHTTPLoads
32 |
33 |
34 |
35 |
36 | NSLocationWhenInUseUsageDescription
37 |
38 | UILaunchStoryboardName
39 | LaunchScreen
40 | UIRequiredDeviceCapabilities
41 |
42 | armv7
43 |
44 | UISupportedInterfaceOrientations
45 |
46 | UIInterfaceOrientationPortrait
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 | UIViewControllerBasedStatusBarAppearance
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | music_app_ui
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_ui/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_uiTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/music_app_ui/ios/music_app_uiTests/music_app_uiTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface music_app_uiTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation music_app_uiTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
38 | if (level >= RCTLogLevelError) {
39 | redboxError = message;
40 | }
41 | });
42 | #endif
43 |
44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 |
48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
50 | return YES;
51 | }
52 | return NO;
53 | }];
54 | }
55 |
56 | #ifdef DEBUG
57 | RCTSetLogFunction(RCTDefaultLogFunction);
58 | #endif
59 |
60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62 | }
63 |
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/music_app_ui/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: false,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/music_app_ui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "music_app_ui",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "@react-navigation/drawer": "^5.12.3",
14 | "@react-navigation/native": "^5.9.2",
15 | "@react-navigation/stack": "^5.14.2",
16 | "react": "16.13.1",
17 | "react-native": "0.63.4",
18 | "react-native-gesture-handler": "^1.10.0",
19 | "react-native-reanimated": "^1.13.2",
20 | "react-native-safe-area-context": "^3.1.9",
21 | "react-native-screens": "^2.17.1",
22 | "react-native-snap-carousel": "^3.9.1",
23 | "react-native-svg": "^12.1.0",
24 | "react-native-vector-icons": "^8.0.0",
25 | "shortid": "^2.2.16"
26 | },
27 | "devDependencies": {
28 | "@babel/core": "^7.12.13",
29 | "@babel/runtime": "^7.12.13",
30 | "@react-native-community/eslint-config": "^2.0.0",
31 | "babel-jest": "^26.6.3",
32 | "eslint": "^7.19.0",
33 | "jest": "^26.6.3",
34 | "metro-react-native-babel-preset": "^0.65.0",
35 | "react-test-renderer": "16.13.1"
36 | },
37 | "jest": {
38 | "preset": "react-native"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/music_app_ui/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {SafeAreaView, StatusBar, StyleSheet} from 'react-native';
3 | import {NavigationContainer} from '@react-navigation/native';
4 | import {MenuProvider} from 'react-native-popup-menu';
5 | import AppStack from './navigators/Stack';
6 | import {navigationRef, isReadyRef} from './navigators/RootNavigation';
7 |
8 | const App = () => {
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | );
19 | };
20 |
21 | const styles = StyleSheet.create({
22 | areaContainer: {
23 | flex: 1,
24 | },
25 | });
26 |
27 | export default App;
28 |
--------------------------------------------------------------------------------
/music_app_ui/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/src/assets/logo.png
--------------------------------------------------------------------------------
/music_app_ui/src/assets/menu-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrincewillIroka/React-Native-UI-Templates/aba01e7aee1aa17b652de1bf008ba75a87e13e09/music_app_ui/src/assets/menu-icon.png
--------------------------------------------------------------------------------
/music_app_ui/src/components/CustomText/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text, StyleSheet} from 'react-native';
3 |
4 | export function CustomText({type, text, size, style}) {
5 | return (
6 |
10 | {text}
11 |
12 | );
13 | }
14 |
15 | const styles = StyleSheet.create({
16 | colorOne: {
17 | color: '#c3c3c6',
18 | },
19 | colorTwo: {
20 | color: '#8d8d8d',
21 | },
22 | });
23 |
--------------------------------------------------------------------------------
/music_app_ui/src/components/NavDrawerHeader/index.js:
--------------------------------------------------------------------------------
1 | import React, {useContext} from 'react';
2 | import {View, TouchableOpacity, Image, Text} from 'react-native';
3 | import Ionicons from 'react-native-vector-icons/Ionicons';
4 | import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
5 | import {
6 | Menu,
7 | MenuOptions,
8 | MenuOption,
9 | MenuTrigger,
10 | } from 'react-native-popup-menu';
11 | import styles from './navDrawerHeaderStyle';
12 | import NavIcon from '../../assets/menu-icon.png';
13 | import Logo from '../../assets/logo.png';
14 | import {getScreenParent} from '../../utils/navigationHelper';
15 | import {navigateToNestedRoute} from '../../navigators/RootNavigation';
16 |
17 | export function NavDrawerHeader({navigation}) {
18 |
19 | const handleToggleNavDrawer = () => {
20 | navigation?.openDrawer();
21 | };
22 |
23 | const handleNavigation = (route) => {
24 | navigateToNestedRoute(getScreenParent(route), route);
25 | };
26 |
27 | return (
28 |
29 | handleToggleNavDrawer()}>
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
55 |
56 |
57 | );
58 | }
59 |
--------------------------------------------------------------------------------
/music_app_ui/src/components/NavDrawerHeader/navDrawerHeaderStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | navHeader: {
5 | backgroundColor: '#222225',
6 | height: 60,
7 | padding: 16,
8 | display: 'flex',
9 | flexDirection: 'row',
10 | alignItems: 'center',
11 | },
12 | navIconImage: {
13 | height: 25,
14 | width: 25,
15 | resizeMode: 'cover',
16 | },
17 | logoContainer: {
18 | width: 107,
19 | height: 37,
20 | position: 'relative',
21 | },
22 | logoImage: {
23 | width: 120,
24 | height: 40,
25 | resizeMode: 'contain',
26 | zIndex: 1,
27 | },
28 | controlIcons: {
29 | display: 'flex',
30 | flexDirection: 'row',
31 | marginLeft: 'auto',
32 | },
33 | menuOptionText: {
34 | fontSize: 15,
35 | paddingLeft: 7,
36 | paddingBottom: 5,
37 | },
38 | });
39 |
40 | export default styles;
41 |
--------------------------------------------------------------------------------
/music_app_ui/src/components/index.js:
--------------------------------------------------------------------------------
1 | export * from './NavDrawerHeader';
2 | export * from './CustomText';
3 |
--------------------------------------------------------------------------------
/music_app_ui/src/navigators/RootNavigation.js:
--------------------------------------------------------------------------------
1 | import {createRef} from 'react';
2 |
3 | export const isReadyRef = createRef();
4 | export const navigationRef = createRef();
5 |
6 | export function navigate(parent, params) {
7 | navigationRef.current?.navigate(parent, params);
8 | }
9 |
10 | export function navigateToNestedRoute(parent, route, params) {
11 | navigationRef.current?.navigate(parent, {screen: route, params});
12 | }
13 |
14 | export function goBack() {
15 | navigationRef.current?.goBack();
16 | }
17 |
--------------------------------------------------------------------------------
/music_app_ui/src/navigators/Stack.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {Text} from 'react-native';
3 | import {createDrawerNavigator} from '@react-navigation/drawer';
4 | import {createStackNavigator} from '@react-navigation/stack';
5 | import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
6 | import {Upload, Track} from '../screens';
7 |
8 | const Stack = createStackNavigator();
9 | const Drawer = createDrawerNavigator();
10 |
11 | const DrawerStack = () => {
12 | return (
13 |
19 | (
24 | Upload
25 | ),
26 | drawerIcon: ({focused, size}) => (
27 |
32 | ),
33 | }}
34 | />
35 |
36 | );
37 | };
38 |
39 | const SingleStack = () => {
40 | return (
41 |
42 |
47 |
48 | );
49 | };
50 |
51 | function AppStack() {
52 | return (
53 |
54 |
59 |
64 |
65 | );
66 | }
67 |
68 | export default AppStack;
69 |
--------------------------------------------------------------------------------
/music_app_ui/src/screens/Track/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, Text, Button} from 'react-native';
3 | import {CustomText} from '../../components';
4 |
5 | export function Track() {
6 | return Hello;
7 | }
8 |
--------------------------------------------------------------------------------
/music_app_ui/src/screens/Upload/index.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import {View, TouchableOpacity, ScrollView} from 'react-native';
3 | import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
4 | import styles from './uploadStyle.js';
5 | import {CustomText} from '../../components';
6 | import {NavDrawerHeader} from '../../components';
7 |
8 | export function Upload({navigation}) {
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
33 |
34 |
35 |
36 |
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/music_app_ui/src/screens/Upload/uploadStyle.js:
--------------------------------------------------------------------------------
1 | import {StyleSheet} from 'react-native';
2 |
3 | const styles = StyleSheet.create({
4 | uploadContainer: {
5 | flex: 1,
6 | backgroundColor: '#000',
7 | },
8 | scrollViewContent: {
9 | height: '100%',
10 | padding: 16,
11 | },
12 | uploadContent: {
13 | marginBottom: 50,
14 | padding: 16,
15 | },
16 | layoutContent: {
17 | display: 'flex',
18 | },
19 | uploadSingleSongText: {
20 | fontSize: 20,
21 | },
22 | iconWrapper: {
23 | backgroundColor: '#00bcd4',
24 | height: 70,
25 | width: 70,
26 | borderRadius: 50,
27 | display: 'flex',
28 | justifyContent: 'center',
29 | alignItems: 'center',
30 | marginBottom: 40,
31 | },
32 | singleCard: {
33 | display: 'flex',
34 | justifyContent: 'center',
35 | alignItems: 'center',
36 | backgroundColor: '#222225',
37 | height: 280,
38 | marginTop: 40,
39 | borderRadius: 5,
40 | },
41 | });
42 |
43 | export default styles;
44 |
--------------------------------------------------------------------------------
/music_app_ui/src/screens/index.js:
--------------------------------------------------------------------------------
1 | export * from './Upload';
2 | export * from './Track';
3 |
--------------------------------------------------------------------------------
/music_app_ui/src/utils/navigationHelper.js:
--------------------------------------------------------------------------------
1 | export const getScreenParent = (route) => {
2 | let parent;
3 | let isDrawerStack =
4 | route === 'Discover' ||
5 | route === 'LatestMusic' ||
6 | route === 'TopMusic' ||
7 | route === 'Spotlight' ||
8 | route === 'Genres' ||
9 | route === 'Playlists' ||
10 | route === 'Browse' ||
11 | route === 'Purchased' ||
12 | route === 'RecentlyPlayed' ||
13 | route === 'MyPlaylists' ||
14 | route === 'Favourites' ||
15 | route === 'GetCredit' ||
16 | route === 'BecomeAnArtist' ||
17 | route === 'Upload';
18 |
19 | let isSingleStack =
20 | route === 'Login' ||
21 | route === 'SignUp' ||
22 | route === 'MySongs' ||
23 | route === 'MyAlbums';
24 |
25 | if (isDrawerStack) {
26 | parent = 'DrawerStack';
27 | } else if (isSingleStack) {
28 | parent = 'SingleStack';
29 | }
30 | return parent;
31 | };
32 |
--------------------------------------------------------------------------------