Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React native ecommerce #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions React-Native-Ecommerce/.expo-shared/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> Why do I have a folder named ".expo-shared" in my project?
The ".expo-shared" folder is created when running commands that produce state that is intended to be shared with all developers on the project. For example, "npx expo-optimize".

> What does the "assets.json" file contain?
The "assets.json" file describes the assets that have been optimized through "expo-optimize" and do not need to be processed again.

> Should I commit the ".expo-shared" folder?
Yes, you should share the ".expo-shared" folder with your collaborators.
1 change: 1 addition & 0 deletions React-Native-Ecommerce/.expo-shared/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
152 changes: 152 additions & 0 deletions React-Native-Ecommerce/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Expo
.expo
__generated__
web-build
bare-apps

# macOS
.DS_Store
**/.DS_Store

# Node
node_modules
npm-debug.log
yarn-error.log

# Ruby
.direnv

# Env
.envrc.local

# Emacs
*~

# Vim
.*.swp
.*.swo
.*.swn
.*.swm

# Sublime Text
*.sublime-project
*.sublime-workspace

# Xcode
*.pbxuser
!default.pbxuser
*.xccheckout
*.xcscmblueprint
xcuserdata

# IDEA / Android Studio
*.iml
.gradle
.idea

# Eclipse
.project
.settings

# VSCode
.history/

# Android
*.apk
*.hprof
/android/**/build
/android/**/.cxx
/android/**/local.properties
/android/captures
/android/expoview/libs/ReactAndroid-temp
/android/versioned-react-native/ReactAndroid
/android/versioned-react-native/ReactCommon
/android/versioned-react-native/codegen
/android/versioned-react-native/sdks
ReactAndroid-temp.aar
/android/ReactAndroid/prebuiltHermes

# Tools
jarjar-rules.txt

# Dynamic Macros
/ios/Exponent/Supporting/EXBuildConstants.plist.bak
/ios/Exponent/Supporting/EXBuildConstants.plist.json
/ios/Exponent/Supporting/EXBuildConstants.plist
/ios/Exponent/Supporting/GoogleService-Info.plist
/ios/Exponent/Supporting/Info.plist.bak
/ios/Exponent/Supporting/Info.plist.json
/android/expoview/src/main/java/host/exp/exponent/generated/ExponentBuildConstants.java
/android/app/src/androidTest/java/host/exp/exponent/generated/TestBuildConstants.java
.kernel-ngrok-url

# Template files
/android/app/src/main/AndroidManifest.xml
/android/app/google-services.json
/android/expoview/src/main/java/host/exp/exponent/generated/ExponentKeys.java
/apps/bare-expo/android/app/google-services.json
/apps/bare-expo/ios/BareExpo/GoogleService-Info.plist
/ios/Exponent/Generated/EXKeys.h
/ios/ExponentIntegrationTests/EXTestEnvironment.plist
/exponent-view-template/ios/Podfile

# Template projects
templates/**/android/**/generated/*
templates/**/android/app/build
templates/**/Pods/**
templates/**/Podfile.lock
templates/**/yarn.lock

# EYW template
/packages/expo-yarn-workspaces/workspace-template/yarn.lock

# Codemod
.codemod.bookmark

# Fastlane
/*.cer
/fastlane/report.xml
/fastlane/Preview.html
/fastlane/Deployment
/fastlane/test_output
/Preview.html
/gc_keys.json
/fastlane/gc_keys.json

# CI
/android/logcat.txt

# Shell apps
android-shell-app
shellAppBase-*
shellAppIntermediates
shellAppWorkspaces
/artifacts/*

# Expo Client builds
/client-builds

# Expo web env
.env.local
.env.development.local
.env.test.local
.env.production.local
apps/bare-expo/deploy-url.txt

# Expo Doc merging
docs/pages/versions/*/react-native/ADDED_*.md
docs/pages/versions/*/react-native/REMOVED_*.md
docs/pages/versions/*/react-native/*.diff

# Home
/home/dist

# Prebuilds
/packages/**/*.xcframework
/packages/**/*.spec.json
/packages/**/Info-generated.plist

# iOS
/ios/Pods
/ios/build
**/ios/.xcode.env.local
11 changes: 11 additions & 0 deletions React-Native-Ecommerce/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Routes from "./routes/Routes";
import { Provider } from "react-redux";
import { store } from "./states/store";
export default function App() {
console.reportErrorsAsExceptions = false;
return (
<Provider store={store}>
<Routes />
</Provider>
);
}
21 changes: 21 additions & 0 deletions React-Native-Ecommerce/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Usama Sarwar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
31 changes: 31 additions & 0 deletions React-Native-Ecommerce/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
React-Native-Ecommerce
A fully functional and scalable eCommerce application built using React Native, providing seamless shopping experiences for users with features like product browsing, cart management, and secure checkout.

Features
Product Listings: Browse and search for products across different categories.
Product Details: View detailed information about each product, including images, price, and description.
Cart Management: Add, update, or remove items from the shopping cart.
User Authentication: Secure login and registration functionality.
Checkout: Complete purchases with integrated payment gateways.
Order History: View previous purchases and their status.
Responsive Design: Optimized for both Android and iOS devices.
Tech Stack
React Native: Framework for building native apps using React.
Redux: State management for managing user and cart states.
React Navigation: For seamless navigation across screens.
Firebase/Node.js: For backend services like authentication, database, and storage.
Stripe/PayPal API: Integrated for secure payments.

Clone the repository:

Navigate into the project directory:
cd React-Native-Ecommerce


Install dependencies:
npm install


Run the app on Android or iOS
npm run android # For Android
npm run ios # For iOS
46 changes: 46 additions & 0 deletions React-Native-Ecommerce/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"expo": {
"name": "EasyBuy",
"slug": "EasyBuy",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.abidrazaa.EasyBuy",
"permissions": ["android.permission.RECORD_AUDIO"]
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-image-picker",
{
"photosPermission": "The app accesses your photos to let you share them with your friends."
}
]
],
"extra": {
"eas": {
"projectId": "23e244b4-647a-421d-a4dd-a2efb62dc5b0"
}
}
}
}
Binary file added React-Native-Ecommerce/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added React-Native-Ecommerce/assets/fonts/muli/Muli.ttf
Binary file not shown.
Binary file added React-Native-Ecommerce/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/icons/Cart Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/icons/cart_beg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/icons/cosmetics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/icons/electronics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/icons/garments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/icons/scan_icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/image/emptybox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/image/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/logo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/logo/logo_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added React-Native-Ecommerce/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions React-Native-Ecommerce/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { StyleSheet, Text, View } from "react-native";
import React from "react";
import { colors } from "../../constants";
import { Ionicons } from "@expo/vector-icons";

const BasicProductList = ({ title, price, quantity }) => {
return (
<View style={styles.container}>
<View style={styles.innerContainer}>
<View style={styles.IconContainer}>
<Ionicons name="square" size={30} color={colors.muted} />
</View>
<View style={styles.productInfoContainer}>
<Text style={styles.secondaryText}>{title}</Text>
<Text>x{quantity}</Text>
</View>
</View>
<View>
<Text style={styles.primaryText}>{quantity * price}$</Text>
</View>
</View>
);
};

export default BasicProductList;

const styles = StyleSheet.create({
container: {
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
width: "100%",
backgroundColor: colors.white,
height: 70,
borderBottomWidth: 1,
borderBottomColor: colors.light,
padding: 5,
},
innerContainer: {
display: "flex",
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
},
productInfoContainer: {
justifyContent: "center",
alignItems: "flex-start",
marginLeft: 10,
},
IconContainer: {
display: "flex",
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
backgroundColor: colors.light,
height: 40,
width: 40,
borderRadius: 5,
},
primaryText: {
fontSize: 15,
fontWeight: "600",
color: colors.primary,
},
secondaryText: {
fontSize: 15,
fontWeight: "600",
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./BasicProductList";
Loading