Architecture Design - SWD392 - Group5
Architecture Design - SWD392 - Group5
Software Architecture
Internal use
1
RECORD OF CHANGE
2
SIGNATURE PAGE
Student Group
Instructor
Instructor
3
TABLE OF CONTENTS
1. Introduction 7
1.1. Purpose 7
1.2. Scope 7
1.3. Definitions, Acronyms and Abbreviations 7
1.4. References 8
1.5. Overview 8
2. Architectural Representation 9
3. Architectural Goals and Constraints 9
3.1. Architectural Goals for Cafe Restaurant System 9
3.2. Architectural Constraints for Cafe Restaurant System 9
4. Use-Case View 11
4.1. Use-case List 11
a. Diagram 11
b. Descriptions 11
4.2. Use-Case Realizations 14
5. Logical View 46
5.1. Overview 46
User Management Package 46
Order Management Package 47
Cart Management Package 47
Item Management Package 47
News Management Package 47
Feedback Management Package 47
Supply Management Package 48
5.2. Architecturally Significant Design Packages 49
6. Process View 51
6.1. Register 51
6.2. View Home Page 52
6.3. View News List 53
6.4. View News Detail 54
6.5. Search News 55
6.6. View Items List 56
6.7. View Items Detail 57
6.8. Search Items 58
6.9. Log in 59
6.10. Log out 60
6.11. Reset Password 61
6.12. Change Password 62
6.13. Update Profile 63
4
6.14. View Profile 64
6.15. Add to cart 64
6.16. Edit cart 65
6.17. Check out 65
6.18. Send feedback 66
6.19. View Order List 66
6.20. View Order Detail 67
6.21. Search Order 67
6.22. Update delivery information 68
6.23. Cancel order 69
6.24. View customer order list 69
6.25. View customer order detail 70
6.26. Search customer order 70
6.27. Approve/Deny order 71
6.28. Update order status 71
6.29. Print invoice 72
6.30. Reply customer feedback 72
6.31. Handle customer complaint 73
6.32. Add new item 74
6.33. Update item information 75
6.34. Remove item 76
6.35. Add revenue reports 77
6.36. View profit reports 78
6.37. Cancel orders 79
6.38. Add new news 80
6.39. Edit existing news 81
6.40. Delete outdated news 82
6.41. Publish or unpublish 83
6.42. View account list 84
6.43. View account detail 84
6.44. Search account 85
6.45. Active/Deactive active 86
6.46. Update staff/manager account 87
6.47. Create staff/manager account 88
7. Deployment View 88
7.1. Physical Network Configuration 88
7.1.1. Application Server Configuration 88
7.1.2. Database Server Configuration 89
7.1.3. Configuration Files 89
7.1.4. Security Configuration 90
7.1.5. Monitoring and Logging 91
7.1.6. Continuous Integration/Continuous Deployment (CI/CD) 91
7.1.7. Backup and Disaster Recovery 91
5
7.2. Mapping of Processes to Physical Nodes 92
8. Implementation View 92
8.1. Overview 92
8.2. Layers 93
9. Size and Performance 97
9.1 Major Dimensioning Characteristics 97
9.2 Target Performance Constraints 97
9.2.1 Response Time 97
9.2.2 Scalability 98
9.2.3 Availability 98
9.2.4 Security 98
9.2.5 Load Balancing 98
9.2.6 Latency 98
9.2.7 Backup and Recovery 98
10. Quality 99
10.1 Extensibility 99
10.2 Reliability 99
10.3 Portability 99
10.4 Security 100
10.5 Performance 100
10.6 Usability 100
10.7 Maintainability 100
10.8 Privacy 100
10.9 Availability 101
11. Other Considerations 101
11.1 Monolithic Architecture 101
11.1.1 Advantages 101
11.1.2 Disadvantages 102
11.1 Monolithic Architecture 102
11.1.1 Advantages 102
11.1.2 Disadvantages 102
11.2 Microservices Architecture 103
11.2.1 Advantages 103
11.2.2 Disadvantages 103
6
1. INTRODUCTION
1.1. Purpose
The purpose of this document is to build a cafe restaurant management system on an online platform. This
system serves as an essential tool for efficiently managing interactions and operations among various actors,
including guests, registered users, customers, staff, managers, and admins. Its primary goal is to streamline key
processes such as browsing menus, placing orders, and managing reservations seamlessly.
By automating these tasks, staff can focus more on delivering personalized service to customers, enhancing
their overall dining experience. The system allows for quick access to important customer information, enabling
staff to cater to specific preferences and requests effectively. Additionally, it assists in managing inventory and
order fulfillment, ensuring optimal service quality and customer satisfaction.
Overall, a cafe restaurant management system empowers all actors to collaborate effectively, optimize service
delivery, and uphold the establishment's reputation for excellence in hospitality.
1.2. Scope
The scope of a cafe/restaurant management system encompasses a diverse range of functionalities and areas
within the food and beverage industry. Its primary focus is on optimizing restaurant operations and enhancing
customer experiences. From browsing menus to order fulfillment, the system manages various tasks seamlessly,
ensuring efficient day-to-day functioning. It includes modules for menu management, order processing, table
reservations, and customer feedback, providing comprehensive support to restaurant staff.
Moreover, the scope extends to inventory management, encompassing tools for tracking stock levels, managing
suppliers, and ensuring timely ordering of food and beverage supplies. Financial management is another crucial
aspect, with features for handling transactions, invoicing, billing, and accounting processes.
The system also facilitates staff management, including employee scheduling, performance tracking, and role
assignments. Additionally, it provides data analysis and reporting capabilities, offering valuable insights for
informed decision-making regarding pricing strategies, marketing initiatives, and resource allocation. Overall,
the cafe/restaurant management system aims to enhance operational efficiency, improve customer satisfaction,
and support the overall success of the establishment.
ID Term Definition
01 CRS
7
1.4. References
None
1.5. Overview
Part 2: Architectural Representation: Explains the software architecture relevant to the current system
and how it is depicted.
Part 3: Architectural Goals and Constraints: Outlines the software requirements and objectives that
significantly influence the architecture.
Part 4: Use-Case View: Lists use cases or scenarios from the use-case model that represent critical
functionalities of the final system.
Part 5: Logical View: Details the architecturally significant elements of the design model and identifies
the main packages.
Part 6: Process View: Describes the primary modes of communication between processes, including
message passing, interrupts, and rendezvous.
Part 7: Deployment View: Illustrates the physical network (hardware) configurations upon which the
software is deployed and operated.
Part 8: Implementation View: Defines the various layers within the architecture, their contents, the
rules for inclusion in specific layers, and the boundaries between them. This section includes a component
diagram to show the relationships among the layers.
Part 9: Size and Performance: Discusses the key dimensioning characteristics of the software that
affect the architecture, along with the target performance constraints.
Part 10: Quality: Describes how the software architecture contributes to non-functional capabilities of
the system.
Part 11: Other Considerations: Provides an overview of alternative approaches or solutions that were
evaluated during the architectural selection process, explaining why this particular architecture was chosen over
others for the system.
2. ARCHITECTURAL REPRESENTATION
This section describes what software architecture is for the current system, and how it is
represented. Of the Use-Case, Logical, Process, Deployment, and Implementation Views, it
enumerates the views that are necessary, and for each view, explains what types of model elements it
contains.
8
3. ARCHITECTURAL GOALS AND CONSTRAINTS
● Scalability: The system should be designed to scale effectively to accommodate a growing number of
customers, menu items, and transactions. This may involve utilizing a modular architecture and cloud-
based solutions for data storage and processing.
● Performance: The system should respond promptly to user requests, particularly for critical functions
such as placing orders and managing customer data. Achieving this can be accomplished through
efficient database design, caching mechanisms, and optimized code.
● Security: The system must prioritize data security to protect customer information, financial
transactions, and internal operational data. Essential measures include encryption, access controls, and
regular security audits.
● Availability: The system should ensure high availability with minimal downtime to prevent
disruptions in restaurant operations. This may involve implementing redundancy measures (e.g.,
backup servers) and developing disaster recovery plans.
● Reliability: The system should operate reliably with minimal errors or bugs. This requires
comprehensive testing throughout the development lifecycle and the implementation of robust error
handling mechanisms.
● Maintainability: The system architecture should facilitate ease of maintenance and future updates.
This involves using modular components, providing clear documentation, and adhering to coding best
practices.
● Usability: The user interface (UI) for both staff and customers should be intuitive and user-friendly.
This can be achieved through a clean layout, clear navigation, and context-sensitive help features.
9
● Compliance: The system must adhere to relevant industry regulations regarding data privacy, security,
and financial transactions to protect customer information and ensure regulatory compliance.
● Interoperability: The system should be capable of exchanging data with other pertinent platforms,
such as online ordering systems, payment gateways, or loyalty programs, to enhance overall
operational efficiency.
● Performance Optimization: While scalability is essential, optimizing performance for typical
restaurant usage patterns is also critical. This may involve profiling user interactions and resource
usage to identify bottlenecks and implement necessary optimizations.
4. USE-CASE VIEW
b. Descriptions
1 Common Register The user submits personal information to create a new account, and the
10
system validates the data.
2 Common View home page The user accesses the home page, where the system displays key features
like navigation and featured products.
3 Common View news list The user navigates to the news section, and the system shows a list of news
with titles and summaries.
4 Common View news detail The user selects a news from the list, and the system displays the full
content of the news , including images and related information.
5 Common Search news The user enters keywords in the search bar, and the system displays
a list of news that match the search criteria.
6 Common View items list The user navigates to the items section, and the system displays a
list of available items with details such as names, prices, and
images.
7 Common View items detail The user selects an item from the list, and the system displays the
detailed information, including the item description, specifications,
and available options.
8 Common Search items The user enters search criteria in the search bar, and the system
displays a list of items that match the query.
9 Common Login The user can log in to the system by providing their email and
password.
10 Common Logout The user logs out of the system, ending their session to protect
personal information and secure their account.
11 Common Reset Password The user reset their password by verifying their identity through a
registered email
12 Common Change Password The user change their current password to a new one
13 Common Update profile The user edits and updates personal information in their profile,
including name, address, and other relevant details.
14 Common View profile The user views their personal information in the profile, including
details such as name, email address, and other account-related
information.
15 Customer Add to cart The user selects a product from the catalog and adds it to their
virtual shopping cart. The system updates the cart to reflect the new
item and displays the updated contents to the user.
16 Customer Edit cart The user views the current items in the cart and makes changes,
such as updating the quantity or removing products. The system
adjusts the cart accordingly and recalculates the total price.
17 Customer Check out The user reviews their cart, selects a payment method, enters
shipping details, and confirms the purchase. The system processes
the order and prepares it for delivery.
18 Customer Send feedback The user provides feedback on a product or service, such as leaving
11
a review or rating. The system collects and stores the feedback for
future use.
19 Customer View order list The user requests to see a list of all their previous orders. The
system retrieves the order history and displays it to the user.
20 Customer View order detail The user selects an order from their order list to view detailed
information, such as items ordered, delivery status, and payment
details. The system fetches the relevant data and displays it.
21 Customer Search order The user searches for a specific order by entering criteria such as
order ID or date. The system filters the order history and displays
matching results.
22 Customer Update delivery information The user updates the delivery address or preferences for an existing
order. The system validates the changes and applies them to the
order.
23 Customer Cancel order The user cancels an order that has not yet been shipped. The system
verifies the order status and processes the cancellation, potentially
issuing a refund.
25 Staff View customer order detail See details of a specific customer order.
32 Manager View revenue reports See income summaries for specific periods.
34 Manager Cancel orders Remove orders from the system when necessary.
35 Manager Add new news Create a new blog post or news item.
39 Admin View account list Admin can view a list of all user accounts in the system, including
staff, managers, and customers.
40 Admin View account detail Admin can view detailed information of a specific user account,
12
such as contact details, role, and account status.
41 Admin Search account Admin can search for a specific user account by entering criteria
such as username, email, or role.
42 Admin Active/Deactive account Admin can activate or deactivate user accounts, controlling access to
the system for staff, managers, or customers.
43 Admin Update staff/manager account Admin can update account information for staff or managers,
including roles, contact details, and permissions.
44 Admin Create staff/manager account Admin can create new user accounts for staff or managers, assigning
them the necessary roles and permissions.
4.2.1. Register
Realization Steps:
Design Elements:
● User Interface (UI): Registration screen with fields for name, email, and password.
● Database: Stores user information (names, emails, securely hashed passwords).
● Security Measures: Secure password hashing and email verification process.
4.2.2. View home page
Realization Steps:
Design Elements:
● User Interface (UI): Home page layout with navigation, featured sections, and promotional banners.
● Database: Stores information on featured products, promotions, and navigation links.
● User Experience: Intuitive design for easy exploration and access to information.
13
4.2.3. View news list
Realization Steps:
Design Elements:
● User Interface (UI): News list layout with clickable news titles and summaries.
● Database: Stores news, including titles, summaries, and publication dates.
● User Experience: Clear organization for easy browsing and selection of news.
4.2.4. View news detail
Realization Steps:
Design Elements:
● User Interface (UI): News detail layout with title, content, images, and related information.
● Database: Stores full content of news, including images and metadata.
● User Experience: Engaging design for reading and interacting with the news content.
4.2.5. Search news
Realization Steps:
Design Elements:
● User Interface (UI): Search bar integrated into the news section with search results layout.
● Database: Stores news with searchable metadata, including titles and content.
● User Experience: Quick and efficient search functionality for easy access to relevant news.
4.2.6. View items list
Realization Steps:
Design Elements:
● User Interface (UI): Items list layout with item cards or rows showing names, prices, and images.
● Database: Stores item information, including names, prices, descriptions, and images.
14
● User Experience: Organized display for easy browsing and quick access to item details.
4.2.7. View items detail
Realization Steps:
Design Elements:
● User Interface (UI): Item detail layout featuring a description, images, and specifications.
● Database: Stores comprehensive item information, including descriptions and specifications.
● User Experience: Engaging design to facilitate informed purchasing decisions.
4.2.8. Search items
Realization Steps:
● User enters search criteria in the search bar on the items section.
● The system queries the database for items that match the search criteria.
● The system displays a list of items that meet the search conditions.
Design Elements:
● User Interface (UI): Search bar integrated into the items section with a layout for displaying search
results.
● Database: Stores item data with searchable attributes, including names and descriptions.
● User Experience: Efficient search functionality for quick access to relevant items.
4.2.9. Login
Realization Steps:
● The user enters login credentials (username and password) into the respective fields on the login
interface.
● The system authenticates the login information by querying the database to check the username and
password.
● If the information is valid, the system allows the user to log in successfully and redirects them to the
user dashboard.
● If the information is invalid, the system displays an error message and prompts the user to try again.
Design Elements:
● User Interface (UI): A login form with fields for entering the username and password, along with a
"Login" button. The interface also includes an error message display for failed login attempts.
● Database: Stores user account information, including the username and encrypted password.
● User Experience: Quick and secure login functionality with clear notifications when login information
is incorrect.
4.2.10. Logout
15
Realization Steps:
● The user clicks the "Logout" button on the user interface, typically located in the navigation menu or
profile section.
● The system processes the logout request by terminating the user's session.
● The system clears any session data associated with the user to ensure security.
● The user is redirected to the login page or a public homepage, confirming that they have successfully
logged out.
Design Elements:
● User Interface (UI): A visible "Logout" button in the navigation menu or user profile section to make
logging out easily accessible.
● Database: No direct changes to the database during logout; however, session data is cleared from the
server-side to prevent unauthorized access.
● User Experience: A seamless logout process that confirms the action to the user, ensuring they feel
secure and that their session has ended properly.
Realization Steps:
● The user clicks on the "Forgot Password?" link on the login page.
● The system prompts the user to enter their registered email address for password recovery.
● The user submits their email address.
● The system verifies the email address against the database and, if valid, sends a password reset link to
the provided email.
● The user receives the email and clicks on the password reset link, redirecting them to a secure reset
password page.
● The user enters a new password and confirms it.
● The system validates the new password (e.g., checking for strength and matching confirmation).
● If valid, the system updates the user's password in the database and displays a success message. The
user can then log in with the new password.
Design Elements:
16
Realization Steps:
● The user navigates to the "Change Password" section within their account settings.
● The system prompts the user to enter their current password for verification.
● The user enters their current password.
● The system verifies the current password against the stored password in the database.
● If the current password is valid, the user is prompted to enter a new password and confirm it.
● The user submits the new password.
● The system validates the new password (e.g., checking for strength and ensuring the confirmation
matches).
● If valid, the system updates the user's password in the database and displays a success message.
● The user is advised to log in again with the new password if necessary.
Design Elements:
Realization Steps:
● The user navigates to the "Profile" or "Account Settings" section of the application.
● The system displays the current profile information (e.g., name, email, phone number, and profile
picture).
● The user edits the desired fields (e.g., updating their name, email, or phone number).
● The user submits the changes by clicking the "Save" or "Update" button.
● The system validates the updated information (e.g., checking for valid email format and required
fields).
● If the validation is successful, the system updates the profile information in the database and displays a
success message.
● If the validation fails, the system provides error messages indicating which fields need correction.
Design Elements:
17
● User Experience:
○ An intuitive and straightforward process for users to update their profile information.
○ Immediate feedback on the success or failure of the update, ensuring users feel confident in
their ability to manage their profiles.
Realization Steps:
● The user navigates to the "Profile" or "Account Settings" section from the main menu or dashboard.
● The system retrieves the user's profile information from the database, including details such as name,
email, phone number, profile picture, and any other relevant attributes.
● The system displays the retrieved profile information in a user-friendly format on the profile page.
● The user can view their details without the ability to edit them directly from this section.
● The user has the option to navigate to the "Edit Profile" section if they wish to make changes to their
information.
Design Elements:
Realization Steps:
Design Elements:
● User Interface (UI): Product pages with "Add to Cart" buttons, cart summary displayed on the header.
● Database: Stores product data, availability, and cart items.
● User Experience (UX): Immediate feedback on cart updates, showing total cost and item count in the
cart.
4.2.16. Edit cart
Realization Steps:
18
● The user views the cart and selects an item to update (e.g., change quantity or remove).
● The system processes the user's changes and updates the cart accordingly.
● The system recalculates the total cost based on the changes.
● The updated cart is displayed to the user with the new item count and total price.
Design Elements:
● User Interface (UI): Cart page with options to modify quantity or remove items.
● Database: Updates stored cart data for the user.
● User Experience (UX): Simple, intuitive controls for updating cart items and real-time cost
recalculations.
4.2.17. Check out
Realization Steps:
Design Elements:
● User Interface (UI): Checkout page with order summary, payment options, and delivery address
forms.
● Database: Stores order details, payment information, and delivery preferences.
● User Experience (UX): Seamless transition from cart to checkout, minimal steps to complete the
order.
4.2.18. Send feedback
Realization Steps:
Design Elements:
● User Interface (UI): Feedback form with fields for comments, ratings, and suggestions.
● Database: Stores feedback data linked to specific products or services.
● User Experience (UX): Easy-to-use feedback form with clear instructions and quick submission.
4.2.19. View order list
Realization Steps:
Design Elements:
19
● User Interface (UI): Order history page with a table listing past orders, including clickable links for
more details.
● Database: Stores historical order data for each user.
● User Experience (UX): Clear, accessible order history view with options to filter or search for specific
orders.
4.2.20. View order detail
Realization Steps:
Design Elements:
● User Interface (UI): Detailed order view page showing item breakdown, payment method, and
shipping status.
● Database: Stores detailed order and shipment information.
● User Experience (UX): Comprehensive order details presented in a readable, easy-to-navigate format.
4.2.21. Search order
Realization Steps:
Design Elements:
● User Interface (UI): Search bar and filter options in the order history page.
● Database: Searchable order data for the user.
● User Experience (UX): Quick and accurate filtering of orders based on user input.
4.2.22. Update delivery information
Realization Steps:
● The user navigates to the order details page for an order still in progress.
● The system provides fields for updating delivery information (address, delivery instructions, etc.).
● The user enters new delivery details and submits the update.
● The system validates and applies the new delivery information to the order.
● The system confirms the successful update and shows the new delivery information.
Design Elements:
● User Interface (UI): Editable delivery form within the order details page.
● Database: Stores updated delivery information linked to the order.
● User Experience (UX): Simple, clear process for modifying delivery information, with real-time
validation.
4.2.23. Cancel order
20
Realization Steps:
● The user selects an eligible order from the order list that is still in processing.
● The system checks the order's status to determine if it can be canceled.
● If the order is eligible, the system provides a cancel option.
● The user confirms the cancellation.
● The system processes the cancellation and updates the order status to "Canceled."
● If applicable, the system initiates a refund process.
Design Elements:
● User Interface (UI): Order details page with a "Cancel Order" button, along with a confirmation step.
● Database: Updates the order status and initiates refund processes as needed.
● User Experience (UX): Transparent process for canceling orders, with clear status updates and refund
details.
4.2.24. View customer order list
Realization Steps:
Design Elements:
Order list view showing order number, customer name, status, and total amount.
● Database:
Stores customer order information, including order number, customer details, order
status, and total amount.
Clear layout and design help staff quickly understand order statuses and details.
Realization Steps:
● The staff member selects a specific customer order from the order list.
● The system retrieves and displays the detailed information of the selected order
21
● The staff member can review the order details and verify information as needed.
Design Elements:
Detailed view displaying all relevant information about the selected order.
● Database:
Stores detailed information related to customer orders, including itemized lists and order status.
User-friendly layout that allows for quick access to important order details.
Realization Steps:
● The staff member navigates to the search interface for customer orders.
● The staff member enters search criteria, such as customer name, order number, or order date,
into the search bar.
● The system processes the search request and retrieves matching customer orders based on the
provided criteria.
● The system displays a list of orders that match the search criteria, including order number,
customer name, order date, and order status.
● The staff member can select an order from the list to view its details or take further actions.
Design Elements:
Display of search results with relevant order details (order number, customer name, date, status).
● Database:
Stores customer order information, allowing for efficient querying based on search parameters.
Quick and intuitive search functionality improves staff efficiency in locating orders.
Clear results layout helps staff quickly identify the correct orders based on search criteria.
22
4.2.27. Approve or deny order
Realization Steps:
Design Elements:
Detailed view for each order showing customer and item information.
Buttons for approving or denying the order with an optional text field for reasons.
● Database:
Clear visual indicators for pending orders help staff prioritize their actions.
Realization Steps:
23
● The system updates the order status and saves the changes to the database.
● The system may trigger notifications to the customer regarding the status system notification.
Design Elements:
Detailed view for selected orders with an option to change the status.
● Database:
Stores order status information and tracks changes made by staff members.
Intuitive interface allows staff to quickly find and update order statuses.
Immediate feedback after status updates ensures staff members are aware of successful changes.
Realization Steps:
● The staff member navigates to the order management section or selects a specific customer order from
the order list.
● The system retrieves and displays the order details, including the customer’s information, order items,
quantities, total amount, taxes, and any discounts applied.
● The staff member reviews the order information to ensure accuracy before printing.
● The staff member selects the "Print Invoice" option.
● The system generates the invoice in a printable format (e.g., PDF) that includes all relevant details.
● The staff member confirms the print action, and the system sends the invoice to the connected printer.
● The staff member can also choose to save the invoice electronically for future reference.
Design Elements:
24
Order management interface showing an option to print the invoice for selected orders.
● Database:
Simplified printing process that allows staff to easily generate invoices with minimal steps.
Clear and organized invoice format that enhances readability and professionalism.
Realization Steps:
Design Elements:
Feedback management interface displaying a list of customer feedback entries with relevant details.
Detailed view for each feedback entry showing the customer's message and an input area for staff
responses.
● Database:
Stores customer feedback entries and staff responses for tracking and reporting purposes.
25
Intuitive layout that allows staff to easily access and respond to customer feedback.
Real-time updates ensure that customers are promptly informed about responses.
Clear communication of staff replies enhances customer satisfaction and builds trust.
Realization Steps:
Design Elements:
Complaint management interface displaying a list of customer complaints with key details.
Detailed view for each complaint entry, including customer messages and options for staff responses.
● Database:
Stores customer complaints, staff responses, and resolution histories for tracking and reporting.
User-friendly layout that allows staff to quickly access and manage customer complaints.
Clear action buttons for responding, escalating, or resolving complaints enhance workflow efficiency.
Timely notifications keep customers informed about the status of their complaints and resolutions.
26
4.2.32. Add new item
Realization Steps:
Design Elements:
● User Interface (UI): Form for inputting new item details with appropriate fields and a submission
button.
● Database: Stores item information including name, category, price, quantity, and other relevant details.
● Validation Logic: Ensures all required fields are filled and data formats are correct before submission.
● Inventory Management System: Updates to reflect the newly added item.
4.2.33. Update item information
Realization Steps:
Design Elements:
27
● Database:
○ Stores and updates item information
○ Maintains a log of changes for audit purposes
● Validation Logic:
○ Ensures all required fields are filled and data formats are correct
○ Checks for logical consistencies (e.g., non-negative prices and quantities)
● Inventory Management System:
○ Reflects real-time updates to item information
○ Potentially notifies relevant staff about significant changes (e.g., price changes)
4.2.34. Remove item
Realization Steps:
Design Elements:
Realization Steps:
28
○ Weekly revenue
○ Monthly revenue
○ Custom date range revenue
● Manager selects the specific time period for the report (if applicable).
● The system retrieves the relevant financial data from the database.
● The system generates the requested revenue report, including:
○ Total revenue for the selected period
○ Breakdown by product category (e.g., food, beverages, merchandise)
○ Comparison with previous periods (e.g., last week, last month)
○ Visual representations (charts/graphs) of revenue trends.
● The system displays the generated report on the screen.
● Manager can choose to export the report in various formats (e.g., PDF, Excel) if needed.
Design Elements:
Realization Steps:
29
○ Net profit margin
○ Breakdown by product category or department
○ Comparison with previous periods
○ Visual representations (charts/graphs) of profit trends
● The system displays the generated report on the screen.
● Manager can drill down into specific areas for more detailed information if needed.
● Manager has the option to export the report in various formats (e.g., PDF, Excel, CSV).
Design Elements:
Realization Steps:
30
● System displays a confirmation message for the successful cancellation.
● System updates the order list to reflect the cancellation.
Design Elements:
Realization Steps:
Design Elements:
31
Realization Steps:
Design Elements:
Realization Steps:
32
● Manager selects the "Delete" option for the chosen news.
● System prompts for confirmation of the deletion, warning about the permanent nature of the action.
● Manager confirms the deletion.
● System processes the deletion:
○ Removes the news from the active news database
○ Updates the news list
○ Removes associated media files (if applicable)
○ Updates any related indexes or tags
● System displays a confirmation message for the successful deletion.
● System logs the deletion action, recording who performed it and when.
Design Elements:
Realization Steps:
33
○ Manager confirms unpublishing.
○ System updates the content status to "Unpublished" or "Draft".
○ System removes the content from public view on the website or app.
● System displays a confirmation message for the successful action.
● System updates the content list to reflect the new publication status.
● System logs the publish/unpublish action, recording who performed it and when.
Design Elements:
Realization Steps:
● The user navigates to the "Account List" section from the main menu or dashboard.
● The system retrieves a list of all user accounts from the database, including relevant details such as
username, email, account status, and role (e.g., admin, user).
● The system displays the retrieved account list in a user-friendly format, allowing the user to view all
accounts at a glance.
● The user can sort or filter the account list by different criteria (e.g., by username, role, or account
status).
● The user has the option to click on individual accounts to view detailed information or manage
(edit/delete) the accounts, depending on their permissions.
Design Elements:
34
○ Sort and filter options to enhance the usability of the account list.
○ Action buttons or links for viewing more details or managing accounts (edit/delete).
● Database:
○ Stores user account information, which is retrieved to populate the account list.
○ Supports efficient querying for sorting and filtering options.
● User Experience:
○ A clear and organized display of account information that allows users to quickly find and
assess account details.
○ Intuitive navigation options for sorting, filtering, and managing accounts, making it easy for
users to perform necessary actions on the account list.
Realization Steps:
● The user navigates to the "Account List" section and selects an individual account to view its details.
● The system retrieves detailed information about the selected account from the database, including:
○ Username
○ Email address
○ Account status (e.g., active, inactive)
○ User role (e.g., admin, member)
○ Date of account creation
○ Last login date
○ Any other relevant attributes (e.g., profile information, activity logs)
● The system displays the retrieved account details in a clear and organized format on the account detail
page.
● The user can view all relevant information without the ability to edit it directly from this section.
● The user has the option to return to the "Account List" or navigate to other sections of the application.
Design Elements:
Realization Steps:
35
● The user navigates to the "Account List" section or a dedicated search area.
● The system displays a search bar for entering search criteria (e.g., username, email address).
● The user enters the desired search term(s) into the search bar.
● The user submits the search request by clicking a "Search" button or pressing the "Enter" key.
● The system queries the database for accounts that match the search criteria.
● The system retrieves and displays a list of accounts that meet the search conditions, including relevant
details such as username and email.
● If no accounts match the criteria, the system displays a message indicating that no results were found.
Design Elements:
Realization Steps:
● The user navigates to the "Account List" section and selects an account to activate or deactivate.
● The system displays the current status of the selected account (active or inactive).
● The user clicks on the "Activate" or "Deactivate" button, depending on the current status of the
account.
● The system prompts the user to confirm the action (e.g., "Are you sure you want to deactivate this
account?").
● If the user confirms, the system updates the account status in the database accordingly (activating or
deactivating the account).
● The system displays a success message indicating that the account status has been updated.
● The account list refreshes to reflect the new status of the account.
Design Elements:
● User Experience:
○ A straightforward and intuitive process for managing account statuses, ensuring users can
quickly activate or deactivate accounts as needed.
36
○ Clear feedback on the outcome of the action, reinforcing that the user's intent has been
successfully executed.
Realization Steps:
● The user navigates to the "Account List" section and selects a staff or manager account to update.
● The system retrieves the current account details from the database, including attributes such as:
○ Username
○ Email address
○ Role (staff or manager)
○ Phone number
○ Account status (active/inactive)
● The user modifies the necessary fields (e.g., updating the email address, role, or phone number).
● The user submits the updated information by clicking the "Save" or "Update" button.
● The system validates the updated information (e.g., checking for valid email format, required fields,
and role permissions).
● If the validation is successful, the system updates the account information in the database and displays
a success message.
● If validation fails, the system provides error messages indicating which fields need correction.
Design Elements:
Realization Steps:
● The user navigates to the "Create Account" or "Add Staff/Manager" section from the main menu.
37
● The system displays a form for entering new account details, including:
○ Username
○ Email address
○ Password
○ Role (staff or manager)
○ Phone number
○ Additional relevant attributes (e.g., department, permissions)
● The user fills in the required fields with the necessary information.
● The user submits the form by clicking the "Create" or "Save" button.
● The system validates the entered information (e.g., checking for valid email format, password strength,
and required fields).
● If the validation is successful, the system creates a new account in the database and displays a success
message.
● If validation fails, the system provides error messages indicating which fields need correction.
Design Elements:
5. LOGICAL VIEW
5.1. Overview
The web cafe restaurant system is logically divided into multiple subsystems and packages to ensure
modularity, scalability, and maintainability. Each package corresponds to a major functional area of the system,
such as user management, order processing, item management, and news handling.
● User: Represents both customers and staff members, with attributes such as Username, Password,
Role, and ProfileInformation. It manages user credentials and roles.
● Role: Defines user roles and permissions within the system, with attributes like RoleID, RoleName,
and Permissions.
38
● Order: Represents an order placed by the customer, containing attributes such as OrderID, Status,
DeliveryInfo, and relationships with Cart and User.
● OrderDetail: Represents detailed information about each item in an order, with attributes like
OrderDetailID, OrderID, ItemID, and Quantity.
● Cart: Manages items added by the user, containing attributes like CartID and UserID, and handles
operations such as AddToCart, RemoveFromCart, and Checkout.
● CartItem: Represents individual items within a cart, with attributes like CartItemID, CartID, ItemID,
and Quantity.
● Item: Represents products available in the cafe, with attributes such as ItemID, Name, Price,
StockLevel, and ItemType.
● ItemType: Defines types of items (e.g., food, drink, dessert), with attributes like ItemTypeID and
TypeName.
● News: Contains attributes such as NewsID, Title, Content, PublishedDate, and NewsTypeID. It
manages publishing and lifecycle operations of news.
● NewsType: Categorizes news, with attributes like NewsTypeID and TypeName.
● Feedback: Captures customer input with attributes such as FeedbackID, UserID, Message, and
ResponseStatus, facilitating tracking and resolution of feedback and complaints.
● SupplyOrder: Represents orders made to suppliers, with attributes like SupplyOrderID, SupplierID,
OrderDate, and Status.
● Report: Generates various reports for management analysis, such as sales or inventory reports, with
attributes like ReportID, ReportType, and GeneratedDate.
39
The system employs key relationships such as:
● Aggregation between User and Order, where a user can have multiple orders associated with their
account.
● Association between Cart and Item, where a cart contains a list of items that users can add or remove.
● Composition between Order and OrderDetail, as the OrderDetail instances depend entirely on the
existence of the associated Order; if the Order is deleted, its related OrderDetails will also be removed.
40
Enhanced MVC Architecture Description
Overview
The diagram illustrates an enhanced MVC architecture, in which the Model is divided into independent layers
(Service and Repository) to improve maintainability and scalability.
Components
1. View (V)
○ CRS View: The user interface.
○ Handles input and output interactions with the user.
○ Communicates bidirectionally with the Controller through Request/Reply and Forward.
2. Controller (C)
○ CRS Controller & Controller Classes:
○ Processes requests from the View.
○ Coordinates the workflow.
○ Calls the Service layer to perform business logic.
3. Model (M) - Divided into 3 Layers:
○ Service Layer:
■ CRS Service: Defines interfaces for operations.
■ CRS Service Implementation: Implements business logic.
○ Domain Model:
■ CRS Entity: Domain objects.
○ Repository Layer:
■ CRS Repository: Interfaces for data access.
■ CRS Repository Implementation: Implements data access.
41
5.2. Architecturally Significant Design Packages
The system is divided into packages based on key functional areas to ensure modularization, adhere to the
Separation of Concerns principle, and facilitate easy maintenance and scalability. Each package focuses on a
specific domain of the system:
1. User Management: This package contains functionality related to user authentication, authorization,
and profile management. It includes use cases such as Registration, Login, Logout, Password Reset,
Profile Update, and managing staff and customer accounts.
2. News Management: Handles all content related to the news section of the system, including use cases
like Viewing News List, Viewing News Details, Searching News, Adding News, Editing Existing
Content, Deleting Outdated News, and Publishing or Unpublishing News.
3. Item Management: Manages information related to the cafe's products, such as menu items and
inventory. It includes use cases like Viewing Item List, Item Details, Searching Items, Adding New
Items, Updating Items, Removing Items, Checking Stock Levels, and Ordering Supplies.
4. Cart Management: Responsible for handling the customer's cart operations, such as Adding Items to
Cart, Editing Cart, and Checking Out.
5. Order Management: Manages customer orders, including use cases such as Viewing Order List,
Order Details, Searching Orders, Updating Delivery Information, Canceling Orders, Processing
Special Orders, and Updating Order Status. This package also includes generating and printing
invoices.
6. Feedback Management: Handles customer feedback, including Sending Feedback, Replying to
Customer Feedback, and Managing Customer Complaints.
7. Report Management: Focuses on generating and viewing key system reports, such as Revenue
Reports and Profit Reports.
42
6. PROCESS VIEW
6.1. Register
43
6.2. View Home Page
44
6.3. View News List
45
6.4. View News Detail
46
6.5. Search News
47
6.6. View Items List
48
6.7. View Items Detail
49
6.8. Search Items
50
6.9. Log in
51
6.11. Reset Password
52
6.12. Change Password
53
6.13. Update Profile
54
6.15. Add to cart
55
6.17. Check out
56
6.19. View Order List
57
6.21. Search Order
58
6.23. Cancel order
59
6.25. View customer order detail
60
6.27. Approve/Deny order
61
6.29. Add new item
62
6.30. Update item information
63
6.31. Remove item
64
6.32. Add revenue reports
65
6.33. View profit reports
66
6.34. Cancel orders
67
6.35. Add new news
68
6.36. Edit existing news
69
6.37. Delete outdated news
70
6.38. Publish or unpublish
71
6.39. View account list
72
6.41. Search account
73
6.43. Update staff/manager account
74
6.44. Create staff/manager account
7. DEPLOYMENT VIEW
75
○ Configure SSL certificates for secure HTTPS connections.
"ConnectionStrings": {
"DefaultConnection":
"Server=localhost;Database=CafeRestaurantDB;Trusted_Connection=True;MultipleActiveResultSets=
true;TrustServerCertificate=True"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
},
"AllowedHosts": "*"
● Environment-Specific Configurations:
○ Create appsettings.Development.json for development environment settings.
76
○ Create appsettings.Production.json for production environment settings.
● Launch Settings: Configure launchSettings.json
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"CafeRestaurantSystem": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
77
○ Obtain and configure a valid SSL certificate (consider using Let's Encrypt for free
certificates).
● Firewall and Network Security:
○ Configure Windows Firewall to allow inbound connections only on necessary ports (80, 443).
○ Restrict SQL Server access to only accept local connections or connections from specified IP
addresses.
78
7.2. Mapping of Processes to Physical Nodes
Deployment diagram
8. IMPLEMENTATION VIEW
8.1. Overview
The Cafe Restaurant System Website is organized into several layers, each containing specific subsystems and
components. The primary layers are:
Packages:
● Models: Contains package using store package related to DTO and Entity of the database.
● View: Contains package using store package related to Customer, Admin, Item, News, Order,
Shipment, Feedback and these package store file relate html css using display data.
● Controllers: Contains common business logic components Customer, Admin, Item, News, Order,
Shipment, Feedback.
● Data: Contains DBContext, Data to insert into Database, ..etc.
● Repositories: Provides an abstraction over the data layer, which typically involves communication
with a database.
79
● Services: Contains the business logic. Services work with repositories and perform business-oriented
tasks such as validation, orchestration of multiple operations, or combining different entities.
● Utils: Helper classes or methods designed to simplify repetitive tasks or perform common operations
across an application.
8.2. Layers
8.2.1: Data
*DBContext: Manages the database context and connections, providing a bridge between the application
and the database.
8.2.2: Views
80
*User: Contains HTML and CSS files for customer-facing pages like login, profile, order.
*News: Manages HTML and CSS for admin, manager, staff interfaces such as dashboards,
profile, manage order, manage item, manage account, manage news.
*Items: Holds HTML and CSS for product-related pages, including listings and detailed item
views.
*News: Stores HTML and CSS for news and blog sections, including news listings.
*Order: Contains HTML and CSS for order management views like cart, checkout, and order
summaries.
8.2.3: Models
*DTOs ( Data Transfer Objects ): Simplified objects for transferring data between layers or
over the network, excluding unnecessary or sensitive information.
81
*Entities: Represent the core data structures of Cafe Restaurant System, typically mapping
directly to database tables ( )
8.2.4: Controllers
*UserController: Handles administrative tasks such as managing accounts, items, news, orders,
and dashboard functionality. Manages customer-related actions like registration, login, profile
management, and order history.
*ItemController: Manages item-related operations including product listing, search, and detailed
views.
*NewsController: Handles news-related actions like displaying news, managing blogs, and
loading news listings.
*OrderController: Manages the ordering process, including cart management, checkout, and
order tracking.
8.2.5: Repositories
82
● Repository: It contains the actual logic for interacting with the database, such as executing queries or
using an ORM (e.g., Entity Framework) to manage data.
● IRepository: Interface that defines the contract for the repository layer. It declares the methods that
will be used to interact with the database or other data sources, but it does not provide any
implementation details.
8.2.6: Services
● Service: It provides the logic for the methods declared in the interface. This class performs the actual
work, such as interacting with the database, applying business rules, and so on.
● IService: The interface is used to define the methods without specifying how they should be
implemented.
8.2.7: Utils
● Helper classes or methods designed to simplify repetitive tasks or perform common operations across
an application.
9.1.3 Database
83
● Menu Data: 100 menu items (with details like price and availability).
● Transaction Logs: 50 GB/year of order data
● Assessment Data: 1 million assessment records
9.2.2 Scalability
● Horizontal Scalability: The system should support adding more servers to handle increased traffic
and user load.
● Vertical Scalability: The system should allow upgrading existing server hardware to manage
increased demand.
9.2.3 Availability
● Uptime: 99.9% availability (less than 8.77 hours of downtime per year)
● Failover: Automatic failover to backup systems in case of primary system failure
9.2.4 Security
● Data Encryption: All sensitive data must be encrypted both in transit and at rest.
● DDoS Protection: Implement measures to mitigate and manage distributed denial-of-service attacks.
● Load Distribution: Efficiently distribute load across multiple servers to prevent any single server
from becoming a bottleneck ( When many users access a system simultaneously, a single server can
become overwhelmed, leading to slow response times or even crashes. Load distribution ensures that no
single server handles too many requests, which helps maintain system performance.).
● Session Management: Ensure consistent and reliable session management across distributed servers.
9.2.6 Latency
● Global User Access: Utilize a CDN (Content Delivery Network) to minimize latency for users
accessing the website from various locations.
● Database Replication: Implement database replication strategies to ensure low latency for read
operations across different regions.
84
9.2.7 Backup and Recovery
● Regular Backups: Perform full backups weekly and incremental backups daily.
● Recovery Time Objective (RTO): < 1 hour
● Recovery Point Objective (RPO): < 15 minutes
By addressing these size and performance characteristics, the architecture of the Cafe Restaurant
Management website can be designed to meet expected user demand, perform efficiently under load, and
maintain reliability and security.
10. QUALITY
The software architecture of the Cafe Restaurant Management website has been carefully designed to
address a range of quality attributes beyond its basic functionality. These attributes ensure the system
remains robust, scalable, and capable of meeting the growing needs of users and administrators. Below is
a detailed description of how the architecture supports key quality attributes:
10.1 Extensibility
● Modular Design: The system follows a modular design, allowing for the easy addition of new features
without disrupting existing functionality.
● APIs: Well-defined RESTful APIs facilitate seamless integration of new modules and third-party
tools, ensuring future scalability.
● Plugin Support: The platform supports plugins and extensions, enabling developers to enhance
system capabilities without altering the core architecture.
10.2 Reliability
● Redundancy: Critical components, such as the database and servers, are deployed with redundancy to
eliminate single points of failure.
● Automated Failover: In case of a failure, automated failover mechanisms ensure continued operation
with minimal downtime.
● Continuous Monitoring: The system uses continuous monitoring to track performance and identify
issues early, allowing for proactive fixes and maintenance.
10.3 Portability
● Cloud-Agnostic: The architecture is cloud-agnostic, meaning it can be deployed on any cloud provider
(AWS, Azure) or an on-premises setup.
● Containerization: Technologies like Docker are used to ensure that the system runs consistently
across various environments, whether in development or production.
● Cross-Platform Support: The front-end design ensures compatibility across multiple devices
(desktops, tablets, smartphones) and modern web browsers.
10.4 Security
● Data Encryption: Sensitive data is encrypted both in transit and at rest using industry-standard
encryption protocols.
85
● Authentication and Authorization: Role-based access control (RBAC) secures both user and
administrative access, ensuring that users only have access to necessary data.
● Regular Audits: Regular security audits are conducted to identify and mitigate vulnerabilities.
10.5 Performance
● Caching: Caching mechanisms reduce server load and improve response times, especially during high
traffic periods.
● Scalable Infrastructure: The system is designed for horizontal scaling, meaning additional servers
can be added to handle traffic during busy hours.
● Optimized Code: Performance optimizations are applied across the codebase to ensure efficient
resource use and fast execution.
10.6 Usability
● User-Centric Design: The user interface (UI) prioritizes user experience (UX), ensuring an intuitive,
easy-to-navigate system.
● Accessibility: The platform does not yet fully implement accessibility standards for users with
disabilities but is designed with potential future improvements in mind.
10.7 Maintainability
● Code Quality: The system follows strict coding standards and code review practices to ensure
maintainability.
● Documentation: Comprehensive documentation, including API references, is provided to facilitate
ongoing maintenance and future updates.
● Automated Testing: Automated testing (unit, integration, and end-to-end) ensures new updates do not
break existing functionality.
10.8 Privacy
● Compliance: The system is designed to comply with data protection regulations (GDPR) to safeguard
user privacy.
● Data Minimization: Only essential user and order data are collected, limiting the risk of exposure in
case of data breaches.
● User Control: Users have control over their data, with the ability to view, update, or delete personal
information as needed.
10.9 Availability
● High Availability: Load balancing, failover mechanisms, and geographically distributed servers
ensure minimal downtime and maximum availability, especially during peak hours.
● Backup and Restore: Regular data backups and disaster recovery plans are in place, ensuring data can
be quickly restored in case of loss.
By focusing on these quality attributes, the architecture of the Cafe Restaurant Management website
ensures it is not only functional but also reliable, secure, and adaptable for future expansion and user
demands.
86
11. OTHER CONSIDERATIONS
In the selection process for the architecture of the Cafe Restaurant Management website,
several architectural approaches were evaluated. The chosen architecture is monolithic, selected after a
thorough comparison with other options, such as microservices architecture. Below is a detailed
explanation of the advantages and disadvantages of the selected architecture compared to these
alternatives, along with the rationale for its selection.
11.1.1 Advantages
● Simplicity: The entire application is a single codebase, making it easier for developers to understand,
manage, and deploy without dealing with inter-service communication complexities.
● Performance: Faster execution of operations since all components communicate internally without
network latency, which is crucial during peak hours for quick service.
● Easier Debugging: With a unified codebase, tracking issues and logging becomes straightforward,
facilitating quicker problem resolution.
11.1.2 Disadvantages
● Scalability Limitations: To handle increased traffic, the entire application must be scaled up, which
can be resource-intensive and costly, particularly when only specific functionalities require more
resources.
● Deployment Risks: Introducing new features may require redeploying the entire application, which
can lead to longer downtimes and potential bugs affecting all users.
● Single Point of Failure: If any part of the application fails, it can cause the entire system to go down,
impacting all users and operations.
Here’s a more focused version of the Advantages and Disadvantages sections for both Monolithic and
Microservices Architecture tailored for the Cafe Restaurant Management website:
● Simplicity: The entire application is a single codebase, making it easier for developers to understand,
manage, and deploy without dealing with inter-service communication complexities.
● Performance: Faster execution of operations since all components communicate internally without
network latency, which is crucial during peak hours for quick service.
● Easier Debugging: With a unified codebase, tracking issues and logging becomes straightforward,
facilitating quicker problem resolution.
11.1.2 Disadvantages
87
● Scalability Limitations: To handle increased traffic, the entire application must be scaled up, which
can be resource-intensive and costly, particularly when only specific functionalities require more
resources.
● Deployment Risks: Introducing new features may require redeploying the entire application, which
can lead to longer downtimes and potential bugs affecting all users.
● Single Point of Failure: If any part of the application fails, it can cause the entire system to go down,
impacting all users and operations.
11.2.1 Advantages
● Independent Scalability: Each service can be scaled based on its unique demand, allowing for
efficient resource allocation, especially during peak hours in the café.
● Flexibility in Development: New features can be developed and deployed independently, enabling
faster updates and enhancements without affecting other parts of the system.
● Fault Tolerance: If one service fails, it does not bring down the entire application, ensuring continued
operation and minimizing disruptions for users.
● Technology Diversity: Different services can utilize various technologies and languages tailored to
their specific needs, promoting innovation and optimal performance.
11.2.2 Disadvantages
Although microservices provide significant advantages in scalability, flexibility, and fault isolation, they
also introduce substantial complexity in deployment, monitoring, and maintenance. The communication
overhead and challenges in data management were considered significant for a Cafe Restaurant
Management website, which is expected to handle substantial growth and varying loads. Given these
factors, the monolithic architecture was deemed more appropriate due to its balance of simplicity,
performance, and ease of debugging.
88