Account microservice1.1 Log in Log in: Screen Mockup Log in: Sequence Diagram Log in: Class Diagram 1.2 Register Register – Step 1: Screen Mockup... Register – Step 2: Screen MockupRegis
Trang 1IS1210 My TVSE 06103 SE06103 SWD ass1
Introduction to Software Engineering (SWE102)
Trang 2MINISTRY OF EDUCATION AND TRAINING FPT UNIVERSITY
SOFTWARE DESIGN SPECIFICATION
for
Online Tech-Shop
Course information Student HE130022 – Phạm Quang Huy
Supervisor Mr Nguyễn Tất Trung
Subject Code SWD391
Trang 32 Project Scope:
Online Tech-shop has 3 group users: customer, staff, administrator.
The application consists of 4 main microservices:
Order procesing microservice - Handle order action of customer
including checkout cart, payment
- Provide order logging feature to staff and admin
Trang 4B Business flow
I Activity Diagram
Customer activity diagram
Trang 5II Solution requirements
2.1 Functional Requirement
2.1.1 Authentication
- If customers want to buy something, they must log in or sign in
- The Sales system should automatically log in if the customer does not log out
- Customer account will be automatically logged out if do not active in 10 minutes
- Username must be email address
- Password must be at least 8 characters, at least 1 uppercase character, 1 number
2.1.2 User
- The administrator has permission to add, edit, delete staff
* Staff
- The staff has permission to edit, delete customers
- The staff has permission to add, edit, delete products
* Customer
- The customer can browse products and place an order.
2.1.3 Product
- Display product detail
- Must specify availability (In stock/Out of stock)
- Display related products in detail page
2.1.4 Cart
- Display number of products and the total price that users added
- Users can add more, edit or delete products in cart
Trang 62.1.5 Order
- Display payment method: COD, Visa card,
- Orders can be exported into invoices
- Customer can view status of order (before deliver/delivering/done/cancel)
2.2 Non-Functional Requirement
2.2.1 Usability
- Display the status of the product is in stock or out of stock
- Fault tolerance: Backup data to cloud storage, in case of data loss
- Real-time error check: when user sign up or do work requiring lots of input fields, warn user until all input data is valid
- To pay, the customer will have 3 steps:
+ Click button “Buy”, the product will be added to cart
+ Click button “Cart”, it will show the product’s name, quantity, the total price
+ Click button “Pay”, it will display the customer's information input form, payment method
Trang 7- Each periodic system upgrade will not take more than 30 minutes.
- Use camel case as the naming convention for variables, methods name
2.2.7 Portability
- The system can be deployed on various platforms: Linux, Windows, and macOS
- This website can be accessed via browsers: Chrome, Opera, Edge,
III Use case diagram
3.1 Account microservice
Use case diagram – Account microservice (authentication and authorization)
Trang 8Use case diagram – Account microservice (account management)
Trang 9Use case diagram – Order processing microservice
B.
System Architecture
System Architecture diagram
1 Design methodology: Heterogeneous pattern
Trang 10Why: Tech-shop system consists of many features and
components, so that heterogenerous is required to combine multiple design patterns.
2 Overall system architecture: Client-server pattern
Why: Because this is an web-based online shopping system, the
number of end-users is huge Therefore, there will be many clients requesting and receiving service client-server is
required.
3 Back-end architecture: Microservices pattern
Why: Online Tech-Shop has multiple feature groups so that I
decided to divide them into services and each service should be deployed independently of each other microservices pattern
is a good choice.
4 Internal service architecture: Layered pattern
Why: The application can be scaled up
and out with layered pattern The
purpose of each layer is also presented
clearly through design, this simplifies
effort to understand the system of
developers.
C.
Detailed Design
I Database Design
Trang 111 Account microservice
Account microservice: ERD
2 Online catalog microservice
Online catalog microservice: ERD
3 Shopping cart microservice
Trang 12Shopping cart microservice: ERD
4 Order processing microservice
Trang 13Order processing microservice: ERD
II Class Diagram & Sequence Diagram
Trang 141 Account microservice
1.1 Log in
Log in: Screen Mockup Log in: Sequence Diagram Log in: Class Diagram
1.2 Register
Register – Step 1: Screen Mockup
Trang 15Register – Step 2: Screen Mockup
Register – Step 3: Screen Mockup
Register: Sequence Diagram
Trang 16Register: Class Diagram
1.3 Edit account information
Trang 17Edit account information: Screen Mockup
Trang 18Edit account information: Sequence Diagram
Edit account information: Class Diagram
1.4 Ban customer account, deactive staff account
Trang 19Deactive account: Sequence Diagram
Deactive account: Class Diagram
1.5 View customer list, staff list
Trang 20View account list: Screen Mockup
View account list: Sequence Diagram
Trang 21View account list: Class Diagram
Trang 222 Online catalog microservice
2.1 View product list
View product list: Screen Mockup
View product list: Sequence Diagram
Trang 23View product list: Class Diagram
2.2 Add product
Add product: Sequence Diagram
Trang 24Add product: Class Diagram
2.3 Delete product
Delete product: Sequence Diagram
Trang 25Delete product: Class Diagram
Trang 263 Shopping Cart microservice
3.1 Add to cart
Add to cart: Screen Mockup
Trang 27Add to cart: Sequence Diagram
Add to cart: Class Diagram
Trang 283.2 Edit cart item quantity
Edit cart item: Sequence Diagram
Edit cart item: Class Diagram
Trang 293.3 View cart items
View cart items: Screen Mockup
Trang 30View cart items: Sequence Diagram
View cart items: Class Diagram
Trang 314 Order processing microservice
4.1 Place an order
Place an order – Step 1: Screen Mockup
Trang 32Place an order – Step 2: Screen Mockup
Trang 33Place an order: Sequence Diagram
Place an order: Class Diagram
Trang 344.2 View order history
View order history: Screen Mockup