MrMischievousX / React-Native-EcoShop

Ecommerce app made with React-Native
3 stars 0 forks source link

Cannot run the demo #1

Open mary-ng5519 opened 2 years ago

mary-ng5519 commented 2 years ago

Dear, we love your work, please export and submit all the Realm severless functions so that we can experience your effort, Cheers,

MrMischievousX commented 2 years ago

Please try downloading the apk again from same link.

mary-ng5519 commented 2 years ago

Please try downloading the apk again from same link.

Dear, would u please attach the backend severless functions into the repo, we would like to evaluate to sourcebase over other technical stacks Cheers

MrMischievousX commented 2 years ago

I have added them in readme.

mary-ng5519 commented 2 years ago

I have added them in readme.

Dear, about the serverless stack, why you preferred Mongo's Realm over Google's Firebase stacks ?, have u ever considered making use the latest CSS-tooling integrations from the front-end industry, their team, partners and community size are 100K+ around the world Dear https://github.com/tailwindlabs/tailwindcss https://github.com/styled-components

MrMischievousX commented 2 years ago

I have worked with tailwind css and react styled-components in my past projects. In my opinion, these are very useful if you are working with react in building websites or some high-level production applications. As this was just a small project, I didn't feel the need to use them no doubt they are great but not much help in this project.

Hostelverse I used tailwind in this project which I did with my team as a part of a hackathon.

Now, in response to the first question, I chose Mongo's realm over Firebase since I had previously used Firebase and wanted to try something different this time, and when looking for a mobile database, I discovered MongoDB realm and the outstanding capabilities it offers. When working with data that has to be placed on the backend and local database immediately when it is updated, the realm data sync capability comes in handy. This project was part of our college assignment, and I finished it in only two days owing to the serverless functions that assisted me with the backend work.

You can find our ppt on realm here: here

If you are interested more about this project then check out our report on it: Ecoshop Report

mary-ng5519 commented 2 years ago

I have added them in readme.

How about Realm's rule set Dear, we just noticed that the sourcebase cannot be evaluated because of lacking of rule settings

 WARN  Possible Unhandled Promise Rejection (id: 0):
Object {
  "code": -1,
  "message": "no rule exists for namespace 'EcoShop.UserDB'",
}
MrMischievousX commented 2 years ago

How are you evaluating the sourcebase ? also, how are you running those functions?
You will need an admin credential to make changes in userDB try other functions with this credential, email: tempuser@gmail.com password: temp@user

mary-ng5519 commented 2 years ago

Dear, i tried signUp function but the console keep warning that message, how do u define REALM DATA-ACCESS'S RULES for that name space 'EchoShop.UserDB'. Would u please export current RULE set (json-based format) for this REALM app

image

In Mongo Platform, does it support permission feature for other gmail users to access the backend for configuration supports ?

MrMischievousX commented 2 years ago
{
  "roles": [
    {
      "name": "default",
      "apply_when": {},
      "insert": true,
      "delete": true,
      "search": true,
      "write": true,
      "fields": {},
      "additional_fields": {}
    }
  ],
  "filters": []
} 
Screenshot 2022-04-18 at 10 08 27 PM Screenshot 2022-04-18 at 10 08 41 PM

Try running it with system user.

Only system user are allowed to insert or make changes to the database. Please provide your email so i can add you into the project for you to explore it in a better way there you can also check the settings or run functions easily.

Reach out me at LinkedIn so that we can discuss it in a better way.

mary-ng5519 commented 2 years ago

Dear, why you add an extra layer for user data pool instead of making use of the default built-in database for user data ? The result is there is no update in the built-in user database, only your DBUser added the new record when the app register a new user

image

MrMischievousX commented 2 years ago

I was getting some partition issues during the development process, but owing to the tight deadline, I didn't have much time to investigate more. So I utilised this way to do the task.

mary-ng5519 commented 2 years ago

Dear, then partition rules is another add-on scripting language from RealmDB ?

MrMischievousX commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

mary-ng5519 commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

Dear, how do u protect Back-end's API key in react-native apps ? because everything is bundled in js format

mary-ng5519 commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

Dear, about coding conduct, how do you resolve these warnings in next release ?

 WARN  Non-serializable values were found in the navigation state. Check:

ProductDetail > params.item._id.toHexString (Function)

This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.
BaseNavigationContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:128020:28
ThemeProvider@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133869:21
NavigationContainerInner@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133729:26
MainStackNavigator@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:112120:41
RCTView
View
RCTView
View
AppContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:78901:36
MrMischievousX commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

Dear, how do u protect Back-end's API key in react-native apps ? because everything is bundled in js format

here admin credentials are being used instead of api keys, i have used env for them not a very good approach but works for starters.

MrMischievousX commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

Dear, about coding conduct, how do you resolve these warnings in next release ?

 WARN  Non-serializable values were found in the navigation state. Check:

ProductDetail > params.item._id.toHexString (Function)

This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.
BaseNavigationContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:128020:28
ThemeProvider@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133869:21
NavigationContainerInner@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133729:26
MainStackNavigator@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:112120:41
RCTView
View
RCTView
View
AppContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:78901:36

Its fixed you can take pull if you want to check, initially i was passing whole object and later destructuring it which leads to unwanted data getting passed through the navigation state but now i am only passing values which are needed.

mary-ng5519 commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

Dear, about coding conduct, how do you resolve these warnings in next release ?

 WARN  Non-serializable values were found in the navigation state. Check:

ProductDetail > params.item._id.toHexString (Function)

This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.
BaseNavigationContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:128020:28
ThemeProvider@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133869:21
NavigationContainerInner@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133729:26
MainStackNavigator@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:112120:41
RCTView
View
RCTView
View
AppContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:78901:36

Its fixed you can take pull if you want to check, initially i was passing whole object and later destructuring it which leads to unwanted data getting passed through the navigation state but now i am only passing values which are needed.

Dear, how do u translate this project into webapp thanks to the support of react-native-web ? how to resolve navigation and in-app url issues

MrMischievousX commented 2 years ago

Its just a way how you distribute your database to users. There wasnt much need for it as this was just a static app with limited functionalities.

Dear, about coding conduct, how do you resolve these warnings in next release ?

 WARN  Non-serializable values were found in the navigation state. Check:

ProductDetail > params.item._id.toHexString (Function)

This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.
BaseNavigationContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:128020:28
ThemeProvider@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133869:21
NavigationContainerInner@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:133729:26
MainStackNavigator@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:112120:41
RCTView
View
RCTView
View
AppContainer@http://10.0.3.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.ecoshop&modulesOnly=false&runModule=true:78901:36

Its fixed you can take pull if you want to check, initially i was passing whole object and later destructuring it which leads to unwanted data getting passed through the navigation state but now i am only passing values which are needed.

Dear, how do u translate this project into webapp thanks to the support of react-native-web ? how to resolve navigation and in-app url issues

Latest react navigation will handle the navigation and in-app url. I read of react-navigation/web will be of use aswell, but not every package support react native web so its tough to say this app can totally be converted into webapp. Another workaround is by sharing the similar code by creating a yarn workspace.

mary-ng5519 commented 2 years ago
"@react-native-masked-view/masked-view": "^0.2.6",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "axios": "^0.24.0",
    "react": "17.0.2",
    "react-native": "0.66.3",
    "react-native-elements": "^3.4.2",
    "react-native-gesture-handler": "^2.0.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.9.0",
    "react-native-vector-icons": "^9.0.0",
    "realm": "^10.10.1"

Dear, i just checked your core dependencies, do you think the realm is totally compatible with react-native-web ?, how to determine if a dependency were fully compatible with webstack from RN sourcebase ?

MrMischievousX commented 2 years ago

As mentioned i already stated that every package is not supported by react-native-web, to check whether a dependency supports react-native-web you can always refer their docs.

mary-ng5519 commented 2 years ago

Dear, the source-base is not compatible with latest TypeScript version, would you please help fix/patch fixes below coding practice following latest TS standards from MS ?

ERROR in D:\Demos\React-Native-EcoShop\App.tsx
229:25-30
[tsl] ERROR in D:\Demos\React-Native-EcoShop\App.tsx(229,26)
      TS2322: Type '{ user: any; currentUser: any; dispatchEvent: (action: string, payload: any) => void; }' is not assignable to type 'null'.

ERROR in D:\Demos\React-Native-EcoShop\src\App.tsx
229:25-30
[tsl] ERROR in D:\Demos\React-Native-EcoShop\src\App.tsx(229,26)
      TS2322: Type '{ user: any; currentUser: any; dispatchEvent: (action: string, payload: any) => void; }' is not assignable to type 'null'.
    "ts-loader": "^9.2.8",
    "typescript": "^4.4.4",
mary-ng5519 commented 2 years ago
[tsl] ERROR in C:\React-Native-EcoShop\src\components\SubmitBtn.tsx(17,7)
      TS2769: No overload matches this call.
  Overload 1 of 2, '(props: ButtonProps, context?: any): ReactElement<any, any> | null', gave the following error.
    Type '{ title: string; disabled: boolean; onPress: () => void; style: any; buttonStyle: any[]; }' is not assignable to type 
'IntrinsicAttributes & ButtonProps'.
      Property 'onPress' does not exist on type 'IntrinsicAttributes & ButtonProps'.
  Overload 2 of 2, '(props: ButtonProps): ReactElement<any, any> | null', gave the following error.
    Type '{ title: string; disabled: boolean; onPress: () => void; style: any; buttonStyle: any[]; }' is not assignable to type 
'IntrinsicAttributes & ButtonProps'.
      Property 'onPress' does not exist on type 'IntrinsicAttributes & ButtonProps'.