首页 > 其他分享 >Online Shopping App Requirements

Online Shopping App Requirements

时间:2024-10-06 14:21:57浏览次数:4  
标签:product Shopping App able should price user Requirements order

Online Shopping App Requirements

Create a Shopping application which supports the following:

High Level Design(HLD):

  • Use Spring Boot, Hibernate (HQL, Criteria), MySQL, Spring Security + JWT, Spring AOP,Spring Validation to develop the backend.○ You CAN NOT use JDBC/JdbcTemplate, JPA repository, CRUD repository, or thenative query.

○ At least one of the DAO functions needs to be implemented with Criteria.

○ Using Spring AOP to handle all exception throws in the controller and return

HTTP response

  • Use Angular to develop the frontend.
  • RESTful application required following a layered architecture: RestController, service,repository.
  • Use Postman to present your project by calling your RESTful endpoints.
  • All required functionalities should be implemented.
  • If you are using a version control tool such as GitHub, please make your repository

PRIVATE!!!

The retailer tycoon, Super Duper Mart™, requires your assistance in setting up their onlineshopping website. The following is the requirement they sent over. Based on theserequirements, please come up with a RESTful application that is equipped with the necessaryendpoints to return the needed information for each of their requirements.

User (Buyer)

The users are able to shop for different products from Super Duper Mart™.

  1. Registration [POST]
  2. Before being able to purchase products, a user has to first register.Your application should prevent registration using the same usernameand email.
  3. Only username, email and password are required to register an account.

Password should be encrypted (Bonus)

  1. Login [POST]
  2. If the user has entered the correct credentials, they may proceed to the

corresponding page based on their authorities.

  1. If the user has entered incorrect credentials, a custom named exceptionInvalidCredentialsException’ should be thrown and handled by the Exceptionhandler. The message the user will get is: “Incorrect credentials, please tryagain.”
  1. Home Pagea. The user is able to view all of the products. An out of stock product should NOTbe shown to the user. [GET]
  1. When a user clicks on one product, the user should be redirected to the detailpage of that product, including the description and price (retail_price) of theproduct. (The user should NOT be able to see the actual quantity of any items).[GET]
  1. After purchasing the product, the user should be able to view order details

including, order placement time and order status which is Processing,

Completed or Canceled. [GET]

  1. Purchasing
  2. The user should be able to purchase listing items with a specified quantity bycreating a “Processing” order. After a user places an order, the item’s stockshould be deducted accordingly. [POST]The user should be able to purchase multiple different items within asingle order.
  1. If the quantity of an item that the user is purchasing is greater than the item’sstock, throw a custom exception named ‘NotEnoughInventoryException’ usingException Handler and the order should not be placed.
  1. The user should be able to cancel an order by updating the status from“Processing” to “Canceled”. If so, the item’s stock should be incrementedaccordingly to offset the auto-deduction that took place when the order is firstplaced. However, a “Completed” order cannot be changed to “Canceled”.[PATCH]
  1. Product Watchlist
  2. The user can add/remove products to/from their watchlist.
  3. The user should not be able to add a product that is already on thewatchlist [POST]
  1. The user should not be able to remove a product that is not on thewatchlist [DELETE]
  1. The user can view all in stock products within their watchlist. [GET]
  2. When viewing the watchlist, products which are out of stock will not beshown to the user.
  1. Summary
  2. The user should be able to view all their orders.代 写Online Shopping App Requirements [GET]Note that the wholesale_price and retail_price of a product can beadjusted by the seller, implement something to prevent the adjustmentsfrom affecting previous orders.
  1. The user can then click and look into any one specific order created by them,completed with the items included in that order. [GET]
  1. The user should be able to view their top 3 most frequently purchased items.(excluding canceled order, use item ID as tie breaker) [GET]The user can also view their top 3 most recently purchased items. (excludingcanceled order, use item id as tie breaker) [GET]Admin (Seller)The seller, Super Duper Mart™, is able to list different products to sell. There is one and ONLYone seller, thus no need to keep user_id foreign keys in the product table.
  1. Home Page
  2. The seller should be able to view a dashboard, consisting of the following:
  3. Order information, with details of order placed time, users who placedhe order and the order status (Processing, Completed, Canceled).[GET]A page should only have 5 orders (Bonus)
  1. The seller can click and see information regarding any singleorder, completed with the items involved in the order.
  1. Listing information, the current products that are listed to sell. When theseller clicks on one product, the seller should be redirected to the detailpage of that product, including the description, wholesale_price, retail_price and stock’s quantity of the product; the seller should beable to modify the wholesale_price, retail_price, description andquantity of a product. [GET]
  1. Listing The seller should be able to add products. A product has fields includingescription, wholesale_price, retail_price and stock’s quantity. [POST]e wholesale price is the price which the seller paid for the product.
  1. The retail price is the price which customers pay for the product.
  1. Selling
  2. When one product is sold, the quantity of that product should be deductedaccordingly. And such quantity should be reflected on the dashboard.
  1. Order
  2. The seller should be able to complete a “Processing” order by updating itsstatus to “Completed”. [PATCH]
  1. The seller should also be able to cancel an order for some reasons, such as that

the product is sold out locally, by updating the order status to “Canceled”. If so,

the item’s stock should be incremented accordingly to offset the auto-deduction

that took place when the order is first placed. However, a “Canceled” order

cannot be completed, nor can a “Completed” order be canceled. [PATCH]

  1. Summary
  2. The seller can see which product brings the most profit. [GET]
  3. The profit is calculated as (retail price - wholesale price).

Note: This should address situations where the seller alters either thewholesale_price or retail_price, causing a discrepancy when comparingbetween the past orders and the current updated product details.This should not include “Processing” and “Canceled” orders.The seller can see which 3 products are the most popular/sold (excludingcanceled and ongoing order). [GET]c. The seller can also see the amount of total items sold successfully (excludingcanceled and ongoing order). [GET]

  1. Additional Features (Bonus)
  2. This part would be evaluated by your creativity and completeness of the design.Be creative and think outside of the box :) if you have time

Spring Validation

Using Spring Validation to validate the request in at least one POST request.

Security

Protect your application endpoints using Spring Security + JWT:

  1. Authentication: Guests cannot access any endpoints other than for login or registrationusage.
  1. Authorization: A user with the corresponding authorities can access certain pages thatthey are granted access to.
  2. They should not be able to access information that they don’t have access to:Any of seller’s functionalityAny of other user’s order information
  1. Any other relevant information

Exception Handling

  1. Your application must not crash during the presentation. Therefore, if an exceptionoccurs, you must handle it with Spring AOP and display the exception as a message tohelp yourself and others debug.

标签:product,Shopping,App,able,should,price,user,Requirements,order
From: https://www.cnblogs.com/comp9021/p/18449041

相关文章

  • SEHS4517 Web Application Development
    SEHS4517WebApplicationDevelopmentandManagementSemester1,2024-2025AssignmentIndividualAssignment(30%oftheassessmentofthiscourse)Thisindividualassignmentaims:Toconductresearchonrelevantreferencematerialsorsources.Todeve......
  • 修改帝国CMS模板出现Application Firewall Alert错误
    当在修改帝国CMS模板时出现“ApplicationFirewallAlert”错误,通常是因为服务器上的安全软件(如360主机安全卫士、McAfee、服务器安全狗等)误将您的IP地址识别为攻击者并加入了黑名单。以下是一些解决步骤:检查服务器安全软件:登录服务器控制面板或远程桌面。检查是否安装了360......
  • Z-library数字图书馆镜像地址及客户端/app(持续更新)
    Z-library数字图书馆介绍Z-library,被誉为全球范围内最为庞大的数字图书馆之一,其藏书量之丰富令人叹为观止,总计囊括了超过9,826,996册电子书及84,837,646篇学术期刊文章。这座庞大的知识宝库覆盖了从经典文学巨著到前沿理工学科,从人文艺术瑰宝到专业学术论文的广泛领域,几乎能够满......
  • Nuxt.js 应用中的 app:mounted 钩子详解
    title:Nuxt.js应用中的app:mounted钩子详解date:2024/10/5updated:2024/10/5author:cmdragonexcerpt:app:mounted钩子在Vue应用的生命周期中扮演着重要角色,提供了在组件被挂载后的执行时机。通过合理利用这个钩子,我们能够提高组件的交互性、用户体验以及性能优化......
  • 婚恋交友系统源码支持微信小程序 + 微信公众号 + H5 + APP
    婚恋交友系统源码小程序:开启你的浪漫之旅在这个快节奏的时代,寻找真爱似乎变成了一项挑战。但有了我们的婚恋交友系统源码小程序,这一切都将变得简单而美好。这款小程序源码专为追求真挚情感的单身男女设计,集成了多种实用功能,旨在为用户提供一个安全、便捷、高效的在线交友平台。通过......
  • [CSP-J 2023] 小苹果(apple)-----------用数组
    1#include<iostream>2usingnamespacestd;3intmain(){4intn,m;5cin>>n>>m;6intg=n,t=0,li,s[n+1],b;7for(inti=1;i<=n;i++){8s[i]=i;9}10while(g){11t+=1,b=0,li=0,g-=(g+......
  • App 开发语言
    App开发主要有两大技术路线,分别是原生开发和混合开发.原生开发指的是谷歌官方的技术.混合开发会借助一些前端的技术,比如H5,Flutter,ReactNative.混合开发会用到一些网页的技术.混合开发的渲染性能没有原生开发的好.混合开发可以跨平台,比如Flutter,ReactNative......
  • Nuxt.js 应用中的 app:beforeMount 钩子详解
    title:Nuxt.js应用中的app:beforeMount钩子详解date:2024/10/4updated:2024/10/4author:cmdragonexcerpt:app:beforeMount是一个强大的钩子,允许开发者在用户界面挂载前控制应用的初始化过程。通过有效利用这一钩子,我们可以优化应用的用户体验,保持状态一致性并高效......
  • Nuxt.js 应用中的 app:redirected 钩子详解
    title:Nuxt.js应用中的app:redirected钩子详解date:2024/10/3updated:2024/10/3author:cmdragonexcerpt:app:redirected是Nuxt.js中的一个钩子,主要用于处理服务器端渲染(SSR)过程中发生的重定向。该钩子在重定向被执行之前被调用,允许开发者在重定向发生前进行一些操......
  • 【THM】Git Happens练习
    【THM】GitHappens练习与本文相关的TryHackMe实验房间链接:TryHackMe|GitHappens简介:老板让我创建一个原型代码,所以它就在这里!我们甚至使用了一种叫做“版本控制”的东西,使部署变得非常容易!你能找到应用程序的密码吗?第一题:找到超级机密的密码第一步端口扫描首先使......