├── .watchmanconfig ├── src ├── redux │ ├── sagas │ │ ├── cart.js │ │ ├── index.js │ │ └── products.js │ ├── docks │ │ ├── index.js │ │ ├── cart.js │ │ └── products.js │ └── store.js ├── screens │ ├── checkout │ │ ├── styled.js │ │ └── index.js │ ├── signIn │ │ ├── components │ │ │ └── signInForm │ │ │ │ ├── styled.js │ │ │ │ └── index.js │ │ ├── styled.js │ │ └── index.js │ ├── signUp │ │ ├── components │ │ │ └── signUpForm │ │ │ │ ├── styled.js │ │ │ │ └── index.js │ │ ├── styled.js │ │ └── index.js │ ├── productDetail │ │ ├── components │ │ │ ├── productImage │ │ │ │ ├── index.js │ │ │ │ └── styled.js │ │ │ └── productInfo │ │ │ │ ├── styled.js │ │ │ │ └── index.js │ │ ├── styled.js │ │ └── index.js │ ├── menu │ │ ├── styled.js │ │ └── index.js │ ├── storyComponents │ │ ├── index.js │ │ └── styled.js │ ├── products │ │ ├── styled.js │ │ ├── components │ │ │ ├── listProducts │ │ │ │ ├── styled.js │ │ │ │ └── index.js │ │ │ └── orderProducts │ │ │ │ ├── styled.js │ │ │ │ └── index.js │ │ └── index.js │ ├── authLoading │ │ ├── styled.js │ │ └── index.js │ ├── home │ │ ├── styled.js │ │ └── index.js │ ├── trackOrder │ │ ├── index.js │ │ ├── components │ │ │ └── orderList │ │ │ │ ├── styled.js │ │ │ │ └── index.js │ │ └── styled.js │ └── cart │ │ ├── styled.js │ │ └── index.js ├── utils │ ├── test-utils.js │ ├── images.js │ ├── httpClient.js │ └── index.js ├── assets │ ├── images │ │ ├── logo.png │ │ ├── home-bg.png │ │ ├── logo@2x.png │ │ ├── home-bg@2x.png │ │ ├── home-bg@3x.png │ │ ├── product01.png │ │ ├── product02.png │ │ ├── product01@2x.png │ │ ├── product02@2x.png │ │ ├── productThumb01.png │ │ ├── productThumb02.png │ │ ├── productThumb@2x.png │ │ └── productThumb02@2x.png │ └── fonts │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-Thin.ttf │ │ ├── Roboto-Black.ttf │ │ ├── Roboto-Italic.ttf │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-Regular.ttf │ │ ├── Roboto-BlackItalic.ttf │ │ ├── Roboto-BoldItalic.ttf │ │ ├── Roboto-LightItalic.ttf │ │ ├── Roboto-ThinItalic.ttf │ │ └── Roboto-MediumItalic.ttf ├── components │ ├── headers │ │ ├── index.js │ │ ├── headerModal │ │ │ ├── styled.js │ │ │ └── index.js │ │ └── headerDefault │ │ │ ├── styled.js │ │ │ └── index.js │ ├── loading │ │ ├── index.js │ │ └── styled.js │ ├── card │ │ ├── index.js │ │ └── styled.js │ ├── productItem │ │ ├── index.js │ │ └── styled.js │ ├── button │ │ ├── index.js │ │ └── styled.js │ └── textField │ │ ├── styled.js │ │ └── index.js ├── navigation │ ├── index.js │ ├── navigationService.js │ ├── optionsRouter.js │ └── createRoutes.js ├── styles │ ├── common.js │ ├── fonts.js │ ├── variables.js │ ├── theme.js │ └── typography.js ├── services │ ├── authService.js │ └── productService.js ├── index.js ├── __tests__ │ ├── __snapshots__ │ │ └── App-test.js.snap │ └── App-test.js └── fake-data │ └── index.js ├── .gitattributes ├── app.json ├── .vscode └── settings.json ├── babel.config.js ├── storybook ├── addons.js ├── rn-addons.js ├── index.js └── stories │ └── index.js ├── .prettierrc.js ├── android ├── app │ ├── debug.keystore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-ldpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-land │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── icon.png │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-land-hdpi │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-land-ldpi │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-land-mdpi │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-land-xhdpi │ │ │ │ │ └── screen.png │ │ │ │ ├── drawable-land-xxhdpi │ │ │ │ │ └── screen.png │ │ │ │ └── drawable-land-xxxhdpi │ │ │ │ │ └── screen.png │ │ │ ├── assets │ │ │ │ └── fonts │ │ │ │ │ ├── Entypo.ttf │ │ │ │ │ ├── Zocial.ttf │ │ │ │ │ ├── AntDesign.ttf │ │ │ │ │ ├── EvilIcons.ttf │ │ │ │ │ ├── Feather.ttf │ │ │ │ │ ├── Fontisto.ttf │ │ │ │ │ ├── Ionicons.ttf │ │ │ │ │ ├── Octicons.ttf │ │ │ │ │ ├── FontAwesome.ttf │ │ │ │ │ ├── Foundation.ttf │ │ │ │ │ ├── Roboto-Bold.ttf │ │ │ │ │ ├── Roboto-Thin.ttf │ │ │ │ │ ├── MaterialIcons.ttf │ │ │ │ │ ├── Roboto-Black.ttf │ │ │ │ │ ├── Roboto-Italic.ttf │ │ │ │ │ ├── Roboto-Light.ttf │ │ │ │ │ ├── Roboto-Medium.ttf │ │ │ │ │ ├── Roboto-Regular.ttf │ │ │ │ │ ├── SimpleLineIcons.ttf │ │ │ │ │ ├── FontAwesome5_Brands.ttf │ │ │ │ │ ├── FontAwesome5_Solid.ttf │ │ │ │ │ ├── Roboto-BlackItalic.ttf │ │ │ │ │ ├── Roboto-BoldItalic.ttf │ │ │ │ │ ├── Roboto-LightItalic.ttf │ │ │ │ │ ├── Roboto-MediumItalic.ttf │ │ │ │ │ ├── Roboto-ThinItalic.ttf │ │ │ │ │ ├── FontAwesome5_Regular.ttf │ │ │ │ │ └── MaterialCommunityIcons.ttf │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── protain │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ └── AndroidManifest.xml │ ├── proguard-rules.pro │ ├── build_defs.bzl │ ├── BUCK │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── ios ├── protain │ ├── Images.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── AppDelegate.m │ ├── Info.plist │ └── Base.lproj │ │ └── LaunchScreen.xib ├── protain.xcworkspace │ └── contents.xcworkspacedata ├── protainTests │ ├── Info.plist │ └── protainTests.m ├── protain-tvOSTests │ └── Info.plist ├── protain-tvOS │ └── Info.plist ├── Podfile ├── protain.xcodeproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── protain.xcscheme │ │ └── protain-tvOS.xcscheme └── Podfile.lock ├── .buckconfig ├── .editorconfig ├── react-native.config.js ├── index.js ├── .eslintrc.js ├── metro.config.js ├── jest.config.js ├── .github └── workflows │ └── node.js.yml ├── .gitignore ├── .flowconfig ├── README.MD └── package.json /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /src/redux/sagas/cart.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/screens/checkout/styled.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /src/utils/test-utils.js: -------------------------------------------------------------------------------- 1 | console.log('utils') 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "protain", 3 | "displayName": "protain" 4 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "interactive" 3 | } 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | } 4 | -------------------------------------------------------------------------------- /storybook/addons.js: -------------------------------------------------------------------------------- 1 | import '@storybook/addon-actions/register' 2 | import '@storybook/addon-knobs/register' 3 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | singleQuote: true, 3 | semi: false, 4 | trailingComma: 'all', 5 | } 6 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/debug.keystore -------------------------------------------------------------------------------- /ios/protain/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/logo.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Protain Full 3 | 4 | -------------------------------------------------------------------------------- /src/assets/images/home-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/home-bg.png -------------------------------------------------------------------------------- /src/assets/images/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/logo@2x.png -------------------------------------------------------------------------------- /storybook/rn-addons.js: -------------------------------------------------------------------------------- 1 | import '@storybook/addon-ondevice-knobs/register' 2 | import '@storybook/addon-ondevice-notes/register' 3 | -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /src/assets/images/home-bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/home-bg@2x.png -------------------------------------------------------------------------------- /src/assets/images/home-bg@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/home-bg@3x.png -------------------------------------------------------------------------------- /src/assets/images/product01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/product01.png -------------------------------------------------------------------------------- /src/assets/images/product02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/product02.png -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/assets/images/product01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/product01@2x.png -------------------------------------------------------------------------------- /src/assets/images/product02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/product02@2x.png -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/assets/images/productThumb01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/productThumb01.png -------------------------------------------------------------------------------- /src/assets/images/productThumb02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/productThumb02.png -------------------------------------------------------------------------------- /src/assets/images/productThumb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/productThumb@2x.png -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/assets/images/productThumb02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/images/productThumb02@2x.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable/icon.png -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/assets/fonts/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/src/assets/fonts/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable/screen.png -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/AntDesign.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/AntDesign.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Fontisto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Fontisto.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = false 8 | insert_final_newline = false -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-hdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-ldpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-mdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /src/components/headers/index.js: -------------------------------------------------------------------------------- 1 | import HeaderDefault from './headerDefault' 2 | import HeaderModal from './headerModal' 3 | 4 | export { HeaderDefault, HeaderModal } 5 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Black.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Italic.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-xhdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-xxhdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-xxxhdpi/screen.png -------------------------------------------------------------------------------- /src/navigation/index.js: -------------------------------------------------------------------------------- 1 | import CreateRoutes from './createRoutes' 2 | import NavigationService from './navigationService' 3 | 4 | export { CreateRoutes, NavigationService } 5 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land-hdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land-ldpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land-mdpi/screen.png -------------------------------------------------------------------------------- /react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | project: { 3 | ios: {}, 4 | android: {}, // grouped into "project" 5 | }, 6 | assets: ['./src/assets/fonts/'], 7 | } 8 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land-xhdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land-xxhdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-land-xxxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/res/drawable-land-xxxhdpi/screen.png -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noel319/react-native-ecommerce-project/HEAD/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'protain' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /src/redux/docks/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux' 2 | 3 | import cart from './cart' 4 | import products from './products' 5 | 6 | export default combineReducers({ 7 | cart, 8 | products, 9 | }) 10 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import { AppRegistry } from 'react-native' 6 | import App from './src' 7 | import { name as appName } from './app.json' 8 | 9 | AppRegistry.registerComponent(appName, () => App) 10 | -------------------------------------------------------------------------------- /src/redux/sagas/index.js: -------------------------------------------------------------------------------- 1 | import { all, fork } from 'redux-saga/effects' 2 | 3 | import { watchGetProducts, getAllProducts } from './products' 4 | 5 | export default function* rootSaga() { 6 | yield all([fork(getAllProducts), fork(watchGetProducts)]) 7 | } 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/screens/signIn/components/signInForm/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | export const ViewButton = styled.View` 4 | margin-top: ${props => props.theme.metrics.spacing(2)}; 5 | margin-bottom: ${props => props.theme.metrics.spacing(2)}; 6 | ` 7 | -------------------------------------------------------------------------------- /src/screens/signUp/components/signUpForm/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | export const ViewButton = styled.View` 4 | margin-top: ${props => props.theme.metrics.spacing(2)}; 5 | margin-bottom: ${props => props.theme.metrics.spacing(2)}; 6 | ` 7 | -------------------------------------------------------------------------------- /src/screens/checkout/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { SafeAreaView, Text } from 'react-native' 3 | 4 | const Checkout = () => { 5 | return ( 6 | 7 | Checkout 8 | 9 | ) 10 | } 11 | 12 | export default Checkout 13 | -------------------------------------------------------------------------------- /ios/protain.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/screens/productDetail/components/productImage/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import * as S from './styled' 4 | 5 | const ProductImage = ({ sourceImg }) => { 6 | return ( 7 | 8 | 9 | 10 | ) 11 | } 12 | 13 | export default ProductImage 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['@react-native-community'], 4 | rules: { 5 | 'prettier/prettier': ['error'], 6 | semi: ['error', 'never'], 7 | 'global-require': 'off', 8 | 'no-console': 'off', 9 | 'import/prefer-default-export': 'off', 10 | 'import/no-unresolved': 0, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/utils/images.js: -------------------------------------------------------------------------------- 1 | export default { 2 | homeBg: require('../assets/images/home-bg.png'), 3 | logo: require('../assets/images/logo.png'), 4 | productImg01: require('../assets/images/product01.png'), 5 | productImg02: require('../assets/images/product02.png'), 6 | productThumbImg01: require('../assets/images/productThumb01.png'), 7 | productThumbImg02: require('../assets/images/productThumb02.png'), 8 | } 9 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/screens/productDetail/components/productImage/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | export const ProductImage = styled.View` 4 | padding: ${props => props.theme.metrics.spacing(3)}; 5 | background-color: ${props => props.theme.WHITE}; 6 | align-items: center; 7 | justify-content: center; 8 | ` 9 | 10 | export const Image = styled.Image` 11 | width: 172px; 12 | height: 212px; 13 | ` 14 | -------------------------------------------------------------------------------- /src/redux/store.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from 'redux' 2 | import createSagaMiddleware from 'redux-saga' 3 | 4 | import reducers from './docks' 5 | import sagas from './sagas' 6 | 7 | const sagaMiddleware = createSagaMiddleware() 8 | const middlewares = [sagaMiddleware] 9 | 10 | const store = createStore(reducers, applyMiddleware(...middlewares)) 11 | 12 | sagaMiddleware.run(sagas) 13 | 14 | export default store 15 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/protain/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.protain; 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 "protain"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | const ignores = ['/node_modules/', '/__tests__/helpers/', '__mocks__'] 2 | 3 | module.exports = { 4 | moduleDirectories: ['node_modules', 'utils', __dirname], 5 | preset: '@testing-library/react-native', 6 | setupFilesAfterEnv: ['@testing-library/react-native/cleanup-after-each'], 7 | collectCoverageFrom: ['src/**/*.+(js|jsx|ts|tsx)'], 8 | testMatch: ['**/__tests__/**/*.+(js|jsx|ts|tsx)'], 9 | testPathIgnorePatterns: [...ignores], 10 | } 11 | -------------------------------------------------------------------------------- /ios/protain/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/protain/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/styles/common.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import {} from './fonts' 4 | 5 | export const Container = styled.SafeAreaView` 6 | flex: 1; 7 | padding: ${props => props.theme.metrics.spacing(2)}; 8 | background-color: ${props => 9 | (props.bgColor === 'primary' && props.theme.PRIMARY_BACKGROUND_COLOR) || 10 | (props.bgColor === 'secondary' && props.theme.SECONDARY_BACKGROUND_COLOR) || 11 | (!props.bgColor && props.theme.WHITE)}; 12 | ` 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/services/authService.js: -------------------------------------------------------------------------------- 1 | import httpClient from '../utils/httpClient' 2 | 3 | class AuthService { 4 | static login({ email, password }) { 5 | const data = { 6 | email, 7 | password, 8 | } 9 | return httpClient.post('/api/login', data) 10 | } 11 | 12 | static register({ email, password }) { 13 | const data = { 14 | email, 15 | password, 16 | } 17 | return httpClient.post('/api/register', data) 18 | } 19 | } 20 | 21 | export default AuthService 22 | -------------------------------------------------------------------------------- /src/components/loading/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import PropTypes from 'prop-types' 3 | 4 | import * as S from './styled' 5 | 6 | const Loading = ({ title }) => { 7 | return ( 8 | 9 | 10 | {title && {title}} 11 | 12 | ) 13 | } 14 | 15 | Loading.defaultProps = { 16 | title: 'Aguarde...', 17 | } 18 | 19 | Loading.propTypes = { 20 | title: PropTypes.string, 21 | } 22 | 23 | export default Loading 24 | -------------------------------------------------------------------------------- /src/components/card/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import PropTypes from 'prop-types' 3 | 4 | import * as S from './styled' 5 | 6 | export const { CardHeader, CardBody, CardFooter } = S 7 | 8 | const Card = ({ children, variant }) => ( 9 | {children} 10 | ) 11 | 12 | Card.defaultProps = { 13 | children: null, 14 | variant: null, 15 | } 16 | 17 | Card.propTypes = { 18 | children: PropTypes.node, 19 | variant: PropTypes.string, 20 | } 21 | export default Card 22 | -------------------------------------------------------------------------------- /src/styles/fonts.js: -------------------------------------------------------------------------------- 1 | export const fontSize = { 2 | small: 12, 3 | regular: 14, 4 | normal: 16, 5 | extra: 18, 6 | medium: 20, 7 | big: 26, 8 | } 9 | 10 | export const fontFamily = { 11 | RobotoThin: 'Roboto-Thin', 12 | RobotoRegular: 'Roboto-Regular', 13 | RobotoLight: 'Roboto-Light', 14 | RobotoMedium: 'Roboto-Medium', 15 | RobotoBold: 'Roboto-Bold', 16 | } 17 | 18 | export const fontWeight = { 19 | thin: 100, 20 | light: 300, 21 | regular: 400, 22 | medium: 500, 23 | bold: 700, 24 | } 25 | -------------------------------------------------------------------------------- /src/styles/variables.js: -------------------------------------------------------------------------------- 1 | export const Colors = { 2 | WHITE: '#fff', 3 | GREY: '#BCBBBB', 4 | GREY_DARK: '#707070', 5 | GREEN: '#C6ED3E', 6 | PRIMARY_BACKGROUND_COLOR: '#F8F8F8', 7 | SECONDARY_BACKGROUND_COLOR: '#2F2F2F', 8 | TERTIARY_BACKGROUND_COLOR: '#FBF9F7', 9 | PRIMARY_TEXT_COLOR: '#000000', 10 | SECONDARY_TEXT_COLOR: '#FFFFFF', 11 | PRIMARY_BUTTON_COLOR: '#C6ED3E', 12 | SECONDARY_BUTTON_COLOR: '#FFFFFF', 13 | SHADOW_COLOR: 'rgba(0,0,0, 0.20)', 14 | ERROR: '#f55050', 15 | INACTIVE: '#878EA0', 16 | SUCCESS: '#44bd13', 17 | } 18 | -------------------------------------------------------------------------------- /src/components/headers/headerModal/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | export const HeaderModal = styled.View` 4 | padding-top: ${props => props.theme.metrics.spacing(1)}; 5 | padding-right: ${props => props.theme.metrics.spacing(0.8)}; 6 | padding-left: ${props => props.theme.metrics.spacing(0.8)}; 7 | padding-bottom: ${props => props.theme.metrics.spacing(1)}; 8 | align-items: flex-end; 9 | ` 10 | export const TouchableOpacity = styled.TouchableOpacity` 11 | padding: ${props => props.theme.metrics.spacing(0.5)}; 12 | ` 13 | -------------------------------------------------------------------------------- /src/components/headers/headerDefault/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | export const HeaderDefault = styled.View` 4 | padding-top: ${props => props.theme.metrics.spacing(1)}; 5 | padding-right: ${props => props.theme.metrics.spacing(0.8)}; 6 | padding-left: ${props => props.theme.metrics.spacing(0.8)}; 7 | padding-bottom: ${props => props.theme.metrics.spacing(1)}; 8 | align-items: flex-start; 9 | ` 10 | export const TouchableOpacity = styled.TouchableOpacity` 11 | padding: ${props => props.theme.metrics.spacing(0.5)}; 12 | ` 13 | -------------------------------------------------------------------------------- /src/navigation/navigationService.js: -------------------------------------------------------------------------------- 1 | import { NavigationActions } from 'react-navigation' 2 | 3 | let navigator 4 | 5 | function setTopLevelNavigator(navigatorRef) { 6 | navigator = navigatorRef 7 | } 8 | 9 | function navigate(routeName, params) { 10 | navigator.dispatch( 11 | NavigationActions.navigate({ 12 | routeName, 13 | params, 14 | }), 15 | ) 16 | } 17 | 18 | function goBack() { 19 | navigator.dispatch(NavigationActions.back()) 20 | } 21 | 22 | export default { 23 | navigate, 24 | setTopLevelNavigator, 25 | goBack, 26 | } 27 | -------------------------------------------------------------------------------- /src/components/card/styled.js: -------------------------------------------------------------------------------- 1 | import styled, { css } from 'styled-components/native' 2 | 3 | const cardStyled = css` 4 | padding: ${props => props.theme.metrics.spacing(2)}; 5 | ` 6 | 7 | export const Card = styled.View` 8 | background-color: ${props => 9 | props.variant === 'dark' ? props.theme.GREY_DARK : props.theme.WHITE}; 10 | ` 11 | 12 | export const CardHeader = styled.View` 13 | ${cardStyled} 14 | ` 15 | 16 | export const CardBody = styled.View` 17 | ${cardStyled} 18 | ` 19 | 20 | export const CardFooter = styled.View` 21 | ${cardStyled} 22 | ` 23 | -------------------------------------------------------------------------------- /src/screens/menu/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { TextMediumExtra, TextRegular } from '../../styles/typography' 4 | 5 | export const MenuTitleSection = styled.Text` 6 | background-color: ${props => props.theme.TERTIARY_BACKGROUND_COLOR}; 7 | padding: ${props => props.theme.metrics.spacing(1.5)}; 8 | ${TextMediumExtra}; 9 | ` 10 | export const MenuItemTouch = styled.TouchableOpacity` 11 | padding: ${props => props.theme.metrics.spacing(1.5)}; 12 | ` 13 | 14 | export const MenuItemText = styled.Text` 15 | ${TextRegular}; 16 | ` 17 | -------------------------------------------------------------------------------- /src/screens/storyComponents/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import { HeaderModal } from '../../components/headers' 4 | import StorybookUI from '../../../storybook' 5 | 6 | import * as S from './styled' 7 | 8 | const StoryComponents = () => { 9 | return ( 10 | 11 | 12 | 13 | Storybook Components 14 | Story this Ecommerce 15 | 16 | 17 | 18 | ) 19 | } 20 | 21 | export default StoryComponents 22 | -------------------------------------------------------------------------------- /src/components/headers/headerModal/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { TouchableOpacity } from 'react-native' 3 | import Icon from 'react-native-vector-icons/MaterialCommunityIcons' 4 | 5 | import { NavigationService } from '../../../navigation' 6 | import * as S from './styled' 7 | 8 | const HeaderModal = () => ( 9 | 10 | { 12 | NavigationService.goBack() 13 | }} 14 | > 15 | 16 | 17 | 18 | ) 19 | 20 | export default HeaderModal 21 | -------------------------------------------------------------------------------- /src/components/loading/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { TextRegular } from '../../styles/typography' 4 | import { Colors } from '../../styles/variables' 5 | 6 | export const Loading = styled.View` 7 | margin: ${props => props.theme.metrics.spacing(2)}; 8 | justify-content: center; 9 | align-items: center; 10 | flex: 1; 11 | ` 12 | 13 | export const ActivityIndicator = styled.ActivityIndicator.attrs({ 14 | size: 'large', 15 | color: Colors.GREEN, 16 | })`` 17 | 18 | export const Title = styled.Text` 19 | color: ${({ theme }) => theme.SECONDARY_TEXT_COLOR}; 20 | ${TextRegular}; 21 | ` 22 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Provider } from 'react-redux' 3 | import { ThemeProvider } from 'styled-components' 4 | 5 | import { CreateRoutes } from './navigation' 6 | import { darkTheme } from './styles/theme' 7 | import { NavigationService } from './navigation' 8 | import store from './redux/store' 9 | 10 | const App = () => ( 11 | 12 | 13 | { 15 | NavigationService.setTopLevelNavigator(navigationRef) 16 | }} 17 | /> 18 | 19 | 20 | ) 21 | 22 | export default App 23 | -------------------------------------------------------------------------------- /src/screens/productDetail/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { TextSmallRegular, TextMediumBold } from '../../styles/typography' 4 | 5 | export const ProductDetail = styled.SafeAreaView` 6 | flex: 1; 7 | ` 8 | 9 | export const ProductContentBuy = styled.SafeAreaView` 10 | flex-direction: row; 11 | align-items: center; 12 | justify-content: space-between; 13 | ` 14 | 15 | export const ProductTagText = styled.Text` 16 | ${TextSmallRegular}; 17 | color: ${props => props.theme.WHITE}; 18 | ` 19 | 20 | export const ProductPrice = styled.Text` 21 | ${TextMediumBold}; 22 | color: ${props => props.theme.GREEN}; 23 | ` 24 | -------------------------------------------------------------------------------- /src/redux/sagas/products.js: -------------------------------------------------------------------------------- 1 | import { call, put, takeLatest } from 'redux-saga/effects' 2 | 3 | import { receiveProducts } from '../docks/products' 4 | import productService from '../../services/productService' 5 | 6 | import { Types as TypesProducts } from '../docks/products' 7 | 8 | export function* getAllProducts(action) { 9 | const { type, search } = action ? action.payload : { search: '', type: '' } 10 | const response = yield call(productService.listProducts, { 11 | type, 12 | search, 13 | }) 14 | yield put(receiveProducts(response.data)) 15 | } 16 | 17 | export function* watchGetProducts() { 18 | yield takeLatest(TypesProducts.GET_ALL, getAllProducts) 19 | } 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/screens/products/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { Title as TitleStyle } from '../../styles/typography' 4 | 5 | export const Title = styled.Text` 6 | ${TitleStyle}; 7 | margin-bottom: ${props => props.theme.metrics.spacing()}; 8 | ` 9 | 10 | export const Container = styled.SafeAreaView` 11 | flex: 1; 12 | background-color: ${props => props.theme.WHITE}; 13 | ` 14 | 15 | export const Header = styled.View` 16 | margin-top: ${props => props.theme.metrics.spacing(2)}; 17 | margin-bottom: ${props => props.theme.metrics.spacing(1.5)}; 18 | padding: ${props => props.theme.metrics.spacing()}; 19 | ` 20 | 21 | export const listProduct = { 22 | marginVertical: 15, 23 | } 24 | -------------------------------------------------------------------------------- /src/screens/productDetail/components/productInfo/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { 4 | TextMedium, 5 | TextRegular, 6 | TextRegularMedium, 7 | } from '../../../../styles/typography' 8 | 9 | export const ProductInfo = styled.View` 10 | padding: ${props => props.theme.metrics.spacing(1.5)}; 11 | flex: 1; 12 | ` 13 | 14 | export const ProductName = styled.Text` 15 | ${TextMedium}; 16 | margin-bottom: ${props => props.theme.metrics.spacing(2)}; 17 | ` 18 | export const Subtitle = styled.Text` 19 | ${TextRegularMedium}; 20 | margin-bottom: ${props => props.theme.metrics.spacing(0.5)}; 21 | ` 22 | 23 | export const ProductDescription = styled.Text` 24 | ${TextRegular}; 25 | ` 26 | -------------------------------------------------------------------------------- /src/utils/httpClient.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import AsyncStorage from '@react-native-community/async-storage' 3 | 4 | const axiosInstace = axios.create({ 5 | baseURL: 'https://reqres.in', 6 | }) 7 | 8 | axiosInstace.interceptors.request.use( 9 | async config => { 10 | const token = await AsyncStorage.getItem('userToken') 11 | 12 | if (token) { 13 | config.headers.Authorization = token 14 | } 15 | 16 | return Promise.resolve(config) 17 | }, 18 | error => Promise.reject(error), 19 | ) 20 | 21 | axiosInstace.interceptors.response.use( 22 | async response => response, 23 | error => Promise.reject(error), 24 | ) 25 | 26 | const httpClient = axiosInstace 27 | 28 | export default httpClient 29 | -------------------------------------------------------------------------------- /src/screens/authLoading/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { TextRegular } from '../../styles/typography' 4 | import { Colors } from '../../styles/variables' 5 | 6 | export const Container = styled.View` 7 | flex: 1; 8 | width: 100%; 9 | padding: ${props => props.theme.metrics.spacing(0.5)}; 10 | justify-content: center; 11 | align-items: center; 12 | background-color: ${props => props.theme.SECONDARY_BACKGROUND_COLOR}; 13 | ` 14 | export const ActivityIndicator = styled.ActivityIndicator.attrs({ 15 | size: 'large', 16 | color: Colors.GREEN, 17 | })`` 18 | 19 | export const Title = styled.Text` 20 | color: ${({ theme }) => theme.SECONDARY_TEXT_COLOR}; 21 | ${TextRegular}; 22 | ` 23 | -------------------------------------------------------------------------------- /src/screens/productDetail/components/productInfo/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import * as S from './styled' 4 | 5 | const ProductInfo = ({ info }) => { 6 | return ( 7 | 8 | {/* (HOT) Termogênico 60 comprimidos */} 9 | {info.name} 10 | Detalhes 11 | {info.details.description} 12 | {/* 13 | Funciona da seguinte forma, o seu organismo já possui naturalmente uma 14 | necessidade por calorias. 15 | */} 16 | 17 | ) 18 | } 19 | 20 | export default ProductInfo 21 | -------------------------------------------------------------------------------- /src/utils/index.js: -------------------------------------------------------------------------------- 1 | import httpClient from './httpClient' 2 | import images from './images' 3 | 4 | export function IDGenerator() { 5 | this.length = 8 6 | this.timestamp = +new Date() 7 | 8 | var _getRandomInt = function(min, max) { 9 | return Math.floor(Math.random() * (max - min + 1)) + min 10 | } 11 | 12 | this.generate = function() { 13 | var ts = this.timestamp.toString() 14 | var parts = ts.split('').reverse() 15 | var id = '' 16 | 17 | for (var i = 0; i < this.length; ++i) { 18 | var index = _getRandomInt(0, parts.length - 1) 19 | id += parts[index] 20 | } 21 | 22 | return id 23 | } 24 | } 25 | 26 | export const delay = (ms = 1000) => new Promise(res => setTimeout(res, ms)) 27 | 28 | export { httpClient, images } 29 | -------------------------------------------------------------------------------- /ios/protain/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 | } -------------------------------------------------------------------------------- /src/screens/home/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | import { Dimensions } from 'react-native' 3 | 4 | import { TextMediumExtra } from '../../styles/typography' 5 | 6 | const { width, height } = Dimensions.get('window') 7 | 8 | export const Home = styled.ImageBackground` 9 | width: ${width}; 10 | height: ${height}; 11 | ` 12 | 13 | export const Logo = styled.Image` 14 | width: 134px; 15 | height: 106px; 16 | ` 17 | 18 | export const Content = styled.View` 19 | padding: ${props => props.theme.metrics.spacing(2.5)}; 20 | flex: 1; 21 | justify-content: space-around; 22 | align-items: center; 23 | background-color: ${props => props.theme.SHADOW_COLOR}; 24 | ` 25 | 26 | export const Description = styled.Text` 27 | color: ${props => props.theme.WHITE}; 28 | ${TextMediumExtra}; 29 | ` 30 | -------------------------------------------------------------------------------- /src/screens/products/components/listProducts/styled.js: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components/native' 2 | 3 | import { SubTitle as SubTitleStyle } from '../../../../styles/typography' 4 | 5 | export const SubTitle = styled.Text` 6 | ${SubTitleStyle}; 7 | padding: ${props => props.theme.metrics.spacing(1.2)}; 8 | ` 9 | 10 | export const Header = styled.View` 11 | margin-top: ${props => props.theme.metrics.spacing(2)}; 12 | margin-bottom: ${props => props.theme.metrics.spacing(1.5)}; 13 | padding: ${props => props.theme.metrics.spacing()}; 14 | ` 15 | 16 | export const LoadingIndicator = styled.ActivityIndicator` 17 | align-self: center; 18 | margin-top: ${props => props.theme.metrics.spacing(2)}; 19 | margin-bottom: ${props => props.theme.metrics.spacing(2)}; 20 | ` 21 | 22 | export const listProduct = { 23 | marginTop: 15, 24 | } 25 | -------------------------------------------------------------------------------- /ios/protainTests/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 | -------------------------------------------------------------------------------- /storybook/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native' 2 | import { getStorybookUI, configure } from '@storybook/react-native' 3 | 4 | import './rn-addons' 5 | 6 | // import stories 7 | configure(() => { 8 | require('./stories') 9 | }, module) 10 | 11 | // Refer to https://github.com/storybookjs/storybook/tree/master/app/react-native#start-command-parameters 12 | // To find allowed options for getStorybookUI 13 | const StorybookUIRoot = getStorybookUI({ 14 | asyncStorage: 15 | require('@react-native-community/async-storage').AsyncStorage || 16 | require('react-native').AsyncStorage || 17 | null, 18 | }) 19 | 20 | // If you are using React Native vanilla write your app name here. 21 | // If you use Expo you can safely remove this line. 22 | AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot) 23 | 24 | export default StorybookUIRoot 25 | -------------------------------------------------------------------------------- /ios/protain-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/App-test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`examples of some things 1`] = ` 4 | 12 | 21 | 22 | 29 |