├── .expo-shared └── assets.json ├── .gitignore ├── App.js ├── app.json ├── assets ├── icon.png └── splash.png ├── babel.config.js ├── package-lock.json ├── package.json └── src ├── api └── WebService.js ├── components ├── Buttons │ ├── AddRemoveButton.js │ └── AppButton.js ├── Cards │ ├── CartItem.js │ ├── FoodCard.js │ ├── OfferCard.js │ ├── OrderCard.js │ └── Restaurant.js ├── CategoryItem.js ├── FoodCartMedium.js ├── InputFields │ ├── SearchBar.js │ └── UserLogin.js ├── Listview │ ├── CartListView.js │ ├── OrderListView.js │ └── ProductListView.js ├── Overlay.js └── TopCategoryList.js ├── dataStore ├── createAppContext.js ├── reducer.js └── userAccessContext.js ├── images ├── account_icon.png ├── account_n_icon.png ├── arrow_icon.png ├── back_arrow.png ├── best_restaurent_1.jpg ├── best_restaurent_2.jpg ├── burger.jpg ├── burger_icon.jpg ├── cart_icon.png ├── cart_n_icon.png ├── coffee.jpeg ├── cusin_1.jpg ├── cusin_2.jpg ├── cusin_3.jpg ├── hambar.png ├── home.png ├── home_focused.png ├── home_icon.png ├── home_n_icon.png ├── lunch.jpg ├── offer.jpg ├── offer_icon.png ├── offer_n_icon.png ├── orders.png ├── pizza.jpg ├── search.png └── starIcon.png ├── screens ├── AuthCheckScreen.js ├── foods │ ├── FoodDetails.js │ ├── RestaurantDetails.js │ └── TopRestaurants.js ├── home │ ├── HomeScreen.js │ ├── OffersScreen.js │ └── SearchScreen.js ├── shoping │ ├── CartScreen.js │ ├── OrderDetails.js │ ├── OrderScreen.js │ └── PaymentScreen.js └── user │ ├── AccountScreen.js │ ├── SigninScreen.js │ └── SignupScreen.js └── utils ├── ActionTypes.js ├── AppConst.js └── NavigationRef.js /.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .expo/* 3 | npm-debug.* 4 | *.jks 5 | *.p8 6 | *.p12 7 | *.key 8 | *.mobileprovision 9 | *.orig.* 10 | web-build/ 11 | web-report/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { createAppContainer, createSwitchNavigator } from 'react-navigation'; 3 | import { createStackNavigator } from 'react-navigation-stack'; 4 | import { createBottomTabNavigator } from 'react-navigation-tabs'; 5 | import { Image, StyleSheet } from 'react-native'; 6 | import { Provider as UserProvider } from './src/dataStore/userAccessContext'; 7 | 8 | /** 9 | * 10 | * Screens 11 | * 12 | **/ 13 | 14 | import AuthCheckScreen from './src/screens/AuthCheckScreen'; 15 | import AccountScreen from './src/screens/user/AccountScreen'; 16 | import CartScreen from './src/screens/shoping/CartScreen'; 17 | import HomeScreen from './src/screens/home/HomeScreen'; 18 | import OfferScreen from './src/screens/home/OffersScreen'; 19 | import SearchScreen from './src/screens/home/SearchScreen'; 20 | import SigninScreen from './src/screens/user/SigninScreen'; 21 | import SignupScreen from './src/screens/user/SignupScreen'; 22 | import { setNavigator } from './src/utils/NavigationRef'; 23 | import OrderScreen from './src/screens/shoping/OrderScreen'; 24 | import OrderDetailScreen from './src/screens/shoping/OrderDetails'; 25 | import PaymentScreen from './src/screens/shoping/PaymentScreen'; 26 | import FoodDetails from './src/screens/foods/FoodDetails'; 27 | import RestaurantDetailScreen from './src/screens/foods/RestaurantDetails'; 28 | 29 | const switchNavigator = createSwitchNavigator({ 30 | authCheck: AuthCheckScreen, 31 | homeStack: createBottomTabNavigator({ 32 | Home: { 33 | screen: createStackNavigator({ 34 | TopProducts: HomeScreen, 35 | Search: SearchScreen, 36 | ProductDetail: FoodDetails, 37 | RestaurantDetail: RestaurantDetailScreen, 38 | }), 39 | navigationOptions: { 40 | tabBarOptions: { 41 | activeTintColor: '#f15b5d', 42 | }, 43 | tabBarIcon: ({ focused, tintColor }) => { 44 | let icon = 45 | focused == true 46 | ? require('./src/images/home_icon.png') 47 | : require('./src/images/home_n_icon.png'); 48 | return ; 49 | }, 50 | }, 51 | }, 52 | Offer: { 53 | screen: OfferScreen, 54 | navigationOptions: { 55 | tabBarOptions: { 56 | activeTintColor: '#f15b5d', 57 | }, 58 | tabBarIcon: ({ focused, tintColor }) => { 59 | let icon = 60 | focused == true 61 | ? require('./src/images/offer_icon.png') 62 | : require('./src/images/offer_n_icon.png'); 63 | return ; 64 | }, 65 | }, 66 | }, 67 | Cart: { 68 | screen: createStackNavigator({ 69 | Shoping: CartScreen, 70 | Order: OrderScreen, 71 | Payment: PaymentScreen, 72 | OrderDetails: OrderDetailScreen, 73 | }), 74 | navigationOptions: { 75 | tabBarOptions: { 76 | activeTintColor: '#f15b5d', 77 | }, 78 | tabBarIcon: ({ focused, tintColor }) => { 79 | let icon = 80 | focused == true 81 | ? require('./src/images/cart_icon.png') 82 | : require('./src/images/cart_n_icon.png'); 83 | return ; 84 | }, 85 | }, 86 | }, 87 | Account: { 88 | screen: AccountScreen, 89 | navigationOptions: { 90 | tabBarOptions: { 91 | activeTintColor: '#f15b5d', 92 | }, 93 | tabBarIcon: ({ focused, tintColor }) => { 94 | let img = 95 | focused == true 96 | ? require('./src/images/account_icon.png') 97 | : require('./src/images/account_n_icon.png'); 98 | return ; 99 | }, 100 | }, 101 | }, 102 | }), 103 | loginStack: { 104 | screen: createStackNavigator({ 105 | Signin: SigninScreen, 106 | Signup: SignupScreen, 107 | }), 108 | navigationOptions: { 109 | tabBarIcon: ({ focused, tintColor }) => { 110 | let icon = 111 | focused == true 112 | ? require('./src/images/account_icon.png') 113 | : require('./src/images/account_n_icon.png'); 114 | return ; 115 | }, 116 | }, 117 | }, 118 | }); 119 | 120 | const styles = StyleSheet.create({ 121 | tabIcon: { 122 | width: 30, 123 | height: 30, 124 | }, 125 | }); 126 | 127 | const App = createAppContainer(switchNavigator); 128 | 129 | export default () => { 130 | return ( 131 | 132 | { 134 | setNavigator(navigator); 135 | }} 136 | /> 137 | 138 | ); 139 | }; 140 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "React_Native_Food_Delivery_App", 4 | "slug": "React_Native_Food_Delivery_App", 5 | "platforms": [ 6 | "ios", 7 | "android", 8 | "web" 9 | ], 10 | "version": "1.0.0", 11 | "orientation": "portrait", 12 | "icon": "./assets/icon.png", 13 | "splash": { 14 | "image": "./assets/splash.png", 15 | "resizeMode": "contain", 16 | "backgroundColor": "#ffffff" 17 | }, 18 | "updates": { 19 | "fallbackToCacheTimeout": 0 20 | }, 21 | "assetBundlePatterns": [ 22 | "**/*" 23 | ], 24 | "ios": { 25 | "supportsTablet": true 26 | }, 27 | "description": "Online Food Order Application built using React Native", 28 | "githubUrl": "https://github.com/codergogoi/React_Native_Food_Order_App" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/React_Native_Food_Order_App/2d335ea51570ea7ce72d9595e819a0289d9ec358/assets/icon.png -------------------------------------------------------------------------------- /assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codergogoi/React_Native_Food_Order_App/2d335ea51570ea7ce72d9595e819a0289d9ec358/assets/splash.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "node_modules/expo/AppEntry.js", 3 | "scripts": { 4 | "start": "expo start", 5 | "android": "expo start --android", 6 | "ios": "expo start --ios", 7 | "web": "expo start --web", 8 | "eject": "expo eject" 9 | }, 10 | "dependencies": { 11 | "@react-native-community/masked-view": "0.1.6", 12 | "axios": "^0.19.2", 13 | "expo": "^37.0.0", 14 | "moment": "^2.25.3", 15 | "react": "16.9.0", 16 | "react-dom": "16.9.0", 17 | "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz", 18 | "react-native-elements": "^1.2.7", 19 | "react-native-gesture-handler": "~1.6.0", 20 | "react-native-maps": "0.26.1", 21 | "react-native-raw-bottom-sheet": "^2.2.0", 22 | "react-native-reanimated": "~1.7.0", 23 | "react-native-safe-area-context": "0.7.3", 24 | "react-native-screens": "~2.2.0", 25 | "react-native-web": "^0.11.7", 26 | "react-navigation": "^4.3.7", 27 | "react-navigation-stack": "^2.3.11", 28 | "react-navigation-tabs": "^2.8.11" 29 | }, 30 | "devDependencies": { 31 | "babel-preset-expo": "^8.1.0", 32 | "@babel/core": "^7.8.6" 33 | }, 34 | "private": true 35 | } 36 | -------------------------------------------------------------------------------- /src/api/WebService.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export default axios.create({ 4 | baseURL: "https://online-foods.herokuapp.com/", 5 | }); 6 | -------------------------------------------------------------------------------- /src/components/Buttons/AddRemoveButton.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { StyleSheet } from "react-native"; 3 | import { Button } from "react-native-elements"; 4 | 5 | const AddRemoveButton = ({ title, onTap, width = 32 }) => { 6 | return ( 7 |