├── README.md
├── backend
├── .env
├── .gitignore
├── controllers
│ └── productsController.js
├── index.js
├── models
│ └── productsModel.js
├── package.json
└── routes
│ └── productsRoute.js
└── frontend
├── .bundle
└── config
├── .eslintrc.js
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── .yarn
└── releases
│ └── yarn-3.6.4.cjs
├── .yarnrc.yml
├── App.tsx
├── Gemfile
├── README.md
├── __tests__
└── App.test.tsx
├── android
├── app
│ ├── build.gradle
│ ├── debug.keystore
│ ├── proguard-rules.pro
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── front_end
│ │ │ ├── MainActivity.kt
│ │ │ └── MainApplication.kt
│ │ └── res
│ │ ├── drawable-hdpi
│ │ └── icon.png
│ │ ├── drawable-ldpi
│ │ └── icon.png
│ │ ├── drawable-mdpi
│ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ └── icon.png
│ │ ├── drawable-xxxhdpi
│ │ └── icon.png
│ │ ├── drawable
│ │ ├── rn_edit_text_material.xml
│ │ └── screen.png
│ │ ├── layout
│ │ └── launch_screen.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_monochrome.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_monochrome.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_monochrome.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_monochrome.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ ├── ic_launcher_monochrome.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── app.json
├── babel.config.js
├── index.js
├── ios
├── .xcode.env
├── Podfile
├── front_end.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── front_end.xcscheme
├── front_end
│ ├── AppDelegate.h
│ ├── AppDelegate.mm
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Info.plist
│ ├── LaunchScreen.storyboard
│ ├── PrivacyInfo.xcprivacy
│ └── main.m
└── front_endTests
│ ├── Info.plist
│ └── front_endTests.m
├── jest.config.js
├── metro.config.js
├── package-lock.json
├── package.json
├── src
├── assets
│ ├── fonts
│ │ ├── Poppins-Black.ttf
│ │ ├── Poppins-Bold.ttf
│ │ ├── Poppins-ExtraBold.ttf
│ │ ├── Poppins-ExtraLight.ttf
│ │ ├── Poppins-Light.ttf
│ │ ├── Poppins-Medium.ttf
│ │ ├── Poppins-Regular.ttf
│ │ ├── Poppins-SemiBold.ttf
│ │ ├── Poppins-Thin.ttf
│ │ └── SpaceMono-Regular.ttf
│ ├── icons
│ │ ├── apple.png
│ │ ├── arrow_right.png
│ │ ├── but_now.png
│ │ ├── buy.png
│ │ ├── calender.png
│ │ ├── card.png
│ │ ├── cart_circle.png
│ │ ├── components.png
│ │ ├── eye.png
│ │ ├── eye_hide.png
│ │ ├── facebook.png
│ │ ├── filter.png
│ │ ├── google.png
│ │ ├── heart.png
│ │ ├── home.png
│ │ ├── lock.png
│ │ ├── mail.png
│ │ ├── menu.png
│ │ ├── mic.png
│ │ ├── offer.png
│ │ ├── pen.png
│ │ ├── profile.png
│ │ ├── profile_edit.png
│ │ ├── search.png
│ │ ├── setting.png
│ │ ├── show_all.png
│ │ ├── sort.png
│ │ └── user.svg
│ └── images
│ │ ├── Cover.jpg
│ │ ├── deal_off.png
│ │ ├── flat.png
│ │ ├── get_started.jpg
│ │ ├── getstarted.png
│ │ ├── hot_summer.png
│ │ ├── logo.png
│ │ ├── spash_1.png
│ │ ├── spash_2.png
│ │ ├── spash_3.png
│ │ └── sponserd.png
├── components
│ ├── CustomButton.tsx
│ ├── CustomSearch.tsx
│ ├── CustomWrapper.tsx
│ ├── DetailsItem.tsx
│ ├── FormField.tsx
│ ├── ProductItem.tsx
│ └── index.ts
├── constants
│ ├── data.ts
│ ├── icons.ts
│ ├── images.ts
│ ├── index.ts
│ └── types.ts
├── screens
│ ├── CheckoutScreen.tsx
│ ├── ForgotPasswordScreen.tsx
│ ├── GetStartedScreen.tsx
│ ├── HomeScreen.tsx
│ ├── LoginScreen.tsx
│ ├── OnboardingScreen.tsx
│ ├── PlaceOrder.tsx
│ ├── ProductsDetailsScreen.tsx
│ ├── ProfileScreen.tsx
│ ├── SignupScreen.tsx
│ └── index.ts
├── tabs
│ ├── CartTab.tsx
│ ├── HomeTab.tsx
│ ├── SearchTab.tsx
│ ├── SettingTab.tsx
│ ├── WishlistTab.tsx
│ └── index.ts
└── utils
│ └── AsyncStorage.ts
├── tailwind.config.js
├── tailwindcss.d.ts
├── tsconfig.json
└── yarn.lock
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |

11 |

12 |

13 |

14 |

15 |

16 |
17 |
18 |
Full Stack E-Commerce App
19 |
20 |
21 | Build this project step by step with our detailed tutorial on
Web Minds YouTube. Join the WM family!
22 |
23 |
24 |
25 | ## 📋 Table of Contents
26 |
27 | 1. 🤖 [Introduction](#introduction)
28 | 2. ⚙️ [Tech Stack](#tech-stack)
29 | 3. 🔋 [Features](#features)
30 | 4. 🤸 [Quick Start](#quick-start)
31 | 5. 🖼️ [Assets](#assets)
32 | 6. 🔗 [Links](#links)
33 |
34 | ## 🚨 Tutorial
35 |
36 | This repository contains the code corresponding to an in-depth tutorial available on our YouTube channel, Web Minds.
37 |
38 | If you prefer visual learning, this is the perfect resource for you. Follow our tutorial to learn how to build projects like these step-by-step in a beginner-friendly manner!
39 |
40 |
41 |
42 |
43 | ## 🤖 Introduction
44 | Welcome to the Full Stack E-Commerce App! This app is designed to offer a comprehensive E-Commerce solution with a focus on responsiveness and smooth animations. Built using React Native, Node.js, and MongoDB, it ensures high performance and scalability.
45 |
46 | ## ⚙️ Tech Stack
47 | - **React Native**
48 | - **React Native Reanimated**
49 | - **Tailwind CSS**
50 | - **Node.js**
51 | - **Express**
52 | - **MongoDB**
53 |
54 | ## 🔋 Features
55 | 👉 **Beautiful Subtle Smooth Animations using React Native Reanimated**: Enhance user experience with seamless and captivating animations.
56 |
57 | 👉 **Completely Responsive**: Access and optimal viewing on any device with a fully responsive design.
58 |
59 | 👉 **Real-time Updates**: Stay up-to-date with real-time data synchronization across the app.
60 |
61 | 👉 **Check-out Page**: Simplified and efficient check-out process for user convenience.
62 |
63 | 👉 **Secure Authentication**: Robust authentication mechanisms to protect user data.
64 |
65 | 👉 **Scalable Backend**: Powered by Node.js and Express for a scalable and efficient backend.
66 |
67 | ## 🤸 Quick Start
68 | Follow these steps to set up the project locally on your machine.
69 |
70 | **Prerequisites**
71 |
72 | Make sure you have the following installed on your machine:
73 |
74 | - [Git](https://git-scm.com/)
75 | - [Node.js](https://nodejs.org/en)
76 | - [npm](https://www.npmjs.com/) (Node Package Manager)
77 |
78 | **Cloning the Repository**
79 |
80 | ```bash
81 | git clone https://github.com/Abdullah0Dev/stylish.git
82 | cd stylish
83 | ```
84 |
85 |
86 | **Installation**
87 |
88 | Navigate to the `frontend` folder and install dependencies:
89 |
90 | ```bash
91 | cd frontend
92 | npm install
93 | ```
94 |
95 | Navigate to the `backend` folder and install dependencies:
96 |
97 | ```bash
98 | cd ../backend
99 | npm install
100 | ```
101 |
102 | **Running the Backend**
103 |
104 | Start the backend server:
105 |
106 | ```bash
107 | npm start
108 | ```
109 |
110 | **Running the Frontend**
111 |
112 | Navigate back to the `frontend` folder and start the React Native app:
113 |
114 | ```bash
115 | cd ../frontend
116 | npx react-native run-android # For Android
117 | npx react-native run-ios # For iOS
118 | ```
119 |
120 | Open the app on your simulator or real device to view the project.
121 |
122 | ## 🖼️ Assets
123 | Find all assets [here](https://drive.google.com/drive/folders/1L1rxpyGG27UXTISyfPVtNuSHLIEc08FV?usp=sharing).
124 |
125 | ## 🔗 Links
126 | - **🎨 Design** : [Figma App Desing✍](https://www.figma.com/design/r2oLfsjVOOHBRAmV9zxc8p/eCommerce-App-UI-Kit---Case-Study-Ecommerce-Mobile-App-UI-kit-(Community)?node-id=1-16990&t=aGKMq0fjCva2xjBh-1)
127 |
128 |
129 |
--------------------------------------------------------------------------------
/backend/.env:
--------------------------------------------------------------------------------
1 | MONGODB_URI=mongodb+srv://webminds:webminds123@cluster0.wol2at8.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
2 | PORT=4000
3 | CLERK_PUBLISHABLE_KEY=pk_test_anVzdC1sZW11ci05NS5jbGVyay5hY2NvdW50cy5kZXYk
4 | CLERK_SECRET_KEY=sk_test_JJpcCSFRKrjFrun2z55WV0Bf60koa5m8GBxROxyTd9
--------------------------------------------------------------------------------
/backend/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | node_modules/
3 |
4 | package-lock.json
--------------------------------------------------------------------------------
/backend/controllers/productsController.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 | const productsModel = require('../models/productsModel')
3 |
4 |
5 | /**
6 | getAllProducts,
7 | getSingleProduct,
8 | createNewProduct,
9 | updateProduct,
10 | deleteProduct
11 | */
12 |
13 | // get all products
14 | const getAllProducts = async (req, res) => {
15 | try {
16 | const products = await productsModel.find({}).sort({ createdAt: -1 }) // sort by newest
17 | // check if there no products
18 | if (products.length === 0) {
19 | return res.status(404).json({ message: " No Products Found " })
20 | }
21 | // if there is return it
22 | return res.status(200).json(products)
23 | } catch (error) {
24 | res.status(500).json({ error: error.message })
25 | }
26 | }
27 | // get single product with its ID
28 | const getSingleProduct = async (req, res) => {
29 | try {
30 | // get its id
31 | const { id } = req.params;
32 | // validate the id
33 | if (!mongoose.Types.ObjectId.isValid(id)) {
34 | res.status(400).json({ error: "No Such ID" })
35 | }
36 | // get the post by its id
37 | const Product = productsModel.findById(id)
38 | // check if valid product
39 | if (!Product) {
40 | res.status(400).json("Not Valid Product")
41 | }
42 | // if it's ok return it
43 | return res.status(200).json(Product)
44 |
45 | } catch (error) {
46 | res.status(500).json({ error: error.message })
47 | }
48 | }
49 |
50 | // create a new product
51 | const createNewProduct = async (req, res) => {
52 | try {
53 | // get the input fields
54 | const { image, title, description, price, priceBeforeDeal, priceOff, stars, numberOfReview, ukSide,
55 | tags, status } = req.body;
56 | // destructure status to icon, and name
57 | const { icon, name } = status;
58 |
59 | // create the product
60 | const newProduct = await productsModel.create({
61 | image, title, description, price, priceBeforeDeal, priceOff, stars, numberOfReview, ukSide,
62 | tags, status: { icon, name }
63 | })
64 | // return it
65 | return res.status(200).json(newProduct)
66 |
67 | } catch (error) {
68 | // separate each error
69 | let errorMessage = "";
70 | if (error.errors) {
71 | errorMessage = Object.values(error.errors).map(error => error.message).join(",")
72 | } else {
73 | errorMessage = error.message;
74 | }
75 | res.status(500).json({ error: errorMessage })
76 | }
77 | }
78 |
79 | // update product
80 | const updateProduct = async (req, res) => {
81 | try {
82 | const { id } = req.params;
83 | // validate the id
84 | if (!mongoose.Types.ObjectId.isValid(id)) {
85 | return res.status(400).json({ error: "No such ID" })
86 | }
87 | const updateProduct = await productsModel.findByIdAndUpdate(id , { ...req.body }, { new: true })
88 |
89 | if (!updateProduct) {
90 | return res.status(400).json({ error: "Couldn't Update the product, make sure you filled the required fields" })
91 | }
92 |
93 | // alright
94 | return res.status(200).json(updateProduct)
95 |
96 | } catch (error) {
97 | res.status(500).json({ error: error.message })
98 | }
99 | }
100 | // delete product
101 |
102 | const deleteProduct = async (req, res) => {
103 | try {
104 | const { id } = req.params;
105 | // validate the id
106 | if (!mongoose.Types.ObjectId.isValid(id)) {
107 | return res.status(400).json({ error: "No Such ID" })
108 | }
109 | const deleteProductByItsID = await productsModel.findByIdAndUpdate(id)
110 |
111 | // successful
112 | return res.status(200).json(deleteProductByItsID)
113 | } catch (error) {
114 | res.status(500).json({ error: error.message })
115 | }
116 | }
117 |
118 |
119 |
120 | module.exports = {
121 | getAllProducts,
122 | getSingleProduct,
123 | createNewProduct,
124 | updateProduct,
125 | deleteProduct
126 | }
--------------------------------------------------------------------------------
/backend/index.js:
--------------------------------------------------------------------------------
1 | require('dotenv').config()
2 | const express = require('express');
3 | const cors = require('cors')
4 | const mongoose = require('mongoose')
5 | const productsRoute = require('./routes/productsRoute')
6 |
7 | // initialize a new express application instance
8 | const app = express();
9 |
10 | // middlewares
11 | app.use(express.json())
12 | app.use(cors())
13 |
14 | // routes
15 | // app.use("api/auth/", authRoute);
16 | app.use("/api/products/", productsRoute);
17 |
18 |
19 |
20 | // connect to DataBase (MONGODB)
21 |
22 | const PORT = process.env.PORT // http://localhost:4000/api/products/ -> POST
23 | const MONGODB_URI = process.env.MONGODB_URI;
24 |
25 | mongoose.connect(MONGODB_URI)
26 | .then(() => app.listen(PORT, () => console.log(`Connected to DB, and running on http://localhost:${PORT}/`)))
27 | .catch((error) => console.log(`Error:`, error.message))
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/backend/models/productsModel.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 |
3 | const Schema = mongoose.Schema;
4 |
5 | const productSchema = new Schema({
6 | image: [String],
7 | title: {
8 | type: String,
9 | required: [true, "Title is required"],
10 | },
11 | description: {
12 | type: String,
13 | required: [true, "Description is required"],
14 | },
15 | price: {
16 | type: Number,
17 | required: [true, "Price is required"],
18 | },
19 | priceBeforeDeal: {
20 | type: Number,
21 | required: [true, "Price Before deal is required to hook the user"],
22 | },
23 | priceOff: {
24 | type: Number,
25 | required: [true, "Price Off is required to hook the user"],
26 | },
27 | stars: {
28 | type: Number,
29 | default: 0,
30 | },
31 | numberOfReview: {
32 | type: Number,
33 | default: 0,
34 | },
35 | ukSide: [String],
36 | tags: {
37 | type: [String],
38 | },
39 | status: {
40 | icon: {
41 | type: String,
42 | required: [true, "Status Icon is required"]
43 | },
44 |
45 | name: {
46 | type: String,
47 | required: [true, "Status Name is required"]
48 | },
49 |
50 | }
51 | }, { timestamps: true })
52 | // let's add the timestamp to enable createdAt, and _id
53 |
54 | module.exports = mongoose.model("productsModel", productSchema)
--------------------------------------------------------------------------------
/backend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backend",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "scripts": {
6 | "test": "echo \"Error: no test specified\" && exit 1",
7 | "start": "nodemon index.js"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "description": "A backend server for Stylish App made by Web Minds!",
13 | "dependencies": {
14 | "@clerk/clerk-sdk-node": "^5.0.14",
15 | "bcrypt": "^5.1.1",
16 | "cors": "^2.8.5",
17 | "dotenv": "^16.4.5",
18 | "express": "^4.19.2",
19 | "jsonwebtoken": "^9.0.2",
20 | "mongoose": "^8.4.4",
21 | "nodemon": "^3.1.4",
22 | "validator": "^13.12.0"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/backend/routes/productsRoute.js:
--------------------------------------------------------------------------------
1 | const express = require('express')
2 |
3 | const {
4 | getAllProducts,
5 | getSingleProduct,
6 | createNewProduct,
7 | updateProduct,
8 | deleteProduct
9 | } = require('../controllers/productsController')
10 |
11 | const router = express.Router()
12 |
13 |
14 |
15 | // get all products
16 | router.get('/', getAllProducts)
17 |
18 | // get a single products with it's ID
19 | router.get('/:id', getSingleProduct)
20 |
21 | // create a new product
22 | router.post('/', createNewProduct)
23 |
24 | // update a product
25 | router.put('/:id', updateProduct)
26 |
27 | // delete product
28 | router.delete('/:id', deleteProduct)
29 |
30 | module.exports = router;
--------------------------------------------------------------------------------
/frontend/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/frontend/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native',
4 | };
5 |
--------------------------------------------------------------------------------
/frontend/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | **/.xcode.env.local
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 | *.hprof
33 | .cxx/
34 | *.keystore
35 | !debug.keystore
36 |
37 | # node.js
38 | #
39 | node_modules/
40 | npm-debug.log
41 | yarn-error.log
42 |
43 | # fastlane
44 | #
45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46 | # screenshots whenever they are needed.
47 | # For more information about the recommended setup visit:
48 | # https://docs.fastlane.tools/best-practices/source-control/
49 |
50 | **/fastlane/report.xml
51 | **/fastlane/Preview.html
52 | **/fastlane/screenshots
53 | **/fastlane/test_output
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # Ruby / CocoaPods
59 | **/Pods/
60 | /vendor/bundle/
61 |
62 | # Temporary files created by Metro to check the health of the file watcher
63 | .metro-health-check*
64 |
65 | # testing
66 | /coverage
67 |
68 | # Yarn
69 | .yarn/*
70 | !.yarn/patches
71 | !.yarn/plugins
72 | !.yarn/releases
73 | !.yarn/sdks
74 | !.yarn/versions
75 |
--------------------------------------------------------------------------------
/frontend/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/frontend/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/frontend/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | nodeLinker: node-modules
2 |
3 | yarnPath: .yarn/releases/yarn-3.6.4.cjs
4 |
--------------------------------------------------------------------------------
/frontend/App.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect, useState} from 'react';
2 | import {GestureHandlerRootView} from 'react-native-gesture-handler';
3 | import {NavigationContainer} from '@react-navigation/native';
4 | import {createNativeStackNavigator} from '@react-navigation/native-stack';
5 | import {
6 | CheckoutScreen,
7 | ForgotPasswordScreen,
8 | HomeScreen,
9 | LoginScreen,
10 | OnboardingScreen,
11 | PlaceOrder,
12 | ProductsDetailsScreen,
13 | ProfileScreen,
14 | SignupScreen,
15 | } from './src/screens';
16 | import SplashScreen from 'react-native-splash-screen';
17 | import GetStartedScreen from './src/screens/GetStartedScreen';
18 | import {ItemDetails} from './src/constants/types';
19 | import {getItem} from './src/utils/AsyncStorage';
20 | import {ActivityIndicator, View} from 'react-native';
21 |
22 | export type RouteStackParamList = {
23 | Onboarding: undefined;
24 | GetStarted: undefined;
25 | Login: undefined;
26 | Signup: undefined;
27 | HomeScreen: undefined;
28 | Profile: undefined;
29 | Checkout: undefined;
30 | PlaceOrder: {itemDetails: ItemDetails} | undefined;
31 | ForgotPassword: undefined;
32 | ProductDetails: {itemDetails: ItemDetails} | undefined;
33 | };
34 |
35 | const App = () => {
36 | const Stack = createNativeStackNavigator();
37 | const [showOnboarded, setShowOnboarded] = useState(null);
38 |
39 | useEffect(() => {
40 | SplashScreen.hide();
41 | checkIfAlreadyOnboarded();
42 | }, []);
43 |
44 | const checkIfAlreadyOnboarded = async () => {
45 | const onboarded = await getItem('onboarded');
46 | if (onboarded === 200) {
47 | // successfully onboarded, don't show onboarding screen once again
48 | setShowOnboarded(false);
49 | console.log(`it's value should be 200:`, onboarded);
50 | } else {
51 | // didn't onboard, show onboarding screen
52 | setShowOnboarded(true);
53 | console.log(`it's value is:`, onboarded);
54 | }
55 | };
56 |
57 | if (showOnboarded === null) {
58 | return (
59 |
60 |
61 |
62 | );
63 | }
64 | return (
65 |
66 |
67 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
82 |
86 |
87 |
88 |
89 | );
90 | };
91 |
92 | export default App;
93 |
--------------------------------------------------------------------------------
/frontend/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4 | ruby ">= 2.6.10"
5 |
6 | # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7 | # bound in the template on Cocoapods with next React Native release.
8 | gem 'cocoapods', '>= 1.13', '< 1.15'
9 | gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
10 |
--------------------------------------------------------------------------------
/frontend/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/__tests__/App.test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: import explicitly to use the types shipped with jest.
10 | import {it} from '@jest/globals';
11 |
12 | // Note: test renderer must be required after react-native.
13 | import renderer from 'react-test-renderer';
14 |
15 | it('renders correctly', () => {
16 | renderer.create();
17 | });
18 |
--------------------------------------------------------------------------------
/frontend/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply plugin: "org.jetbrains.kotlin.android"
3 | apply plugin: "com.facebook.react"
4 |
5 | /**
6 | * This is the configuration block to customize your React Native Android app.
7 | * By default you don't need to apply any configuration, just uncomment the lines you need.
8 | */
9 | react {
10 | /* Folders */
11 | // The root of your project, i.e. where "package.json" lives. Default is '..'
12 | // root = file("../")
13 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native
14 | // reactNativeDir = file("../node_modules/react-native")
15 | // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16 | // codegenDir = file("../node_modules/@react-native/codegen")
17 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18 | // cliFile = file("../node_modules/react-native/cli.js")
19 |
20 | /* Variants */
21 | // The list of variants to that are debuggable. For those we're going to
22 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
23 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
24 | // debuggableVariants = ["liteDebug", "prodDebug"]
25 |
26 | /* Bundling */
27 | // A list containing the node command and its flags. Default is just 'node'.
28 | // nodeExecutableAndArgs = ["node"]
29 | //
30 | // The command to run when bundling. By default is 'bundle'
31 | // bundleCommand = "ram-bundle"
32 | //
33 | // The path to the CLI configuration file. Default is empty.
34 | // bundleConfig = file(../rn-cli.config.js)
35 | //
36 | // The name of the generated asset file containing your JS bundle
37 | // bundleAssetName = "MyApplication.android.bundle"
38 | //
39 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
40 | // entryFile = file("../js/MyApplication.android.js")
41 | //
42 | // A list of extra flags to pass to the 'bundle' commands.
43 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
44 | // extraPackagerArgs = []
45 |
46 | /* Hermes Commands */
47 | // The hermes compiler command to run. By default it is 'hermesc'
48 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
49 | //
50 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
51 | // hermesFlags = ["-O", "-output-source-map"]
52 | }
53 |
54 | /**
55 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
56 | */
57 | def enableProguardInReleaseBuilds = false
58 |
59 | /**
60 | * The preferred build flavor of JavaScriptCore (JSC)
61 | *
62 | * For example, to use the international variant, you can use:
63 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
64 | *
65 | * The international variant includes ICU i18n library and necessary data
66 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
67 | * give correct results when using with locales other than en-US. Note that
68 | * this variant is about 6MiB larger per architecture than default.
69 | */
70 | def jscFlavor = 'org.webkit:android-jsc:+'
71 |
72 | android {
73 | ndkVersion rootProject.ext.ndkVersion
74 | buildToolsVersion rootProject.ext.buildToolsVersion
75 | compileSdk rootProject.ext.compileSdkVersion
76 |
77 | namespace "com.front_end"
78 | defaultConfig {
79 | applicationId "com.front_end"
80 | minSdkVersion rootProject.ext.minSdkVersion
81 | targetSdkVersion rootProject.ext.targetSdkVersion
82 | versionCode 1
83 | versionName "1.0"
84 | }
85 | signingConfigs {
86 | debug {
87 | storeFile file('debug.keystore')
88 | storePassword 'android'
89 | keyAlias 'androiddebugkey'
90 | keyPassword 'android'
91 | }
92 | }
93 | buildTypes {
94 | debug {
95 | signingConfig signingConfigs.debug
96 | }
97 | release {
98 | // Caution! In production, you need to generate your own keystore file.
99 | // see https://reactnative.dev/docs/signed-apk-android.
100 | signingConfig signingConfigs.debug
101 | minifyEnabled enableProguardInReleaseBuilds
102 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
103 | }
104 | }
105 | }
106 |
107 | dependencies {
108 | // The version of react-native is set by the React Native Gradle Plugin
109 | implementation("com.facebook.react:react-android")
110 | implementation project(':react-native-splash-screen')
111 |
112 |
113 | if (hermesEnabled.toBoolean()) {
114 | implementation("com.facebook.react:hermes-android")
115 | } else {
116 | implementation jscFlavor
117 | }
118 | }
119 |
120 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
121 |
--------------------------------------------------------------------------------
/frontend/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/debug.keystore
--------------------------------------------------------------------------------
/frontend/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 |
--------------------------------------------------------------------------------
/frontend/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/java/com/front_end/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.front_end
2 | import android.os.Bundle;
3 | import org.devio.rn.splashscreen.SplashScreen;
4 | import com.facebook.react.ReactActivity
5 | import com.facebook.react.ReactActivityDelegate
6 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
7 | import com.facebook.react.defaults.DefaultReactActivityDelegate
8 |
9 | class MainActivity : ReactActivity() {
10 | override fun onCreate(savedInstanceState: Bundle?) {
11 | super.onCreate(null)
12 | SplashScreen.show(this) // Show splash screen
13 | }
14 |
15 | /**
16 | * Returns the name of the main component registered from JavaScript. This is used to schedule
17 | * rendering of the component.
18 | */
19 | override fun getMainComponentName(): String = "front_end"
20 |
21 | /**
22 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
23 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
24 | */
25 | override fun createReactActivityDelegate(): ReactActivityDelegate =
26 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
27 | }
28 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/java/com/front_end/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.front_end
2 | import android.os.Bundle;
3 | import org.devio.rn.splashscreen.SplashScreen;
4 | import android.app.Application
5 | import com.facebook.react.PackageList
6 | import com.facebook.react.ReactApplication
7 | import com.facebook.react.ReactHost
8 | import com.facebook.react.ReactNativeHost
9 | import com.facebook.react.ReactPackage
10 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
11 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
12 | import com.facebook.react.defaults.DefaultReactNativeHost
13 | import com.facebook.soloader.SoLoader
14 |
15 | class MainApplication : Application(), ReactApplication {
16 | override fun onCreate() {
17 | super.onCreate()
18 | SoLoader.init(this, false)
19 | // SplashScreen.show(this) // Show splash screen
20 |
21 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
22 | // If you opted-in for the New Architecture, load the native entry point for this app.
23 | load()
24 | }
25 | }
26 | override val reactNativeHost: ReactNativeHost =
27 | object : DefaultReactNativeHost(this) {
28 | override fun getPackages(): List =
29 | PackageList(this).packages.apply {
30 | // Packages that cannot be autolinked yet can be added manually here, for example:
31 | // add(MyReactNativePackage())
32 | }
33 |
34 | override fun getJSMainModuleName(): String = "index"
35 |
36 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
37 |
38 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
39 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
40 | }
41 |
42 | override val reactHost: ReactHost
43 | get() = getDefaultReactHost(applicationContext, reactNativeHost)
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
22 |
23 |
24 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/drawable/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/drawable/screen.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/layout/launch_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | front_end
3 |
4 |
--------------------------------------------------------------------------------
/frontend/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/frontend/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | buildToolsVersion = "34.0.0"
4 | minSdkVersion = 23
5 | compileSdkVersion = 34
6 | targetSdkVersion = 34
7 | ndkVersion = "26.1.10909125"
8 | kotlinVersion = "1.9.22"
9 | }
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle")
16 | classpath("com.facebook.react:react-native-gradle-plugin")
17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
18 | }
19 | }
20 |
21 | apply plugin: "com.facebook.react.rootproject"
22 |
--------------------------------------------------------------------------------
/frontend/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Use this property to specify which architecture you want to build.
28 | # You can also override it from the CLI using
29 | # ./gradlew -PreactNativeArchitectures=x86_64
30 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
31 |
32 | # Use this property to enable support to the new architecture.
33 | # This will allow you to use TurboModules and the Fabric render in
34 | # your application. You should enable this flag either if you want
35 | # to write custom TurboModules/Fabric components OR use libraries that
36 | # are providing them.
37 | newArchEnabled=true
38 |
39 | # Use this property to enable or disable the Hermes JS engine.
40 | # If set to false, you will be using JSC instead.
41 | hermesEnabled=true
42 |
--------------------------------------------------------------------------------
/frontend/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/frontend/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/frontend/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2034
85 | APP_BASE_NAME=${0##*/}
86 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87 | APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88 |
89 | # Use the maximum available, or set MAX_FD != -1 to use that value.
90 | MAX_FD=maximum
91 |
92 | warn () {
93 | echo "$*"
94 | } >&2
95 |
96 | die () {
97 | echo
98 | echo "$*"
99 | echo
100 | exit 1
101 | } >&2
102 |
103 | # OS specific support (must be 'true' or 'false').
104 | cygwin=false
105 | msys=false
106 | darwin=false
107 | nonstop=false
108 | case "$( uname )" in #(
109 | CYGWIN* ) cygwin=true ;; #(
110 | Darwin* ) darwin=true ;; #(
111 | MSYS* | MINGW* ) msys=true ;; #(
112 | NONSTOP* ) nonstop=true ;;
113 | esac
114 |
115 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116 |
117 |
118 | # Determine the Java command to use to start the JVM.
119 | if [ -n "$JAVA_HOME" ] ; then
120 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121 | # IBM's JDK on AIX uses strange locations for the executables
122 | JAVACMD=$JAVA_HOME/jre/sh/java
123 | else
124 | JAVACMD=$JAVA_HOME/bin/java
125 | fi
126 | if [ ! -x "$JAVACMD" ] ; then
127 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128 |
129 | Please set the JAVA_HOME variable in your environment to match the
130 | location of your Java installation."
131 | fi
132 | else
133 | JAVACMD=java
134 | if ! command -v java >/dev/null 2>&1
135 | then
136 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 | fi
142 |
143 | # Increase the maximum file descriptors if we can.
144 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145 | case $MAX_FD in #(
146 | max*)
147 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148 | # shellcheck disable=SC2039,SC3045
149 | MAX_FD=$( ulimit -H -n ) ||
150 | warn "Could not query maximum file descriptor limit"
151 | esac
152 | case $MAX_FD in #(
153 | '' | soft) :;; #(
154 | *)
155 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156 | # shellcheck disable=SC2039,SC3045
157 | ulimit -n "$MAX_FD" ||
158 | warn "Could not set maximum file descriptor limit to $MAX_FD"
159 | esac
160 | fi
161 |
162 | # Collect all arguments for the java command, stacking in reverse order:
163 | # * args from the command line
164 | # * the main class name
165 | # * -classpath
166 | # * -D...appname settings
167 | # * --module-path (only if needed)
168 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169 |
170 | # For Cygwin or MSYS, switch paths to Windows format before running java
171 | if "$cygwin" || "$msys" ; then
172 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174 |
175 | JAVACMD=$( cygpath --unix "$JAVACMD" )
176 |
177 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
178 | for arg do
179 | if
180 | case $arg in #(
181 | -*) false ;; # don't mess with options #(
182 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183 | [ -e "$t" ] ;; #(
184 | *) false ;;
185 | esac
186 | then
187 | arg=$( cygpath --path --ignore --mixed "$arg" )
188 | fi
189 | # Roll the args list around exactly as many times as the number of
190 | # args, so each arg winds up back in the position where it started, but
191 | # possibly modified.
192 | #
193 | # NB: a `for` loop captures its iteration list before it begins, so
194 | # changing the positional parameters here affects neither the number of
195 | # iterations, nor the values presented in `arg`.
196 | shift # remove old arg
197 | set -- "$@" "$arg" # push replacement arg
198 | done
199 | fi
200 |
201 |
202 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204 |
205 | # Collect all arguments for the java command:
206 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207 | # and any embedded shellness will be escaped.
208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209 | # treated as '${Hostname}' itself on the command line.
210 |
211 | set -- \
212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
213 | -classpath "$CLASSPATH" \
214 | org.gradle.wrapper.GradleWrapperMain \
215 | "$@"
216 |
217 | # Stop when "xargs" is not available.
218 | if ! command -v xargs >/dev/null 2>&1
219 | then
220 | die "xargs is not available"
221 | fi
222 |
223 | # Use "xargs" to parse quoted args.
224 | #
225 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226 | #
227 | # In Bash we could simply go:
228 | #
229 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230 | # set -- "${ARGS[@]}" "$@"
231 | #
232 | # but POSIX shell has neither arrays nor command substitution, so instead we
233 | # post-process each arg (as a line of input to sed) to backslash-escape any
234 | # character that might be a shell metacharacter, then use eval to reverse
235 | # that process (while maintaining the separation between arguments), and wrap
236 | # the whole thing up as a single "set" statement.
237 | #
238 | # This will of course break if any of these variables contains a newline or
239 | # an unmatched quote.
240 | #
241 |
242 | eval "set -- $(
243 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244 | xargs -n1 |
245 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246 | tr '\n' ' '
247 | )" '"$@"'
248 |
249 | exec "$JAVACMD" "$@"
250 |
--------------------------------------------------------------------------------
/frontend/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo. 1>&2
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48 | echo. 1>&2
49 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50 | echo location of your Java installation. 1>&2
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo. 1>&2
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62 | echo. 1>&2
63 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64 | echo location of your Java installation. 1>&2
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/frontend/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'front_end'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/@react-native/gradle-plugin')
5 | include ':react-native-splash-screen'
6 | project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
--------------------------------------------------------------------------------
/frontend/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "front_end",
3 | "displayName": "front_end"
4 | }
5 |
--------------------------------------------------------------------------------
/frontend/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:@react-native/babel-preset'],
3 | plugins: [
4 | "nativewind/babel",
5 | 'react-native-reanimated/plugin',
6 |
7 | ],
8 | };
9 |
--------------------------------------------------------------------------------
/frontend/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/frontend/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/frontend/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Resolve react_native_pods.rb with node to allow for hoisting
2 | require Pod::Executable.execute_command('node', ['-p',
3 | 'require.resolve(
4 | "react-native/scripts/react_native_pods.rb",
5 | {paths: [process.argv[1]]},
6 | )', __dir__]).strip
7 |
8 | platform :ios, min_ios_version_supported
9 | prepare_react_native_project!
10 |
11 | linkage = ENV['USE_FRAMEWORKS']
12 | if linkage != nil
13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14 | use_frameworks! :linkage => linkage.to_sym
15 | end
16 |
17 | target 'front_end' do
18 | config = use_native_modules!
19 |
20 | use_react_native!(
21 | :path => config[:reactNativePath],
22 | # An absolute path to your application root.
23 | :app_path => "#{Pod::Config.instance.installation_root}/.."
24 | )
25 |
26 | target 'front_endTests' do
27 | inherit! :complete
28 | # Pods for testing
29 | end
30 |
31 | post_install do |installer|
32 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
33 | react_native_post_install(
34 | installer,
35 | config[:reactNativePath],
36 | :mac_catalyst_enabled => false,
37 | # :ccache_enabled => true
38 | )
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/frontend/ios/front_end.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* front_endTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* front_endTests.m */; };
11 | 0C80B921A6F3F58F76C31292 /* libPods-front_end.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-front_end.a */; };
12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15 | 7699B88040F8A987B510C191 /* libPods-front_end-front_endTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-front_end-front_endTests.a */; };
16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
25 | remoteInfo = front_end;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | 00E356EE1AD99517003FC87E /* front_endTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = front_endTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | 00E356F21AD99517003FC87E /* front_endTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = front_endTests.m; sourceTree = ""; };
33 | 13B07F961A680F5B00A75B9A /* front_end.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = front_end.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = front_end/AppDelegate.h; sourceTree = ""; };
35 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = front_end/AppDelegate.mm; sourceTree = ""; };
36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = front_end/Images.xcassets; sourceTree = ""; };
37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = front_end/Info.plist; sourceTree = ""; };
38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = front_end/main.m; sourceTree = ""; };
39 | 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = front_end/PrivacyInfo.xcprivacy; sourceTree = ""; };
40 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-front_end-front_endTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-front_end-front_endTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 3B4392A12AC88292D35C810B /* Pods-front_end.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-front_end.debug.xcconfig"; path = "Target Support Files/Pods-front_end/Pods-front_end.debug.xcconfig"; sourceTree = ""; };
42 | 5709B34CF0A7D63546082F79 /* Pods-front_end.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-front_end.release.xcconfig"; path = "Target Support Files/Pods-front_end/Pods-front_end.release.xcconfig"; sourceTree = ""; };
43 | 5B7EB9410499542E8C5724F5 /* Pods-front_end-front_endTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-front_end-front_endTests.debug.xcconfig"; path = "Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests.debug.xcconfig"; sourceTree = ""; };
44 | 5DCACB8F33CDC322A6C60F78 /* libPods-front_end.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-front_end.a"; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = front_end/LaunchScreen.storyboard; sourceTree = ""; };
46 | 89C6BE57DB24E9ADA2F236DE /* Pods-front_end-front_endTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-front_end-front_endTests.release.xcconfig"; path = "Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests.release.xcconfig"; sourceTree = ""; };
47 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
48 | /* End PBXFileReference section */
49 |
50 | /* Begin PBXFrameworksBuildPhase section */
51 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | 7699B88040F8A987B510C191 /* libPods-front_end-front_endTests.a in Frameworks */,
56 | );
57 | runOnlyForDeploymentPostprocessing = 0;
58 | };
59 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | 0C80B921A6F3F58F76C31292 /* libPods-front_end.a in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | /* End PBXFrameworksBuildPhase section */
68 |
69 | /* Begin PBXGroup section */
70 | 00E356EF1AD99517003FC87E /* front_endTests */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 00E356F21AD99517003FC87E /* front_endTests.m */,
74 | 00E356F01AD99517003FC87E /* Supporting Files */,
75 | );
76 | path = front_endTests;
77 | sourceTree = "";
78 | };
79 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 00E356F11AD99517003FC87E /* Info.plist */,
83 | );
84 | name = "Supporting Files";
85 | sourceTree = "";
86 | };
87 | 13B07FAE1A68108700A75B9A /* front_end */ = {
88 | isa = PBXGroup;
89 | children = (
90 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
91 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
92 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
93 | 13B07FB61A68108700A75B9A /* Info.plist */,
94 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
95 | 13B07FB71A68108700A75B9A /* main.m */,
96 | 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
97 | );
98 | name = front_end;
99 | sourceTree = "";
100 | };
101 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
102 | isa = PBXGroup;
103 | children = (
104 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
105 | 5DCACB8F33CDC322A6C60F78 /* libPods-front_end.a */,
106 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-front_end-front_endTests.a */,
107 | );
108 | name = Frameworks;
109 | sourceTree = "";
110 | };
111 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
112 | isa = PBXGroup;
113 | children = (
114 | );
115 | name = Libraries;
116 | sourceTree = "";
117 | };
118 | 83CBB9F61A601CBA00E9B192 = {
119 | isa = PBXGroup;
120 | children = (
121 | 13B07FAE1A68108700A75B9A /* front_end */,
122 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
123 | 00E356EF1AD99517003FC87E /* front_endTests */,
124 | 83CBBA001A601CBA00E9B192 /* Products */,
125 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
126 | BBD78D7AC51CEA395F1C20DB /* Pods */,
127 | );
128 | indentWidth = 2;
129 | sourceTree = "";
130 | tabWidth = 2;
131 | usesTabs = 0;
132 | };
133 | 83CBBA001A601CBA00E9B192 /* Products */ = {
134 | isa = PBXGroup;
135 | children = (
136 | 13B07F961A680F5B00A75B9A /* front_end.app */,
137 | 00E356EE1AD99517003FC87E /* front_endTests.xctest */,
138 | );
139 | name = Products;
140 | sourceTree = "";
141 | };
142 | BBD78D7AC51CEA395F1C20DB /* Pods */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 3B4392A12AC88292D35C810B /* Pods-front_end.debug.xcconfig */,
146 | 5709B34CF0A7D63546082F79 /* Pods-front_end.release.xcconfig */,
147 | 5B7EB9410499542E8C5724F5 /* Pods-front_end-front_endTests.debug.xcconfig */,
148 | 89C6BE57DB24E9ADA2F236DE /* Pods-front_end-front_endTests.release.xcconfig */,
149 | );
150 | path = Pods;
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | 00E356ED1AD99517003FC87E /* front_endTests */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "front_endTests" */;
159 | buildPhases = (
160 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
161 | 00E356EA1AD99517003FC87E /* Sources */,
162 | 00E356EB1AD99517003FC87E /* Frameworks */,
163 | 00E356EC1AD99517003FC87E /* Resources */,
164 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
165 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
166 | );
167 | buildRules = (
168 | );
169 | dependencies = (
170 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
171 | );
172 | name = front_endTests;
173 | productName = front_endTests;
174 | productReference = 00E356EE1AD99517003FC87E /* front_endTests.xctest */;
175 | productType = "com.apple.product-type.bundle.unit-test";
176 | };
177 | 13B07F861A680F5B00A75B9A /* front_end */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "front_end" */;
180 | buildPhases = (
181 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
182 | 13B07F871A680F5B00A75B9A /* Sources */,
183 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
184 | 13B07F8E1A680F5B00A75B9A /* Resources */,
185 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
186 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
187 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
188 | );
189 | buildRules = (
190 | );
191 | dependencies = (
192 | );
193 | name = front_end;
194 | productName = front_end;
195 | productReference = 13B07F961A680F5B00A75B9A /* front_end.app */;
196 | productType = "com.apple.product-type.application";
197 | };
198 | /* End PBXNativeTarget section */
199 |
200 | /* Begin PBXProject section */
201 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
202 | isa = PBXProject;
203 | attributes = {
204 | LastUpgradeCheck = 1210;
205 | TargetAttributes = {
206 | 00E356ED1AD99517003FC87E = {
207 | CreatedOnToolsVersion = 6.2;
208 | TestTargetID = 13B07F861A680F5B00A75B9A;
209 | };
210 | 13B07F861A680F5B00A75B9A = {
211 | LastSwiftMigration = 1120;
212 | };
213 | };
214 | };
215 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "front_end" */;
216 | compatibilityVersion = "Xcode 12.0";
217 | developmentRegion = en;
218 | hasScannedForEncodings = 0;
219 | knownRegions = (
220 | en,
221 | Base,
222 | );
223 | mainGroup = 83CBB9F61A601CBA00E9B192;
224 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
225 | projectDirPath = "";
226 | projectRoot = "";
227 | targets = (
228 | 13B07F861A680F5B00A75B9A /* front_end */,
229 | 00E356ED1AD99517003FC87E /* front_endTests */,
230 | );
231 | };
232 | /* End PBXProject section */
233 |
234 | /* Begin PBXResourcesBuildPhase section */
235 | 00E356EC1AD99517003FC87E /* Resources */ = {
236 | isa = PBXResourcesBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
243 | isa = PBXResourcesBuildPhase;
244 | buildActionMask = 2147483647;
245 | files = (
246 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
247 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | };
251 | /* End PBXResourcesBuildPhase section */
252 |
253 | /* Begin PBXShellScriptBuildPhase section */
254 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
255 | isa = PBXShellScriptBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | );
259 | inputPaths = (
260 | "$(SRCROOT)/.xcode.env.local",
261 | "$(SRCROOT)/.xcode.env",
262 | );
263 | name = "Bundle React Native code and images";
264 | outputPaths = (
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | shellPath = /bin/sh;
268 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
269 | };
270 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
271 | isa = PBXShellScriptBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | );
275 | inputFileListPaths = (
276 | "${PODS_ROOT}/Target Support Files/Pods-front_end/Pods-front_end-frameworks-${CONFIGURATION}-input-files.xcfilelist",
277 | );
278 | name = "[CP] Embed Pods Frameworks";
279 | outputFileListPaths = (
280 | "${PODS_ROOT}/Target Support Files/Pods-front_end/Pods-front_end-frameworks-${CONFIGURATION}-output-files.xcfilelist",
281 | );
282 | runOnlyForDeploymentPostprocessing = 0;
283 | shellPath = /bin/sh;
284 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-front_end/Pods-front_end-frameworks.sh\"\n";
285 | showEnvVarsInLog = 0;
286 | };
287 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
288 | isa = PBXShellScriptBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | );
292 | inputFileListPaths = (
293 | );
294 | inputPaths = (
295 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
296 | "${PODS_ROOT}/Manifest.lock",
297 | );
298 | name = "[CP] Check Pods Manifest.lock";
299 | outputFileListPaths = (
300 | );
301 | outputPaths = (
302 | "$(DERIVED_FILE_DIR)/Pods-front_end-front_endTests-checkManifestLockResult.txt",
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | shellPath = /bin/sh;
306 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
307 | showEnvVarsInLog = 0;
308 | };
309 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
310 | isa = PBXShellScriptBuildPhase;
311 | buildActionMask = 2147483647;
312 | files = (
313 | );
314 | inputFileListPaths = (
315 | );
316 | inputPaths = (
317 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
318 | "${PODS_ROOT}/Manifest.lock",
319 | );
320 | name = "[CP] Check Pods Manifest.lock";
321 | outputFileListPaths = (
322 | );
323 | outputPaths = (
324 | "$(DERIVED_FILE_DIR)/Pods-front_end-checkManifestLockResult.txt",
325 | );
326 | runOnlyForDeploymentPostprocessing = 0;
327 | shellPath = /bin/sh;
328 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
329 | showEnvVarsInLog = 0;
330 | };
331 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
332 | isa = PBXShellScriptBuildPhase;
333 | buildActionMask = 2147483647;
334 | files = (
335 | );
336 | inputFileListPaths = (
337 | "${PODS_ROOT}/Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
338 | );
339 | name = "[CP] Embed Pods Frameworks";
340 | outputFileListPaths = (
341 | "${PODS_ROOT}/Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
342 | );
343 | runOnlyForDeploymentPostprocessing = 0;
344 | shellPath = /bin/sh;
345 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests-frameworks.sh\"\n";
346 | showEnvVarsInLog = 0;
347 | };
348 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
349 | isa = PBXShellScriptBuildPhase;
350 | buildActionMask = 2147483647;
351 | files = (
352 | );
353 | inputFileListPaths = (
354 | "${PODS_ROOT}/Target Support Files/Pods-front_end/Pods-front_end-resources-${CONFIGURATION}-input-files.xcfilelist",
355 | );
356 | name = "[CP] Copy Pods Resources";
357 | outputFileListPaths = (
358 | "${PODS_ROOT}/Target Support Files/Pods-front_end/Pods-front_end-resources-${CONFIGURATION}-output-files.xcfilelist",
359 | );
360 | runOnlyForDeploymentPostprocessing = 0;
361 | shellPath = /bin/sh;
362 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-front_end/Pods-front_end-resources.sh\"\n";
363 | showEnvVarsInLog = 0;
364 | };
365 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
366 | isa = PBXShellScriptBuildPhase;
367 | buildActionMask = 2147483647;
368 | files = (
369 | );
370 | inputFileListPaths = (
371 | "${PODS_ROOT}/Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests-resources-${CONFIGURATION}-input-files.xcfilelist",
372 | );
373 | name = "[CP] Copy Pods Resources";
374 | outputFileListPaths = (
375 | "${PODS_ROOT}/Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests-resources-${CONFIGURATION}-output-files.xcfilelist",
376 | );
377 | runOnlyForDeploymentPostprocessing = 0;
378 | shellPath = /bin/sh;
379 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-front_end-front_endTests/Pods-front_end-front_endTests-resources.sh\"\n";
380 | showEnvVarsInLog = 0;
381 | };
382 | /* End PBXShellScriptBuildPhase section */
383 |
384 | /* Begin PBXSourcesBuildPhase section */
385 | 00E356EA1AD99517003FC87E /* Sources */ = {
386 | isa = PBXSourcesBuildPhase;
387 | buildActionMask = 2147483647;
388 | files = (
389 | 00E356F31AD99517003FC87E /* front_endTests.m in Sources */,
390 | );
391 | runOnlyForDeploymentPostprocessing = 0;
392 | };
393 | 13B07F871A680F5B00A75B9A /* Sources */ = {
394 | isa = PBXSourcesBuildPhase;
395 | buildActionMask = 2147483647;
396 | files = (
397 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
398 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
399 | );
400 | runOnlyForDeploymentPostprocessing = 0;
401 | };
402 | /* End PBXSourcesBuildPhase section */
403 |
404 | /* Begin PBXTargetDependency section */
405 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
406 | isa = PBXTargetDependency;
407 | target = 13B07F861A680F5B00A75B9A /* front_end */;
408 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
409 | };
410 | /* End PBXTargetDependency section */
411 |
412 | /* Begin XCBuildConfiguration section */
413 | 00E356F61AD99517003FC87E /* Debug */ = {
414 | isa = XCBuildConfiguration;
415 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-front_end-front_endTests.debug.xcconfig */;
416 | buildSettings = {
417 | BUNDLE_LOADER = "$(TEST_HOST)";
418 | GCC_PREPROCESSOR_DEFINITIONS = (
419 | "DEBUG=1",
420 | "$(inherited)",
421 | );
422 | INFOPLIST_FILE = front_endTests/Info.plist;
423 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
424 | LD_RUNPATH_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "@executable_path/Frameworks",
427 | "@loader_path/Frameworks",
428 | );
429 | OTHER_LDFLAGS = (
430 | "-ObjC",
431 | "-lc++",
432 | "$(inherited)",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/front_end.app/front_end";
437 | };
438 | name = Debug;
439 | };
440 | 00E356F71AD99517003FC87E /* Release */ = {
441 | isa = XCBuildConfiguration;
442 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-front_end-front_endTests.release.xcconfig */;
443 | buildSettings = {
444 | BUNDLE_LOADER = "$(TEST_HOST)";
445 | COPY_PHASE_STRIP = NO;
446 | INFOPLIST_FILE = front_endTests/Info.plist;
447 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
448 | LD_RUNPATH_SEARCH_PATHS = (
449 | "$(inherited)",
450 | "@executable_path/Frameworks",
451 | "@loader_path/Frameworks",
452 | );
453 | OTHER_LDFLAGS = (
454 | "-ObjC",
455 | "-lc++",
456 | "$(inherited)",
457 | );
458 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
459 | PRODUCT_NAME = "$(TARGET_NAME)";
460 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/front_end.app/front_end";
461 | };
462 | name = Release;
463 | };
464 | 13B07F941A680F5B00A75B9A /* Debug */ = {
465 | isa = XCBuildConfiguration;
466 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-front_end.debug.xcconfig */;
467 | buildSettings = {
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
469 | CLANG_ENABLE_MODULES = YES;
470 | CURRENT_PROJECT_VERSION = 1;
471 | ENABLE_BITCODE = NO;
472 | INFOPLIST_FILE = front_end/Info.plist;
473 | LD_RUNPATH_SEARCH_PATHS = (
474 | "$(inherited)",
475 | "@executable_path/Frameworks",
476 | );
477 | MARKETING_VERSION = 1.0;
478 | OTHER_LDFLAGS = (
479 | "$(inherited)",
480 | "-ObjC",
481 | "-lc++",
482 | );
483 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
484 | PRODUCT_NAME = front_end;
485 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
486 | SWIFT_VERSION = 5.0;
487 | VERSIONING_SYSTEM = "apple-generic";
488 | };
489 | name = Debug;
490 | };
491 | 13B07F951A680F5B00A75B9A /* Release */ = {
492 | isa = XCBuildConfiguration;
493 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-front_end.release.xcconfig */;
494 | buildSettings = {
495 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496 | CLANG_ENABLE_MODULES = YES;
497 | CURRENT_PROJECT_VERSION = 1;
498 | INFOPLIST_FILE = front_end/Info.plist;
499 | LD_RUNPATH_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "@executable_path/Frameworks",
502 | );
503 | MARKETING_VERSION = 1.0;
504 | OTHER_LDFLAGS = (
505 | "$(inherited)",
506 | "-ObjC",
507 | "-lc++",
508 | );
509 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
510 | PRODUCT_NAME = front_end;
511 | SWIFT_VERSION = 5.0;
512 | VERSIONING_SYSTEM = "apple-generic";
513 | };
514 | name = Release;
515 | };
516 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
517 | isa = XCBuildConfiguration;
518 | buildSettings = {
519 | ALWAYS_SEARCH_USER_PATHS = NO;
520 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
521 | CLANG_CXX_LANGUAGE_STANDARD = "c++20";
522 | CLANG_CXX_LIBRARY = "libc++";
523 | CLANG_ENABLE_MODULES = YES;
524 | CLANG_ENABLE_OBJC_ARC = YES;
525 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
526 | CLANG_WARN_BOOL_CONVERSION = YES;
527 | CLANG_WARN_COMMA = YES;
528 | CLANG_WARN_CONSTANT_CONVERSION = YES;
529 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
530 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
531 | CLANG_WARN_EMPTY_BODY = YES;
532 | CLANG_WARN_ENUM_CONVERSION = YES;
533 | CLANG_WARN_INFINITE_RECURSION = YES;
534 | CLANG_WARN_INT_CONVERSION = YES;
535 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
536 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
537 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
538 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
539 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
540 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
541 | CLANG_WARN_STRICT_PROTOTYPES = YES;
542 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
543 | CLANG_WARN_UNREACHABLE_CODE = YES;
544 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
545 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
546 | COPY_PHASE_STRIP = NO;
547 | ENABLE_STRICT_OBJC_MSGSEND = YES;
548 | ENABLE_TESTABILITY = YES;
549 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
550 | GCC_C_LANGUAGE_STANDARD = gnu99;
551 | GCC_DYNAMIC_NO_PIC = NO;
552 | GCC_NO_COMMON_BLOCKS = YES;
553 | GCC_OPTIMIZATION_LEVEL = 0;
554 | GCC_PREPROCESSOR_DEFINITIONS = (
555 | "DEBUG=1",
556 | "$(inherited)",
557 | );
558 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
559 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
560 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
561 | GCC_WARN_UNDECLARED_SELECTOR = YES;
562 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
563 | GCC_WARN_UNUSED_FUNCTION = YES;
564 | GCC_WARN_UNUSED_VARIABLE = YES;
565 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
566 | LD_RUNPATH_SEARCH_PATHS = (
567 | /usr/lib/swift,
568 | "$(inherited)",
569 | );
570 | LIBRARY_SEARCH_PATHS = (
571 | "\"$(SDKROOT)/usr/lib/swift\"",
572 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
573 | "\"$(inherited)\"",
574 | );
575 | MTL_ENABLE_DEBUG_INFO = YES;
576 | ONLY_ACTIVE_ARCH = YES;
577 | OTHER_CPLUSPLUSFLAGS = (
578 | "$(OTHER_CFLAGS)",
579 | "-DFOLLY_NO_CONFIG",
580 | "-DFOLLY_MOBILE=1",
581 | "-DFOLLY_USE_LIBCPP=1",
582 | "-DFOLLY_CFG_NO_COROUTINES=1",
583 | "-DFOLLY_HAVE_CLOCK_GETTIME=1",
584 | );
585 | SDKROOT = iphoneos;
586 | };
587 | name = Debug;
588 | };
589 | 83CBBA211A601CBA00E9B192 /* Release */ = {
590 | isa = XCBuildConfiguration;
591 | buildSettings = {
592 | ALWAYS_SEARCH_USER_PATHS = NO;
593 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
594 | CLANG_CXX_LANGUAGE_STANDARD = "c++20";
595 | CLANG_CXX_LIBRARY = "libc++";
596 | CLANG_ENABLE_MODULES = YES;
597 | CLANG_ENABLE_OBJC_ARC = YES;
598 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
599 | CLANG_WARN_BOOL_CONVERSION = YES;
600 | CLANG_WARN_COMMA = YES;
601 | CLANG_WARN_CONSTANT_CONVERSION = YES;
602 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
603 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
604 | CLANG_WARN_EMPTY_BODY = YES;
605 | CLANG_WARN_ENUM_CONVERSION = YES;
606 | CLANG_WARN_INFINITE_RECURSION = YES;
607 | CLANG_WARN_INT_CONVERSION = YES;
608 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
609 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
610 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
611 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
612 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
613 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
614 | CLANG_WARN_STRICT_PROTOTYPES = YES;
615 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
616 | CLANG_WARN_UNREACHABLE_CODE = YES;
617 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
618 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
619 | COPY_PHASE_STRIP = YES;
620 | ENABLE_NS_ASSERTIONS = NO;
621 | ENABLE_STRICT_OBJC_MSGSEND = YES;
622 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
623 | GCC_C_LANGUAGE_STANDARD = gnu99;
624 | GCC_NO_COMMON_BLOCKS = YES;
625 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
626 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
627 | GCC_WARN_UNDECLARED_SELECTOR = YES;
628 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
629 | GCC_WARN_UNUSED_FUNCTION = YES;
630 | GCC_WARN_UNUSED_VARIABLE = YES;
631 | IPHONEOS_DEPLOYMENT_TARGET = 13.4;
632 | LD_RUNPATH_SEARCH_PATHS = (
633 | /usr/lib/swift,
634 | "$(inherited)",
635 | );
636 | LIBRARY_SEARCH_PATHS = (
637 | "\"$(SDKROOT)/usr/lib/swift\"",
638 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
639 | "\"$(inherited)\"",
640 | );
641 | MTL_ENABLE_DEBUG_INFO = NO;
642 | OTHER_CPLUSPLUSFLAGS = (
643 | "$(OTHER_CFLAGS)",
644 | "-DFOLLY_NO_CONFIG",
645 | "-DFOLLY_MOBILE=1",
646 | "-DFOLLY_USE_LIBCPP=1",
647 | "-DFOLLY_CFG_NO_COROUTINES=1",
648 | "-DFOLLY_HAVE_CLOCK_GETTIME=1",
649 | );
650 | SDKROOT = iphoneos;
651 | VALIDATE_PRODUCT = YES;
652 | };
653 | name = Release;
654 | };
655 | /* End XCBuildConfiguration section */
656 |
657 | /* Begin XCConfigurationList section */
658 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "front_endTests" */ = {
659 | isa = XCConfigurationList;
660 | buildConfigurations = (
661 | 00E356F61AD99517003FC87E /* Debug */,
662 | 00E356F71AD99517003FC87E /* Release */,
663 | );
664 | defaultConfigurationIsVisible = 0;
665 | defaultConfigurationName = Release;
666 | };
667 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "front_end" */ = {
668 | isa = XCConfigurationList;
669 | buildConfigurations = (
670 | 13B07F941A680F5B00A75B9A /* Debug */,
671 | 13B07F951A680F5B00A75B9A /* Release */,
672 | );
673 | defaultConfigurationIsVisible = 0;
674 | defaultConfigurationName = Release;
675 | };
676 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "front_end" */ = {
677 | isa = XCConfigurationList;
678 | buildConfigurations = (
679 | 83CBBA201A601CBA00E9B192 /* Debug */,
680 | 83CBBA211A601CBA00E9B192 /* Release */,
681 | );
682 | defaultConfigurationIsVisible = 0;
683 | defaultConfigurationName = Release;
684 | };
685 | /* End XCConfigurationList section */
686 | };
687 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
688 | }
689 |
--------------------------------------------------------------------------------
/frontend/ios/front_end.xcodeproj/xcshareddata/xcschemes/front_end.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"front_end";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | return [self bundleURL];
20 | }
21 |
22 | - (NSURL *)bundleURL
23 | {
24 | #if DEBUG
25 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
26 | #else
27 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
28 | #endif
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | front_end
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(CURRENT_PROJECT_VERSION)
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 |
30 | NSAllowsArbitraryLoads
31 |
32 | NSAllowsLocalNetworking
33 |
34 |
35 | NSLocationWhenInUseUsageDescription
36 |
37 | UILaunchStoryboardName
38 | LaunchScreen
39 | UIRequiredDeviceCapabilities
40 |
41 | arm64
42 |
43 | UISupportedInterfaceOrientations
44 |
45 | UIInterfaceOrientationPortrait
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 | UIViewControllerBasedStatusBarAppearance
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyCollectedDataTypes
6 |
7 |
8 | NSPrivacyAccessedAPITypes
9 |
10 |
11 | NSPrivacyAccessedAPIType
12 | NSPrivacyAccessedAPICategoryFileTimestamp
13 | NSPrivacyAccessedAPITypeReasons
14 |
15 | C617.1
16 |
17 |
18 |
19 | NSPrivacyAccessedAPIType
20 | NSPrivacyAccessedAPICategoryUserDefaults
21 | NSPrivacyAccessedAPITypeReasons
22 |
23 | CA92.1
24 |
25 |
26 |
27 | NSPrivacyAccessedAPIType
28 | NSPrivacyAccessedAPICategorySystemBootTime
29 | NSPrivacyAccessedAPITypeReasons
30 |
31 | 35F9.1
32 |
33 |
34 |
35 | NSPrivacyTracking
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/frontend/ios/front_end/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/frontend/ios/front_endTests/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 |
--------------------------------------------------------------------------------
/frontend/ios/front_endTests/front_endTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface front_endTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation front_endTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/frontend/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'react-native',
3 | };
4 |
--------------------------------------------------------------------------------
/frontend/metro.config.js:
--------------------------------------------------------------------------------
1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2 |
3 | /**
4 | * Metro configuration
5 | * https://reactnative.dev/docs/metro
6 | *
7 | * @type {import('metro-config').MetroConfig}
8 | */
9 | const config = {};
10 |
11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
12 |
--------------------------------------------------------------------------------
/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "front_end",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest"
11 | },
12 | "dependencies": {
13 | "@react-native-async-storage/async-storage": "^1.23.1",
14 | "@react-navigation/bottom-tabs": "^6.6.0",
15 | "@react-navigation/native": "^6.1.17",
16 | "@react-navigation/native-stack": "^6.10.0",
17 | "@react-navigation/stack": "^6.4.0",
18 | "@reduxjs/toolkit": "^2.2.6",
19 | "nativewind": "^2.0.11",
20 | "react": "18.2.0",
21 | "react-native": "0.74.3",
22 | "react-native-gesture-handler": "^2.17.1",
23 | "react-native-linear-gradient": "^2.8.3",
24 | "react-native-onboarding-swiper": "^1.2.0",
25 | "react-native-ratings": "^8.1.0",
26 | "react-native-reanimated": "^3.12.1",
27 | "react-native-safe-area-context": "^4.10.7",
28 | "react-native-screens": "^3.32.0",
29 | "react-native-splash-screen": "^3.3.0",
30 | "react-native-webview": "^13.10.5",
31 | "react-redux": "^9.1.2"
32 | },
33 | "devDependencies": {
34 | "@babel/core": "^7.20.0",
35 | "@babel/preset-env": "^7.20.0",
36 | "@babel/runtime": "^7.20.0",
37 | "@react-native/babel-preset": "0.74.85",
38 | "@react-native/eslint-config": "0.74.85",
39 | "@react-native/metro-config": "0.74.85",
40 | "@react-native/typescript-config": "0.74.85",
41 | "@types/react": "^18.2.6",
42 | "@types/react-native-onboarding-swiper": "^1.1.9",
43 | "@types/react-test-renderer": "^18.0.0",
44 | "babel-jest": "^29.6.3",
45 | "eslint": "^8.19.0",
46 | "jest": "^29.6.3",
47 | "prettier": "2.8.8",
48 | "react-test-renderer": "18.2.0",
49 | "tailwindcss": "^3.3.2",
50 | "typescript": "5.0.4"
51 | },
52 | "engines": {
53 | "node": ">=18"
54 | },
55 | "packageManager": "yarn@3.6.4"
56 | }
57 |
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-Black.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-Bold.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-ExtraBold.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-ExtraLight.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-Light.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-Medium.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-Regular.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-SemiBold.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/Poppins-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/Poppins-Thin.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/fonts/SpaceMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/fonts/SpaceMono-Regular.ttf
--------------------------------------------------------------------------------
/frontend/src/assets/icons/apple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/apple.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/arrow_right.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/but_now.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/but_now.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/buy.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/calender.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/calender.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/card.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/cart_circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/cart_circle.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/components.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/components.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/eye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/eye.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/eye_hide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/eye_hide.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/facebook.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/filter.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/google.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/heart.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/home.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/lock.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/mail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/mail.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/menu.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/mic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/mic.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/offer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/offer.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/pen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/pen.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/profile.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/profile_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/profile_edit.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/search.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/setting.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/show_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/show_all.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/sort.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/icons/sort.png
--------------------------------------------------------------------------------
/frontend/src/assets/icons/user.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/frontend/src/assets/images/Cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/Cover.jpg
--------------------------------------------------------------------------------
/frontend/src/assets/images/deal_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/deal_off.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/flat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/flat.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/get_started.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/get_started.jpg
--------------------------------------------------------------------------------
/frontend/src/assets/images/getstarted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/getstarted.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/hot_summer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/hot_summer.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/logo.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/spash_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/spash_1.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/spash_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/spash_2.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/spash_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/spash_3.png
--------------------------------------------------------------------------------
/frontend/src/assets/images/sponserd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Abdullah0Dev/stylish/7173061c54226e73d51b09cb4c2fd317a45b3570/frontend/src/assets/images/sponserd.png
--------------------------------------------------------------------------------
/frontend/src/components/CustomButton.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text, TouchableOpacity, ActivityIndicator} from 'react-native';
2 | import React from 'react';
3 |
4 | type CustomButtonProps = {
5 | title: string;
6 | handlePress: () => void;
7 | containerStyle?: string;
8 | testStyles?: string;
9 | isLoading?: boolean;
10 | textStyle?: string;
11 | };
12 |
13 | const CustomButton: React.FC = ({
14 | title,
15 | handlePress,
16 | containerStyle,
17 | testStyles,
18 | isLoading,
19 | textStyle,
20 | }) => {
21 | return (
22 |
29 |
30 | {title}
31 |
32 | {isLoading && (
33 |
38 | )}
39 |
40 | );
41 | };
42 |
43 | export default CustomButton;
44 |
--------------------------------------------------------------------------------
/frontend/src/components/CustomSearch.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | TouchableOpacity,
5 | Image,
6 | TextInput,
7 | Alert,
8 | } from 'react-native';
9 | import React, {useState} from 'react';
10 | import {icons} from '../constants';
11 | import {RouteProp, useNavigation, useRoute} from '@react-navigation/native';
12 | import {StackNavigationProp} from '@react-navigation/stack';
13 |
14 | type CustomSearchProps = {
15 | placeholder?: string;
16 | initialQuery: string;
17 | };
18 |
19 | type ScreenNavigationProps = StackNavigationProp;
20 | type ScreenRouteProps = RouteProp;
21 |
22 | type RootStackParamList = {
23 | Search: {query: string} | undefined;
24 | };
25 | const CustomSearch: React.FC = ({
26 | placeholder,
27 | initialQuery,
28 | }) => {
29 | const navigation = useNavigation();
30 | const route = useRoute();
31 | const [query, setQuery] = useState('' || initialQuery);
32 | const handlePress = () => {
33 | if (query === '') {
34 | return Alert.alert('Please fill the required field');
35 | } else {
36 | navigation.navigate('Search', {query});
37 | setQuery('');
38 | }
39 | };
40 |
41 | return (
42 |
43 |
44 |
45 |
50 |
51 | setQuery(e)}
55 | className="text-[#BBBBBB] flex-1 text-lg font-pregular bg-white"
56 | placeholderTextColor={'#BBBBBB'}
57 | onSubmitEditing={handlePress}
58 | />
59 |
60 |
61 |
62 | );
63 | };
64 |
65 | export default CustomSearch;
66 |
--------------------------------------------------------------------------------
/frontend/src/components/CustomWrapper.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text, FlatList} from 'react-native';
2 | import React from 'react';
3 | interface CustomWrapperProps {
4 | children: React.ReactNode;
5 | }
6 | const CustomWrapper: React.FC = ({children}) => {
7 | return (
8 | {children}}
11 | keyExtractor={item => item.key}
12 | />
13 | );
14 | };
15 |
16 | export default CustomWrapper;
17 |
--------------------------------------------------------------------------------
/frontend/src/components/DetailsItem.tsx:
--------------------------------------------------------------------------------
1 | import {useNavigation} from '@react-navigation/native';
2 | import {StackNavigationProp} from '@react-navigation/stack';
3 | import React, {useState} from 'react';
4 | import {Text, TextInput, TouchableOpacity, View} from 'react-native';
5 | interface DetailsItemProps {
6 | title: string;
7 | placeholder: string;
8 | }
9 | type RootStackParamList = {
10 | ForgotPassword: undefined;
11 | Signup: undefined;
12 | };
13 | const DetailsItem: React.FC = ({title, placeholder}) => {
14 | const navigation = useNavigation>();
15 |
16 | const [changes, setChanges] = useState('');
17 | const [showPassword, setShowPassword] = useState(false);
18 | const handleForgotPassword = () => {
19 | navigation.navigate('ForgotPassword');
20 | };
21 |
22 | return (
23 |
24 | {title}
25 |
26 | setChanges(e)}
31 | value={changes}
32 | secureTextEntry={title === 'Password' && !showPassword} // hide it if it's the password... | set showpassword to false
33 | />
34 | {title === 'Password' && (
35 |
36 |
37 | Forgot Password?
38 |
39 |
40 | )}
41 |
42 |
43 | );
44 | };
45 |
46 | export default DetailsItem;
47 |
--------------------------------------------------------------------------------
/frontend/src/components/FormField.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | Animated,
5 | Image,
6 | TextInput,
7 | TouchableOpacity,
8 | Easing,
9 | } from 'react-native';
10 | import React, {useEffect, useState} from 'react';
11 | import {icons} from '../constants';
12 |
13 | type FormFieldProps = {
14 | title: string;
15 | value: string;
16 | placeholder: string;
17 | handleChangeText: (text: string) => void;
18 | otherStyles?: string;
19 | setError?: (error: string) => void;
20 | error: string;
21 | [key: string]: any; // add more props ...props
22 | };
23 | // make reusable components to make our code clean
24 | const FormField: React.FC = ({
25 | title,
26 | value,
27 | placeholder,
28 | handleChangeText,
29 | otherStyles,
30 | setError,
31 | error,
32 | ...props
33 | }) => {
34 | // states
35 | const [showPassword, setShowPassword] = useState(false);
36 | const [shakeAnimation] = useState(new Animated.Value(0));
37 | // let's handle the error
38 | const shake = () => {
39 | shakeAnimation.setValue(0);
40 | Animated.timing(shakeAnimation, {
41 | toValue: 4,
42 | duration: 400,
43 | useNativeDriver: true,
44 | easing: Easing.bounce,
45 | }).start(() => {
46 | // clear the animation after a period of time
47 | setTimeout(() => {
48 | setError?.(''); // hide the error
49 | }, 3000);
50 | });
51 | };
52 | // if error shake
53 | useEffect(() => {
54 | if (error) {
55 | shake();
56 | }
57 | }, [error]);
58 |
59 | // get Icon source
60 | const getIconSource = () => {
61 | if (title === 'Password') return icons.lock;
62 | if (title === 'Email') return icons.mail;
63 | return icons.user; //default one!
64 | };
65 |
66 | return (
67 |
68 |
75 | outputRange: [0, -10, 10, -10, 0],
76 | }),
77 | },
78 | ],
79 | }}
80 | // let's continue styling it:)
81 | className={`flex flex-row items-center justify-center rounded-xl w-full h-[72px] px-4 bg-[#F3F3F3] border-2 border-[#A8A8A9] focus:border-black-200 ${
82 | error ? 'border border-red-600 ' : ''
83 | } `}>
84 | {/* icon => user icon, or password, or email... */}
85 |
90 | {/* TextInput */}
91 | error && shake()}
99 | {...props}
100 | />
101 | {/* eye switch when it's a password */}
102 |
103 | {title === 'Password' && (
104 | setShowPassword(!showPassword)}>
105 |
111 |
112 | )}
113 |
114 | {/* display the error here if there... */}
115 | {error && (
116 |
118 | {error}
119 |
120 | )}
121 |
122 | );
123 | };
124 |
125 | export default FormField;
126 |
--------------------------------------------------------------------------------
/frontend/src/components/ProductItem.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text, TouchableOpacity, Image} from 'react-native';
2 | import React from 'react';
3 | import {ItemDetails, ProductTypes} from '../constants/types';
4 | import {images} from '../constants';
5 | import {Rating, AirbnbRating} from 'react-native-ratings';
6 | import {useNavigation} from '@react-navigation/native';
7 | import {RootStackParamList} from '../screens/OnboardingScreen';
8 | import {StackNavigationProp} from '@react-navigation/stack';
9 | import {RouteStackParamList} from '../../App';
10 |
11 | type ProductItemProps = {
12 | image: string;
13 | title: string;
14 | description: string;
15 | price: number;
16 | priceBeforeDeal: number;
17 | priceOff: string;
18 | stars: number;
19 | numberOfReview: number;
20 | ukSide?: number[];
21 | itemDetails: ItemDetails;
22 | };
23 |
24 | const ProductItem: React.FC = ({
25 | image,
26 | title,
27 | description,
28 | price,
29 | priceBeforeDeal,
30 | priceOff,
31 | stars,
32 | numberOfReview,
33 | itemDetails,
34 | }) => {
35 | const navigation = useNavigation>();
36 | const NavigateToProductsDetails = () => {
37 | navigation.navigate('ProductDetails', {itemDetails});
38 | };
39 |
40 | return (
41 |
44 |
45 |
46 |
47 | {title}
48 |
49 |
50 | {description}
51 |
52 |
53 | {' '}
54 | ${price}{' '}
55 |
56 |
57 |
58 | {' '}
59 | {priceBeforeDeal}{' '}
60 |
61 | {priceOff}
62 |
63 |
64 |
65 |
72 |
73 |
74 |
75 | {' '}
76 | {numberOfReview}{' '}
77 |
78 |
79 |
80 |
81 | );
82 | };
83 |
84 | export default ProductItem;
85 |
--------------------------------------------------------------------------------
/frontend/src/components/index.ts:
--------------------------------------------------------------------------------
1 |
2 | import CustomButton from "./CustomButton";
3 | import FormField from "./FormField";
4 | import CustomSearch from "./CustomSearch";
5 | import ProductItem from "./ProductItem";
6 | import DetailsItem from "./DetailsItem";
7 | import CustomWrapper from "./CustomWrapper";
8 | // to import it from ./components directly...
9 | export {
10 | CustomButton,
11 | FormField,
12 | CustomSearch,
13 | ProductItem,
14 | DetailsItem,
15 | CustomWrapper
16 | }
--------------------------------------------------------------------------------
/frontend/src/constants/data.ts:
--------------------------------------------------------------------------------
1 | import icons from './icons';
2 | import images from './images';
3 | import {FeaturesTypes, ProductTypes, SplashTypes, TabBarTypes} from './types';
4 | // random number between 1 to 1000 :)
5 | const randomNumber = () => Math.floor(Math.random() * 1000) + 1;
6 | // set the random number to the URL
7 | const randomImage = (): string =>
8 | `https://picsum.photos/${Math.floor(Math.random() * 1000) + 1}/${
9 | Math.floor(Math.random() * 1000) + 1
10 | }`;
11 |
12 | const SplashData: SplashTypes[] = [
13 | {
14 | image: images.splash1,
15 | title: 'Choose Products',
16 | description:
17 | 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit.',
18 | },
19 | {
20 | image: images.splash2,
21 | title: 'Make Payment',
22 | description:
23 | 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit.',
24 | },
25 | {
26 | image: images.splash3,
27 | title: 'Get Your Order',
28 | description:
29 | 'Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit.',
30 | },
31 | ];
32 | const CategoriesData: FeaturesTypes[] = [
33 | {
34 | image: randomImage(),
35 | title: 'Beauty',
36 | },
37 | {
38 | image: randomImage(),
39 | title: 'Fashion',
40 | },
41 | {
42 | image: randomImage(),
43 | title: 'Kids',
44 | },
45 | {
46 | image: randomImage(),
47 | title: 'Mens',
48 | },
49 | {
50 | image: randomImage(),
51 | title: 'Womans',
52 | },
53 | ];
54 |
55 | // Random Title
56 | const titles = [
57 | 'Women Printed Kurta',
58 | 'HRX by Hrithik Roshan',
59 | "IWC Schaffhausen 2021 Pilot's Watch",
60 | 'Labbin White Sneakers',
61 | 'Black Winter Jacket',
62 | 'Mens Starry Printed Shirt',
63 | 'Black Dress',
64 | 'Pink Embroidered Dress',
65 | 'Realme 7',
66 | 'Black Jacket',
67 | 'D7200 Digital Camera',
68 | "Men's & Boys Formal Shoes",
69 | ];
70 |
71 | const randomTitle = (): string =>
72 | titles[Math.floor(Math.random() * titles.length)];
73 |
74 | const randomPrice = (): number =>
75 | parseFloat((Math.floor(Math.random() * 5000) + 500).toFixed(2));
76 |
77 | const randomPriceBeforeDeal = (): number =>
78 | parseFloat(
79 | (randomPrice() + (Math.floor(Math.random() * 1000) + 100)).toFixed(2),
80 | );
81 |
82 | const randomPriceOff = (price: number, priceBeforeDeal: number): string =>
83 | ((1 - price / priceBeforeDeal) * 100).toFixed(2);
84 |
85 | const randomStars = (): number => (Math.random() * 5);
86 |
87 | const randomNumberOfReview = (): number => Math.floor(Math.random() * 10000);
88 |
89 | const ProductData: ProductTypes[] = Array.from(
90 | {length: 15},
91 | (): ProductTypes => {
92 | const price = randomPrice();
93 | const priceBeforeDeal = randomPriceBeforeDeal();
94 | return {
95 | image: randomImage(),
96 | title: randomTitle(),
97 | description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
98 | price: price,
99 | priceBeforeDeal: priceBeforeDeal,
100 | priceOff: randomPriceOff(price, priceBeforeDeal),
101 | stars: randomStars(),
102 | numberOfReview: randomNumberOfReview(),
103 | };
104 | },
105 | );
106 | /**
107 |
108 | */
109 | // TabBar data
110 | const tabName = ['Home', 'Wishlist', 'Cart', 'Search', 'Setting'];
111 | const TabBarData: TabBarTypes[] = [
112 | {
113 | title: tabName[0],
114 | image: icons.home,
115 | link: tabName[0],
116 | inActiveColor: '#000000',
117 | activeColor: '#EB3030',
118 | },
119 | {
120 | title: tabName[1],
121 | image: icons.home,
122 | link: tabName[1],
123 | inActiveColor: '#000000',
124 | activeColor: '#EB3030',
125 | },
126 | {
127 | title: tabName[2],
128 | image: icons.home,
129 | link: tabName[2],
130 | inActiveColor: '#050404',
131 | activeColor: '#EB3030',
132 | inActiveBGColor: '#FFFFFF',
133 | activeBGColor: '#EB3030',
134 | },
135 | {
136 | title: tabName[3],
137 | image: icons.home,
138 | link: tabName[3],
139 | inActiveColor: '#000000',
140 | activeColor: '#EB3030',
141 | },
142 | {
143 | title: tabName[4],
144 | image: icons.home,
145 | link: tabName[4],
146 | inActiveColor: '#000000',
147 | activeColor: '#EB3030',
148 | },
149 | ];
150 |
151 | export {
152 | TabBarData,
153 | ProductData,
154 | CategoriesData,
155 | SplashData
156 | }
--------------------------------------------------------------------------------
/frontend/src/constants/icons.ts:
--------------------------------------------------------------------------------
1 | const eye = require('../assets/icons/eye.png');
2 | const eyeHide = require('../assets/icons/eye_hide.png');
3 | const next1 = require('../assets/icons/arrow_right.png');
4 | const buy_now = require('../assets/icons/but_now.png');
5 | const apple = require('../assets/icons/apple.png');
6 | const calender = require('../assets/icons/calender.png');
7 | const cart = require('../assets/icons/card.png');
8 | const facebook = require('../assets/icons/facebook.png');
9 | const filter = require('../assets/icons/filter.png');
10 | const google = require('../assets/icons/google.png');
11 | const heart = require('../assets/icons/heart.png');
12 | const home = require('../assets/icons/home.png');
13 | const lock = require('../assets/icons/lock.png');
14 | const mail = require('../assets/icons/mail.png');
15 | const menu = require('../assets/icons/menu.png');
16 | const mic = require('../assets/icons/mic.png');
17 | const offer = require('../assets/icons/offer.png');
18 | const profile = require('../assets/icons/profile_edit.png');
19 | const search = require('../assets/icons/search.png');
20 | const setting = require('../assets/icons/setting.png');
21 | const show_all = require('../assets/icons/show_all.png');
22 | const sort = require('../assets/icons/sort.png');
23 | const user = require('../assets/icons/user.svg');
24 | const cart_circle = require('../assets/icons/cart_circle.png');
25 | const buy = require('../assets/icons/buy.png');
26 | const components = require('../assets/icons/components.png');
27 | const pen = require('../assets/icons/pen.png');
28 |
29 | export default {
30 | eyeHide,
31 | pen,
32 | components,
33 | eye,
34 | cart_circle,
35 | buy,
36 | next1,
37 | buy_now,
38 | apple,
39 | calender,
40 | cart,
41 | facebook,
42 | filter,
43 | google,
44 | heart,
45 | home,
46 | lock,
47 | mail,
48 | menu,
49 | mic,
50 | offer,
51 | profile,
52 | search,
53 | setting,
54 | show_all,
55 | sort,
56 | user,
57 | };
58 |
--------------------------------------------------------------------------------
/frontend/src/constants/images.ts:
--------------------------------------------------------------------------------
1 | const cover = require('../assets/images/Cover.jpg');
2 | const deal_off = require('../assets/images/deal_off.png');
3 | const flat = require('../assets/images/flat.png');
4 | const get_started = require('../assets/images/getstarted.png');
5 | const hot_summer = require('../assets/images/hot_summer.png');
6 | const logo = require('../assets/images/logo.png');
7 | const splash1 = require('../assets/images/spash_1.png');
8 | const splash2 = require('../assets/images/spash_2.png');
9 | const splash3 = require('../assets/images/spash_3.png');
10 | const sponsored = require('../assets/images/sponserd.png');
11 | export default {
12 | cover,
13 | deal_off,
14 | flat,
15 | get_started,
16 | hot_summer,
17 | logo,
18 | splash1,
19 | splash2,
20 | splash3,
21 | sponsored,
22 | };
23 |
--------------------------------------------------------------------------------
/frontend/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | import images from "./images";
2 | import icons from "./icons";
3 |
4 |
5 |
6 | export {
7 | images,
8 | icons
9 | }
--------------------------------------------------------------------------------
/frontend/src/constants/types.ts:
--------------------------------------------------------------------------------
1 | import {ImageSourcePropType} from 'react-native';
2 |
3 | type SplashTypes = {
4 | image: ImageSourcePropType;
5 | title: string;
6 | description: string;
7 | };
8 |
9 | type FeaturesTypes = {
10 | image: string;
11 | title: string;
12 | };
13 | type ItemDetails = ProductTypes;
14 | type ProductTypes = {
15 | image: string[];
16 | status?: {
17 | icon?: string;
18 | name?: string;
19 | };
20 | _id: string;
21 | title: string;
22 | description: string;
23 | price: number;
24 | priceBeforeDeal: number;
25 | priceOff: string;
26 | stars: number;
27 | numberOfReview: number;
28 | ukSide?: string[] | number[];
29 | tags: string[];
30 | createdAt: string;
31 | updatedAt: string;
32 | __v: number;
33 | };
34 | type TabBarTypes = {
35 | title?: string;
36 | image: string;
37 | link: string;
38 | inActiveColor: string;
39 | activeColor: string;
40 | inActiveBGColor?: string;
41 | activeBGColor?: string;
42 | };
43 |
44 | export type {
45 | SplashTypes,
46 | FeaturesTypes,
47 | ProductTypes,
48 | TabBarTypes,
49 | ItemDetails,
50 | };
51 |
--------------------------------------------------------------------------------
/frontend/src/screens/CheckoutScreen.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 |
4 | type Props = {};
5 |
6 | const CheckoutScreen = (props: Props) => {
7 | return (
8 |
9 | CheckoutScreen
10 |
11 | );
12 | };
13 |
14 | export default CheckoutScreen;
15 |
--------------------------------------------------------------------------------
/frontend/src/screens/ForgotPasswordScreen.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 |
4 |
5 | type Props = {}
6 |
7 | const ForgotPasswordScreen = (props: Props) => {
8 | return (
9 |
10 | ForgotPasswordScreen
11 |
12 | );
13 | };
14 |
15 | export default ForgotPasswordScreen;
16 |
--------------------------------------------------------------------------------
/frontend/src/screens/GetStartedScreen.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text, ImageBackground} from 'react-native';
2 | import React from 'react';
3 | import {images} from '../constants';
4 | import {CustomButton} from '../components';
5 | import {useNavigation} from '@react-navigation/native';
6 | import {StackNavigationProp} from '@react-navigation/stack';
7 |
8 | type Props = {};
9 |
10 | const GetStartedScreen = (props: Props) => {
11 | const navigation = useNavigation>();
12 | type RootStackParamList = {
13 | HomeScreen: undefined;
14 | };
15 |
16 | const GetStarted = () => {
17 | navigation.navigate('HomeScreen');
18 | };
19 | return (
20 |
23 | {/* push it to bottom instead of a big margin */}
24 |
25 |
26 |
27 | You want Authentic, here you go!
28 |
29 |
30 | {' '}
31 | Find it here, buy it now!{' '}
32 |
33 |
34 |
39 |
40 |
41 | );
42 | };
43 |
44 | export default GetStartedScreen;
45 |
--------------------------------------------------------------------------------
/frontend/src/screens/HomeScreen.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
3 | import {HomeTab, WishlistTab, CartTab, SearchTab, SettingTab} from '../tabs';
4 | import {Image, Text, View} from 'react-native';
5 | import {icons} from '../constants';
6 | import { ItemDetails } from '../constants/types';
7 |
8 | type TabBarItemProps = {
9 | source: any; // Adjust type according to your image sources
10 | focused: boolean;
11 | cart?: boolean;
12 | name?: string;
13 | };
14 | const TabBarItem: React.FC = ({
15 | source,
16 | focused,
17 | cart,
18 | name,
19 | }) => {
20 | return (
21 |
27 |
41 |
49 |
50 | {!cart && (
51 |
54 | {name}
55 |
56 | )}
57 |
58 | );
59 | };
60 | type Props = {};
61 | export type RouteTabsParamList = {
62 | Home: undefined;
63 | Wishlist: undefined;
64 | Cart: {itemDetails: ItemDetails} | undefined;
65 | Search: {query: string} | undefined;
66 | Setting: undefined;
67 | };
68 | const HomeScreen = (props: Props) => {
69 | const Tab = createBottomTabNavigator();
70 |
71 | return (
72 |
94 | (
100 |
101 | ),
102 | }}
103 | />
104 | (
110 |
115 | ),
116 | }}
117 | />
118 |
119 | (
125 |
131 | ),
132 | }}
133 | />
134 |
135 | (
141 |
142 | ),
143 | }}
144 | />
145 | (
151 |
156 | ),
157 | }}
158 | />
159 |
160 | );
161 | };
162 |
163 | export default HomeScreen;
164 |
--------------------------------------------------------------------------------
/frontend/src/screens/LoginScreen.tsx:
--------------------------------------------------------------------------------
1 | import {useNavigation} from '@react-navigation/native';
2 | import {StackNavigationProp} from '@react-navigation/stack';
3 | import React, {useState} from 'react';
4 | import {
5 | Image,
6 | ImageSourcePropType,
7 | Text,
8 | TouchableOpacity,
9 | View,
10 | } from 'react-native';
11 | import {CustomButton, FormField} from '../components';
12 | import {icons} from '../constants';
13 |
14 | type Props = {};
15 |
16 | const LoginScreen = (props: Props) => {
17 | const navigation = useNavigation>();
18 | const [emailError, setEmailError] = useState('');
19 | const [passwordError, setPasswordError] = useState('');
20 | const [isSubmitting, setIsSubmitting] = useState(false);
21 | const [form, setForm] = useState({
22 | email: '',
23 | username: '',
24 | password: '',
25 | });
26 | type RootStackParamList = {
27 | ForgotPassword: undefined;
28 | Signup: undefined;
29 | };
30 | const handleForgotPassword = () => {
31 | navigation.navigate('ForgotPassword');
32 | };
33 |
34 | const handleLogin = () => {};
35 | const handleSignInWithProvider = () => {};
36 | const handleNavigateToSignUp = () => {
37 | navigation.navigate('Signup');
38 | };
39 | return (
40 |
41 |
42 | Welcome {'\n'} Back!
43 |
44 |
45 | {/* text input */}
46 | {
52 | setEmailError('');
53 | setForm({...form, email: e});
54 | }}
55 | placeholder="username or email"
56 | otherStyles="my-5"
57 | />
58 |
59 | {
65 | setPasswordError('');
66 | setForm({...form, password: e});
67 | }}
68 | placeholder="Password"
69 | otherStyles="mt-5"
70 | />
71 |
72 |
73 | Forgot Password?
74 |
75 |
76 |
77 | {/* submit btn */}
78 |
84 | {/* or continue with */}
85 |
86 |
87 | {' '}
88 | - OR Continue with -{' '}
89 |
90 |
91 | {ContinueWithData.map((item, index) => {
92 | return (
93 |
97 |
102 |
103 | );
104 | })}
105 |
106 |
107 | Create An Account
108 |
109 |
110 | Sign Up
111 |
112 |
113 |
114 |
115 |
116 |
117 | );
118 | };
119 |
120 | export default LoginScreen;
121 |
122 | type ContinueWithType = {
123 | image: ImageSourcePropType | undefined;
124 | id: number;
125 | name: string;
126 | };
127 |
128 | const ContinueWithData: ContinueWithType[] = [
129 | {
130 | id: 0,
131 | name: 'google',
132 | image: icons.google,
133 | },
134 | {
135 | id: 1,
136 | name: 'apple',
137 | image: icons.apple,
138 | },
139 | {
140 | id: 2,
141 | name: 'facebook',
142 | image: icons.facebook,
143 | },
144 | ];
145 |
--------------------------------------------------------------------------------
/frontend/src/screens/OnboardingScreen.tsx:
--------------------------------------------------------------------------------
1 | import { View, Text, Image } from 'react-native';
2 | import React from 'react';
3 | import Onboarding from 'react-native-onboarding-swiper';
4 | import { images } from '../constants';
5 | import { SplashData } from '../constants/data';
6 | import { useNavigation } from '@react-navigation/native';
7 | import { StackNavigationProp } from '@react-navigation/stack';
8 | import { setItem } from '../utils/AsyncStorage';
9 | import { RouteStackParamList } from '../../App';
10 |
11 | type Props = {};
12 | export type RootStackParamList = {
13 | Login: { id: number } | undefined;
14 |
15 | };
16 |
17 | const OnboardingScreen = (props: Props) => {
18 | const navigation = useNavigation>();
19 |
20 | const handleDone = async () => {
21 | await setItem('onboarded', 200);
22 | navigation.navigate('HomeScreen'); // on press will navigate to HomeScreen
23 | };
24 |
25 | return (
26 |
27 | ,
34 | title: SplashData[0].title,
35 | subtitle: SplashData[0].description,
36 | },
37 | {
38 | backgroundColor: '#fff',
39 | image: ,
40 | title: SplashData[1].title,
41 | subtitle: SplashData[1].description,
42 | },
43 | {
44 | backgroundColor: '#fff',
45 | image: ,
46 | title: SplashData[2].title,
47 | subtitle: SplashData[2].description,
48 | },
49 | ]}
50 | />
51 |
52 | );
53 | };
54 |
55 | export default OnboardingScreen;
56 |
--------------------------------------------------------------------------------
/frontend/src/screens/PlaceOrder.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 |
4 | type Props = {};
5 |
6 | const PlaceOrder = (props: Props) => {
7 | return (
8 |
9 | PlaceOrder
10 |
11 | );
12 | };
13 |
14 | export default PlaceOrder;
15 |
--------------------------------------------------------------------------------
/frontend/src/screens/ProductsDetailsScreen.tsx:
--------------------------------------------------------------------------------
1 | import {RouteProp, useNavigation} from '@react-navigation/native';
2 | import {StackNavigationProp} from '@react-navigation/stack';
3 | import React from 'react';
4 | import {
5 | FlatList,
6 | Image,
7 | ImageSourcePropType,
8 | ScrollView,
9 | Text,
10 | TouchableOpacity,
11 | View,
12 | } from 'react-native';
13 | import {AirbnbRating} from 'react-native-ratings';
14 | import {RouteStackParamList} from '../../App';
15 | import {icons} from '../constants';
16 | import {RouteTabsParamList} from './HomeScreen';
17 | import LinearGradient from 'react-native-linear-gradient';
18 | import {FeaturesData} from '../tabs/HomeTab';
19 | import {ProductItem} from '../components';
20 | import {ProductData} from '../constants/data';
21 |
22 | type ScreenRouteProps = RouteProp;
23 |
24 | type ProductDetailsProps = {
25 | route: ScreenRouteProps;
26 | };
27 |
28 | const ProductsDetailsScreen: React.FC = ({route}) => {
29 | const {itemDetails} = route.params || {};
30 | const navigation =
31 | useNavigation>();
32 |
33 | const GoBack = () => {
34 | navigation.goBack();
35 | };
36 | const NavigateToCart = () => {
37 | navigation.navigate('Cart', {itemDetails: itemDetails!});
38 | };
39 | return (
40 |
41 | {/* header */}
42 |
43 |
44 |
49 |
50 |
51 |
52 |
53 |
54 | {/* image slider */}
55 |
56 |
60 |
61 | {/* size uk */}
62 |
63 | Size: 7UK
64 |
65 | {sizeData.map(item => (
66 |
69 |
70 | {item.size} uk{' '}
71 |
72 |
73 | ))}
74 |
75 |
76 | {/* details */}
77 |
78 |
79 | {' '}
80 | {itemDetails?.title}{' '}
81 |
82 |
83 | {' '}
84 | Vision Alta Men’s Shoes Size (All Colours){' '}
85 |
86 |
87 |
88 |
95 |
96 |
97 |
98 | {' '}
99 | {itemDetails?.numberOfReview}{' '}
100 |
101 |
102 |
103 |
104 | {' '}
105 | ${itemDetails?.price}{' '}
106 |
107 |
108 | {' '}
109 | {itemDetails?.priceBeforeDeal}{' '}
110 |
111 |
112 | {' '}
113 | {itemDetails?.priceOff}{' '}
114 |
115 |
116 |
117 |
118 | Product Details
119 |
120 |
121 | {itemDetails?.description}
122 |
123 |
124 | {/* status */}
125 |
126 | (
129 |
130 |
135 |
136 | {' '}
137 | {item.name}{' '}
138 |
139 |
140 | )}
141 | horizontal
142 | showsHorizontalScrollIndicator={false}
143 | ItemSeparatorComponent={() => }
144 | />
145 |
146 | {/* go to cart/ buy now */}
147 |
148 |
149 |
150 |
155 |
156 |
157 |
158 | {' '}
159 | Go To Cart{' '}
160 |
161 |
162 |
163 |
164 |
165 |
170 |
171 |
172 |
173 | {' '}
174 | Go To Cart{' '}
175 |
176 |
177 |
178 |
179 | {/* delivery in ... */}
180 |
181 | Delivery in
182 |
183 | 1 within Hour
184 |
185 |
186 | {/* View similar */}
187 |
188 | (
191 |
192 |
197 |
198 | {' '}
199 | {item.name}{' '}
200 |
201 |
202 | )}
203 | horizontal
204 | showsHorizontalScrollIndicator={false}
205 | ItemSeparatorComponent={() => }
206 | />
207 |
208 | {/* similar to */}
209 |
210 |
211 | Similar To
212 |
213 | {/* features */}
214 |
215 | 282+ Items
216 |
217 | {FeaturesData.map(item => (
218 |
221 | {item.title}
222 |
227 |
228 | ))}
229 |
230 |
231 |
232 | {/* similar products */}
233 |
234 | (
237 |
248 | )}
249 | horizontal
250 | showsHorizontalScrollIndicator={false}
251 | ItemSeparatorComponent={() => }
252 | ListFooterComponent={}
253 | ListHeaderComponent={}
254 | />
255 |
256 |
257 |
258 | );
259 | };
260 |
261 | export default ProductsDetailsScreen;
262 |
263 | interface similarDataType {
264 | icon: ImageSourcePropType;
265 | name: string;
266 | }
267 |
268 | const similarData: similarDataType[] = [
269 | {
270 | icon: icons.eye,
271 | name: 'View Similar',
272 | },
273 | {
274 | icon: icons.components,
275 | name: 'Add to Compare',
276 | },
277 | ];
278 |
279 | const sizeData = [
280 | {
281 | id: 0,
282 | size: 6,
283 | },
284 | {
285 | id: 1,
286 | size: 7,
287 | },
288 | {
289 | id: 2,
290 | size: 8,
291 | },
292 | {
293 | id: 3,
294 | size: 9,
295 | },
296 | {
297 | id: 4,
298 | size: 10,
299 | },
300 | ];
301 | interface StatusDataType {
302 | id: number;
303 | icon: ImageSourcePropType;
304 | name: string;
305 | }
306 |
307 | const StatusData: StatusDataType[] = [
308 | {
309 | id: 0,
310 | icon: icons.lock,
311 | name: 'Nearest Store',
312 | },
313 | {
314 | id: 1,
315 | icon: icons.lock,
316 | name: 'VIP',
317 | },
318 | {
319 | id: 2,
320 | icon: icons.lock,
321 | name: 'Return policy',
322 | },
323 | ];
324 |
--------------------------------------------------------------------------------
/frontend/src/screens/ProfileScreen.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 |
4 | type Props = {};
5 |
6 | const ProfileScreen = (props: Props) => {
7 | return (
8 |
9 | ProfileScreen
10 |
11 | );
12 | };
13 |
14 | export default ProfileScreen;
15 |
--------------------------------------------------------------------------------
/frontend/src/screens/SignupScreen.tsx:
--------------------------------------------------------------------------------
1 | import {useNavigation} from '@react-navigation/native';
2 | import {StackNavigationProp} from '@react-navigation/stack';
3 | import React, {useState} from 'react';
4 | import {
5 | Image,
6 | ImageSourcePropType,
7 | Text,
8 | TouchableOpacity,
9 | View,
10 | } from 'react-native';
11 | import {CustomButton, FormField} from '../components';
12 | import {icons} from '../constants';
13 |
14 | type Props = {};
15 | // let's go with get started first
16 | const SignupScreen = (props: Props) => {
17 | const navigation = useNavigation>();
18 | const [emailError, setEmailError] = useState('');
19 | const [passwordError, setPasswordError] = useState('');
20 | const [isSubmitting, setIsSubmitting] = useState(false);
21 | const [form, setForm] = useState({
22 | email: '',
23 | username: '',
24 | password: '',
25 | confirmPassword: '',
26 | });
27 | type RootStackParamList = {
28 | ForgotPassword: undefined;
29 | Login: undefined;
30 | };
31 | const handleForgotPassword = () => {
32 | navigation.navigate('ForgotPassword');
33 | };
34 |
35 | const handleLogin = () => {};
36 | const handleSignInWithProvider = () => {};
37 | const handleNavigateToLogin = () => {
38 | navigation.navigate('Login');
39 | };
40 | return (
41 |
42 |
43 | Create an
44 | {'\n'} account
45 |
46 |
47 | {/* text input */}
48 | {
54 | setEmailError('');
55 | setForm({...form, email: e});
56 | }}
57 | placeholder="username or email"
58 | otherStyles="my-5"
59 | />
60 |
61 | {
67 | setPasswordError('');
68 | setForm({...form, password: e});
69 | }}
70 | placeholder="Password"
71 | otherStyles="mt-5"
72 | />
73 | {
79 | setPasswordError('');
80 | setForm({...form, password: e});
81 | }}
82 | placeholder="ConfirmPassword"
83 | otherStyles="mt-5"
84 | />
85 |
86 |
87 | By clicking the Register{' '}
88 | button, you agree to the public offer
89 |
90 |
91 | {/* submit btn */}
92 |
98 | {/* or continue with */}
99 |
100 |
101 | {' '}
102 | - OR Continue with -{' '}
103 |
104 |
105 | {ContinueWithData.map((item, index) => {
106 | return (
107 |
111 |
116 |
117 | );
118 | })}
119 |
120 |
121 |
122 | I Already Have an Account
123 |
124 |
125 |
126 | Login
127 |
128 |
129 |
130 |
131 |
132 |
133 | );
134 | };
135 |
136 | export default SignupScreen;
137 |
138 | type ContinueWithType = {
139 | image: ImageSourcePropType | undefined;
140 | id: number;
141 | name: string;
142 | };
143 |
144 | const ContinueWithData: ContinueWithType[] = [
145 | {
146 | id: 0,
147 | name: 'google',
148 | image: icons.google,
149 | },
150 | {
151 | id: 1,
152 | name: 'apple',
153 | image: icons.apple,
154 | },
155 | {
156 | id: 2,
157 | name: 'facebook',
158 | image: icons.facebook,
159 | },
160 | ];
161 |
--------------------------------------------------------------------------------
/frontend/src/screens/index.ts:
--------------------------------------------------------------------------------
1 | import CheckoutScreen from './CheckoutScreen';
2 | import ForgotPasswordScreen from './ForgotPasswordScreen';
3 | import HomeScreen from './HomeScreen';
4 | import LoginScreen from './LoginScreen';
5 | import OnboardingScreen from './OnboardingScreen';
6 | import PlaceOrder from './PlaceOrder';
7 | import ProfileScreen from './ProfileScreen';
8 | import SignupScreen from './SignupScreen';
9 | import ProductsDetailsScreen from './ProductsDetailsScreen';
10 | export {
11 | CheckoutScreen,
12 | ForgotPasswordScreen,
13 | HomeScreen,
14 | LoginScreen,
15 | OnboardingScreen,
16 | PlaceOrder,
17 | ProfileScreen,
18 | SignupScreen,
19 | ProductsDetailsScreen
20 | };
21 |
--------------------------------------------------------------------------------
/frontend/src/tabs/CartTab.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 |
4 | type Props = {};
5 |
6 | const CartTab = (props: Props) => {
7 | return (
8 |
9 | CartTab
10 |
11 | );
12 | };
13 |
14 | export default CartTab;
15 |
--------------------------------------------------------------------------------
/frontend/src/tabs/HomeTab.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | Image,
5 | TouchableOpacity,
6 | FlatList,
7 | ScrollView,
8 | ImageSourcePropType,
9 | } from 'react-native';
10 | import React, {useEffect, useState} from 'react';
11 | import {icons, images} from '../constants';
12 | import {useNavigation} from '@react-navigation/native';
13 | import {StackNavigationProp} from '@react-navigation/stack';
14 | import {CustomSearch, ProductItem} from '../components';
15 | import {CategoriesData, ProductData} from '../constants/data';
16 | import {removeItem} from '../utils/AsyncStorage';
17 | import {ProductTypes} from '../constants/types';
18 |
19 | type Props = {};
20 |
21 | const HomeTab = (props: Props) => {
22 | const navigation = useNavigation>();
23 | type RootStackParamList = {
24 | Setting: undefined;
25 | };
26 | // real data
27 | const [products, setProducts] = useState([]);
28 | useEffect(() => {
29 | // fetch data
30 | const fetchData = async () => {
31 | const data = await fetch('http://10.0.2.2:4000/api/products/', {
32 | method: 'GET',
33 | headers: {
34 | 'Content-Type': 'application/json',
35 | Accept: 'application/json',
36 | },
37 | });
38 | const response = await data.json();
39 | console.log(response);
40 | setProducts(response);
41 | };
42 | fetchData();
43 | }, [products]); // update when products items updated
44 |
45 | const NavigateToProfile = async () => {
46 | navigation.navigate('Setting');
47 | await removeItem('onboarded'); // will reset to onboarding
48 | };
49 | const handleSelectCategory = () => {};
50 | return (
51 |
52 | {/* header */}
53 |
54 |
55 |
56 |
61 |
62 |
67 |
68 |
69 | {/* search */}
70 |
71 | {/* features */}
72 |
73 | All Features
74 |
75 | {FeaturesData.map(item => (
76 |
79 | {item.title}
80 |
85 |
86 | ))}
87 |
88 |
89 | {/* categories */}
90 |
91 | (
94 |
95 |
99 |
100 | {' '}
101 | {item.title}{' '}
102 |
103 |
104 | )}
105 | horizontal
106 | showsHorizontalScrollIndicator={false}
107 | ItemSeparatorComponent={() => }
108 | ListFooterComponent={}
109 | ListHeaderComponent={}
110 | />
111 |
112 | {/* offer */}
113 |
114 |
119 |
120 | {/* daily .. */}
121 |
122 |
123 |
124 | Daily of the Day
125 |
126 |
127 |
132 |
133 | {' '}
134 | 22h 55m 20s remaining{' '}
135 |
136 |
137 |
138 |
139 | View all
140 |
145 |
146 |
147 | {/* Products */}
148 |
149 | (
152 |
163 | )}
164 | horizontal
165 | showsHorizontalScrollIndicator={false}
166 | ItemSeparatorComponent={() => }
167 | ListFooterComponent={}
168 | ListHeaderComponent={}
169 | />
170 |
171 | {/* special Offer */}
172 |
173 |
178 |
179 |
180 | Special Offers
181 |
182 |
183 | We make sure you get the offer you need at best prices
184 |
185 |
186 |
187 | {/* Flat Shoes Offer */}
188 |
189 |
194 |
195 | {/* Trending Products */}
196 |
197 |
198 |
199 | Daily of the Day
200 |
201 |
202 |
207 |
208 | {' '}
209 | 22h 55m 20s remaining{' '}
210 |
211 |
212 |
213 |
214 | View all
215 |
220 |
221 |
222 | {/* Products */}
223 |
224 | (
227 |
238 | )}
239 | horizontal
240 | showsHorizontalScrollIndicator={false}
241 | ItemSeparatorComponent={() => }
242 | ListFooterComponent={}
243 | ListHeaderComponent={}
244 | />
245 |
246 | {/* .... */}
247 |
248 | );
249 | };
250 |
251 | export default HomeTab;
252 |
253 | type FeaturesDataProps = {
254 | id: number;
255 | title: string;
256 | image: ImageSourcePropType;
257 | };
258 |
259 | export const FeaturesData: FeaturesDataProps[] = [
260 | {
261 | id: 1,
262 | title: 'Sort',
263 | image: icons.sort,
264 | },
265 | {
266 | id: 2,
267 | title: 'Filter',
268 | image: icons.filter,
269 | },
270 | ];
271 |
--------------------------------------------------------------------------------
/frontend/src/tabs/SearchTab.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 | import {RouteProp} from '@react-navigation/native';
4 |
5 | type Props = {};
6 | type RootStackParamList = {
7 | Search: {query: string} | undefined;
8 | };
9 | type ScreenRouteProps = RouteProp;
10 |
11 | interface SearchProps {
12 | route: ScreenRouteProps;
13 | }
14 |
15 | const SearchTab: React.FC = ({route}) => {
16 | const {query} = route.params || {}; // destructure the query from route
17 | return (
18 |
19 | SearchTab
20 | Search For {query}
21 |
22 | );
23 | };
24 |
25 | export default SearchTab;
26 |
--------------------------------------------------------------------------------
/frontend/src/tabs/SettingTab.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | View,
3 | Text,
4 | Image,
5 | TouchableOpacity,
6 | FlatList,
7 | ScrollView,
8 | } from 'react-native';
9 | import React, {useState} from 'react';
10 | import {icons} from '../constants';
11 | import {CustomButton, CustomWrapper, DetailsItem} from '../components';
12 | import {useNavigation} from '@react-navigation/native';
13 | import {StackNavigationProp} from '@react-navigation/stack';
14 | import {RouteStackParamList} from '../../App';
15 |
16 | type Props = {};
17 |
18 | const SettingTab = (props: Props) => {
19 | const navigation = useNavigation>();
20 | const [isSubmitting, setIsSubmitting] = useState(false);
21 |
22 | const handleLogin = () => {};
23 | const handleSignInWithProvider = () => {};
24 | const handleNavigateToSignUp = () => {
25 | navigation.navigate('Signup');
26 | };
27 | const handleEditPic = () => {};
28 | return (
29 |
30 |
31 | {/* image profile */}
32 |
33 |
34 |
37 |
38 |
39 |
40 | {/* Personal Details */}
41 |
42 |
43 | Personal Details
44 |
45 | (
48 |
49 | )}
50 | keyExtractor={item => item.id.toString()} // have to be in string format
51 | />
52 |
53 |
54 | {/* Business info */}
55 |
56 |
57 | Business Address Details
58 |
59 | (
62 |
63 | )}
64 | keyExtractor={item => item.id.toString()} // have to be in string format
65 | />
66 |
67 |
68 | {/* Bank Account Details */}
69 |
70 |
71 | Bank Account Details
72 |
73 | (
76 |
77 | )}
78 | keyExtractor={item => item.id.toString()} // have to be in string format
79 | />
80 |
81 | {/* save changes */}
82 |
88 |
89 |
90 | );
91 | };
92 |
93 | export default SettingTab;
94 |
95 | interface personalDetailsDataType {
96 | id: number;
97 | title: string;
98 | placeholder: string;
99 | }
100 |
101 | const personalDetailsData: personalDetailsDataType[] = [
102 | {
103 | id: 0,
104 | title: 'Email Address',
105 | placeholder: 'Email Address',
106 | },
107 | {
108 | id: 1,
109 | title: 'Password',
110 | placeholder: 'Password',
111 | },
112 | ];
113 |
114 | const businessData: personalDetailsDataType[] = [
115 | {
116 | id: 0,
117 | title: 'Pincode',
118 | placeholder: '450116',
119 | },
120 | {
121 | id: 1,
122 | title: 'Address',
123 | placeholder: " 216 St Paul's Rd, ",
124 | },
125 | {
126 | id: 2,
127 | title: 'City',
128 | placeholder: 'London',
129 | },
130 | {
131 | id: 3,
132 | title: 'State',
133 | placeholder: 'N1 2LL,',
134 | },
135 | {
136 | id: 4,
137 | title: 'Country',
138 | placeholder: 'United Kingdom',
139 | },
140 | ];
141 | const bankData: personalDetailsDataType[] = [
142 | {
143 | id: 0,
144 | title: 'Bank Account Number',
145 | placeholder: '204356XXXXXXX',
146 | },
147 | {
148 | id: 1,
149 | title: 'Account Holder’s Name',
150 | placeholder: 'Abhiraj Sisodiya',
151 | },
152 | {
153 | id: 2,
154 | title: 'IFSC Code',
155 | placeholder: 'SBIN00428',
156 | },
157 | ];
158 |
--------------------------------------------------------------------------------
/frontend/src/tabs/WishlistTab.tsx:
--------------------------------------------------------------------------------
1 | import {View, Text} from 'react-native';
2 | import React from 'react';
3 |
4 | type Props = {};
5 |
6 | const WishlistTab = (props: Props) => {
7 | return (
8 |
9 | WishlistTab
10 |
11 | );
12 | };
13 |
14 | export default WishlistTab;
15 |
--------------------------------------------------------------------------------
/frontend/src/tabs/index.ts:
--------------------------------------------------------------------------------
1 | import HomeTab from './HomeTab';
2 | import WishlistTab from './WishlistTab';
3 | import CartTab from './CartTab';
4 | import SearchTab from './SearchTab';
5 | import SettingTab from './SettingTab';
6 |
7 | export {HomeTab, WishlistTab , CartTab , SearchTab , SettingTab };
8 |
--------------------------------------------------------------------------------
/frontend/src/utils/AsyncStorage.ts:
--------------------------------------------------------------------------------
1 | import AsyncStorage from '@react-native-async-storage/async-storage';
2 |
3 | // value type
4 | type AsyncStorageValue = number | boolean | object | string | null;
5 |
6 | // stringify the value
7 | const stringifyValue = (value: AsyncStorageValue): string => {
8 | return typeof value === 'string' ? value : JSON.stringify(value);
9 | };
10 |
11 | // parse the value
12 | const parseValue = (value: string | null): AsyncStorageValue => {
13 | if (value === null) return null;
14 | try {
15 | return JSON.parse(value);
16 | } catch (error) {
17 | return value; // if failed to parse it..
18 | }
19 | };
20 |
21 | // SET item
22 | const setItem = async (key: string, value: AsyncStorageValue) => {
23 | try {
24 | const stringValue = stringifyValue(value);
25 | await AsyncStorage.setItem(key, stringValue);
26 | } catch (error) {
27 | console.log(`Couldn't store item:`, error);
28 | }
29 | };
30 |
31 | // GET item
32 | const getItem = async (key: string): Promise => {
33 | try {
34 | const value = await AsyncStorage.getItem(key);
35 | return parseValue(value);
36 | } catch (error) {
37 | console.log(`Couldn't retrieve the value:`, error);
38 | return null;
39 | }
40 | };
41 |
42 | // REMOVE item
43 | const removeItem = async (key: string): Promise => {
44 | try {
45 | await AsyncStorage.removeItem(key);
46 | } catch (error) {
47 | console.log(`Couldn't remove the value:`, error);
48 | }
49 | };
50 |
51 | export { setItem, getItem, removeItem };
52 |
--------------------------------------------------------------------------------
/frontend/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ["./App.{js,jsx,ts,tsx}", "./src/**/*.{js,jsx,ts,tsx}"],
4 | theme: {
5 | extend: {
6 | colors: {
7 | primary: "#FFFFFF",
8 | action: "#F83758",
9 | black: {
10 | 100: "#000",
11 | 200: "#C4C4C4",
12 | 300: "#F3F3F3",
13 | },
14 | background:{
15 | 100: "#FFFFFF",
16 | 100: "#F9F9F9",
17 | }
18 | },
19 | fontFamily: {
20 | pthin: ["Poppins-Thin", "sans-serif"],
21 | pextralight: ["Poppins-ExtraLight", "sans-serif"],
22 | plight: ["Poppins-Light", "sans-serif"],
23 | pregular: ["Poppins-Regular", "sans-serif"],
24 | pmedium: ["Poppins-Medium", "sans-serif"],
25 | psemibold: ["Poppins-SemiBold", "sans-serif"],
26 | pbold: ["Poppins-Bold", "sans-serif"],
27 | pextrabold: ["Poppins-ExtraBold", "sans-serif"],
28 | pblack: ["Poppins-Black", "sans-serif"],
29 | },
30 | },
31 | },
32 | plugins: [],
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/frontend/tailwindcss.d.ts:
--------------------------------------------------------------------------------
1 | ///
--------------------------------------------------------------------------------
/frontend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@react-native/typescript-config/tsconfig.json"
3 | }
4 |
--------------------------------------------------------------------------------