tunahancelik / Succulent-Shop

Succulent Shop is a project developed by Trendyol Mobile Bootcamp participants during bootcamp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Succulent Shop


Succulent Shop is a project developed by Trendyol Mobile Bootcamp participants during bootcamp.

Table of Contents

Descriptions

This archive contains the first assignment of the project.

Assignment includes sign up user interface design and client-side validation of e-mail, username and password entries. There are conditions that the user must comply with when registering.

Click here to the figma design of the project.

Screenshots

Login Screen Sign Up Screen Product List Product Product Detail Screen

Tech

  • Kotlin
  • Retrofit
  • Gson
  • Glide

Assignments

Assignment: Create Signup Screen UI #1

  • Design the screen using TextInputLayouts and MaterialButtons as shown in the image.
  • Add client-side validation to the fields and show related errors on the fields when user clicks SIGN UP button. (See validation table)
  • Clicking ALREADY HAVE AN ACCOUNT? button should navigate user to Login Screen.
  • Clicking CREATE AN ACCOUNT button on Login Screen should navigate user to Signup Screen.

Assignment: Navigation Component and RecyclerView #2

  • Create SignupFragment and move logic from SignupActivity into there, deleting SignupActivity.
  • Add SignupFragment to the nav_graph.xml adding necessary actions.
  • Add a function fun relatedProducts(productId: Int): List into ProductStore which returns arbitrary (random or any logic) list of related products.
  • Add the Related Products section into ProductDetailFragment which gets data from ProductStore and displays it in a horizontal RecyclerView.
  • Add a click listener to the related products which would navigate user to ProductDetailFragment for the clicked product.

Assignment: Integrate Signup and Related Products API #3

Signup API

  • Send request to /auth/local/register when user tries to sign up and all client side validations pass.
  • Handle the response and..
    • if it's successful save the jwt and navigate to product list screen, popping all the backstack.
    • for errors with 4XX status code display the returned message in a Snackbar.
    • for other status codes display Unexpected error occurred in a Snackbar.
  • Handle other connectivity problems (eg. device is not connected to internet) and show this message in a Snackbar: Please check your connection and try again.

Related Products

  • Make api request to /related-products/:id where :id is the id of the product displayed.
  • Handle 401 status code and navigate to login screen in that case.
  • When the returned list is empty (there is no related products to the product queried) then hide the related products title TextView and the RecyclerView.
  • When the returned list is non-empty fill the RecyclerView with the given list.

Circular Progress Indicator

  • In Product List screen show a circular progress indicator until the list is loaded.
  • In Product Detail screen show a circular progress indicator until the product detail and the related products are both loaded.

Logout Action

  • Add a menu which is visible only in Product List screen and show a logout action in the overflow menu.
  • When user selects this menu item, delete the token and navigate to login popping all the back stack.

Skip login flow when user is logged in

  • When user successfully logs in or signs up, do not show Signup or Login screens to the user anymore until the user logs out.

Feedback

Feel free to send us feedback on Twitter Badge or Telegram Badge or Gmail Badge . Feature requests are always welcome. If you wish to contribute, please contact me!

🔗 Follow me

Github Badge Linkedin Badge Twitter Badge Instagram Badge

My Personal Web Page

About

Succulent Shop is a project developed by Trendyol Mobile Bootcamp participants during bootcamp.

License:MIT License


Languages

Language:Kotlin 100.0%