Modules #
- App
- Register
- Login
- Menu
- MenuItems
- ItemDetail
- Cart
- Payment
- MyOrders
- Settings
- Notifications
- OrderDetail
App #
- Location: The UI is located in the file src/App.js.
- Working: Sets up the navigation system, fonts, push notifications, and native basis for Apollo.
- Result: Everything is set up to load the subsequent view based on whether or not the user has authenticated. The tutorial screen will appear initially if the user has not authenticated; else, the menu screen will appear.
Register #
- Location: The UI is located in the file src/screens/Register/Register.js. Its mutation is represented by the constant createUser in the file src/apollo/server.js.
- Working: Utilizes Google, Facebook, or Manual Registration to Register Users.
- Result: Users that join using Facebook or Google will immediately receive their profile pictures as well. Any option that is chosen causes a backend auth token to be created and sent to the frontend.
Login #
- The UI is located in the file src/screens/Login/Login.js. With constant login, its mutation may be found in src/apollo/server.js.
- Working: User logs in using Facebook, Google, or manual registration. Additionally, ForgotPassword has a separate component that is available. src/components/ForgotPassword You may find its mutation in the src/apollo/server directory with constant js forgotPassword
- Result: User successfully logs in after validation. When a user uses forgotPassword, an email containing a password-reset link is given to him.
Menu #
- Location: The UI can be found under
src/screens/Menu/Menu.js
Its query can be found undersrc/apollo/server.js
with constantcategories
- Result: The goods are categorized.
MenuItems #
- Location: The UI can be found under
src/screens/MenuItems/MenuItems.js
Its mutations and queries can be found undersrc/apollo/server.js
with constantfoods
andsrc/apollo/client.js
with constantsfoodItem
andgetCartItems
- Working: There are two main file servers within Apollo.client and js.js The first file is used to communicate with the api server, while the second is used to manage the internal state of the application. In contrast to foodItem, which is a fragment, constants foods and getCartItems are queries.
- Result: The foods database is queried using the previous screen’s selected category. If a user selects the add button inside the MenuItems screen, the foodItem fragment is executed, updating the quantity inside the cart item as well as the adds the food item if it already exists, updating simply its quantity.
ItemDetail #
- Location: The UI is located in the file src/screens/ItemDetail/ItemDetail.js. You can find its mutations and queries under the directory src/apollo/server.src/apollo/server.js with constants foodItems and getCartItems and like and js with constants
- Working: FoodItems and getCartItems are constants that have been previously discussed. Like is a mutation that adds it to food using the food id parameter.
Cart #
- Location: The UI is located in the file src/screens/Cart/Cart.js. It contains the getCartItems and getProfile Apollo constants. location getProfile at src/apollo/client.js
- Working: A query called constant getProfile retrieves user information such name, email, phone, location, and image.
- Result: The user delivery location is obtained using the getProfile command.
Payment #
- Location: The UI is located in the file src/screens/Payment/Payment.js. Apollo constants getCartItems and placeOrder are present. src/apollo/server.js is where you can find placeOrder. It is mutated.
- Working: Constant placeOrder sends information, including the item delivery address, payment status, and user profile, to the server.
- Result: The user can choose between using Stripe or Paypal to pay. If the Cash on Delivery option is chosen, no payment is made and the payment status is still pending. From the admin panel, its status can be modified. The user is also given access to the order details through email.
MyOrders #
- Location: The user interface is located in src/screens/MyOrders/MyOrders.js Its src/apollo/server location contains the myOrders Apollo constant.js It’s a question kind.
- Result: With the option for the user to reorder, all of the user’s orders are queried.
Settings #
- Location: Under src/screens/Settings/Settings.js is where the UI may be found. It has the Apollo constants for getProfile, uploadPicture, profile, and updateUser. The src/apollo/server.js file contains the constants updateUser, uploadPicture, and profile. while the src/apollo/client.js file contains the constant getProfile.
- Working: UpdateUser is a sort of mutation that modifies user data. The user’s profile picture is updated on the server when they utilize the uploadPicture mutation type. profile is a type of query that searches across user profiles.
- Result: An image is uploaded to the user’s profile. To place an order, all of the configuration areas must be filled out.
Notifications #
- Location: The UI is located in the file src/screens/Notifications/Notifications.js. It is situated in src/apollo/client.js and uses Apollo constants of the getNotifications and query types.
- Results: getNotifications retrieves each notice the user has ever received when the order status is changed from the admin panel.
OrderDetail #
- The UI is located in the file OrderDetail.js in the folder src/screens/OrderDetail/OrderDetail.js. It may be found in src/apollo/client.js and is a part of the Apollo constants of type orderItem.
- Order: workingThe timeline is dynamically displayed based on the order’s state and includes all of the item’s data.