Professional Documents
Culture Documents
YUNUSA ISHAQ 云山
Student ID: 202352200010
30/11/2023
This document describes the design goals set by the project, subsystem decomposition (with UML
class diagrams), hardware/software mapping (with UML deployment diagrams), data management,
access control, boundary conditions, and the services provided by the subsystems of the SMIS.
Table of Contents
1. Introduction............................................................................................................................................................. 4
1.1 Purpose of the System................................................................................................................................ 4
1.2 Design Goals................................................................................................................................................... 4
1.2.1 Operational Efficiency........................................................................................................................ 4
1.2.2 Extensibility............................................................................................................................................. 4
1.2.3 Enhanced Customer Engagement:................................................................................................ 5
1.2.4 Data-Driven Decision-making:........................................................................................................ 5
1.2.5 Operational Efficiency and Cost Reduction:..............................................................................5
1.2.6 Scalability and Adaptability:............................................................................................................. 5
1.3 Definitions, acronyms and abbreviations............................................................................................. 5
2. System design......................................................................................................................................................... 6
2.1 Subsystem Decomposition........................................................................................................................ 7
2.1.1 Presentation Layer............................................................................................................................... 8
2.1.2 Business Logic Layer........................................................................................................................... 8
2.1.3 Data Logic Layer................................................................................................................................ 10
2.2 Hardware/Software Mapping................................................................................................................ 10
2.3 Hardware Components............................................................................................................................ 11
2.4 Software Components:............................................................................................................................. 11
2.5 Access Control and Security................................................................................................................... 12
2.6 Global Software Control........................................................................................................................... 12
2.7 Boundary Conditions................................................................................................................................. 13
2.7.1 Start-up Boundary Conditions:..................................................................................................... 13
2.7.2 Shutdown Boundary Condition:................................................................................................... 14
2.7.3 Error Behavior Boundary Conditios:........................................................................................... 14
2.7.4 Objectives of Boundary Conditions:........................................................................................... 15
3. Object Design....................................................................................................................................................... 16
3.1 Detailed Object Design............................................................................................................................ 16
3.2 Admin Portal User Interface................................................................................................................... 17
3.3 SPMS User Interface.................................................................................................................................. 19
3.4 Employee Portal User Interface............................................................................................................. 20
3.5 Customer Portal Logic.............................................................................................................................. 21
3.6 SPMS Logic................................................................................................................................................... 22
3.7 Notifications Service.................................................................................................................................. 27
3.8 Data Management Logic......................................................................................................................... 31
4. Database Design................................................................................................................................................. 33
4.1 ER diagram.................................................................................................................................................... 33
4.2 Flowchart....................................................................................................................................................... 34
5. GUI mockups........................................................................................................................................................ 34
1. Introduction
1.1 Purpose of the System
The purpose of the supermarket management system is to comprehensively oversee and
coordinate diverse retail activities, encompassing inventory control, sales monitoring, customer
engagement, and insightful reporting. By harmonizing these functions, the system aims to
streamline operational workflows, elevate customer satisfaction through personalized
experiences, and drive strategic decision-making for maximizing business efficiency and growth
opportunities.
Smooth Transaction Processing: Create an intuitive interface for quick and accurate
checkout processes, reducing waiting times and errors.
1.2.2 Extensibility
The system must allow for enhancements to be made to existing functions, as well as the
incorporation of completely new ones. The use of an object-oriented architecture will be used to
achieve this. By using an object-oriented architecture modifications can be made to existing
functionality as well as adding new functionality without breaking its current functions. This goal
will be achieved through the use of object-oriented concepts such as abstraction,
encapsulation, and inheritance along with the use of some design patterns.
2. System design
This section documents the system design model of the new system.
2.1 Subsystem Decomposition
1. Admin User Interface: The Admin User Interface consists of the classes and
components that are responsible for the graphical user interfaces Login screens and
authentication mechanisms for secure access to the admin interface. Permission-based
access controls to restrict functionalities based on user roles and responsibilities.
2. SPMS User Interface: The SPMS User Interface subsystem consists of the classes and
components that are responsible to provide a seamless and efficient experience for users
interacting with the Supermarket Management System, catering to their specific roles
and requirements within the supermarket environment.
3. Employee Portal User Interface: The Employee Portal User Interface subsystem consists
of the classes and components that are responsible for the graphical user interfaces that
Shows inventory levels, stock updates, and product details.
1. Data Management Logic: The Data Management Logic subsystem consists of the
classes used to handle interactions with the database.
2. Client Devices:
Customer Devices: PCs, tablets, or mobile devices for accessing the customer
portal.
3. Networking Infrastructure:
2. Database Software:
By implementing robust access control measures, SPMS ensures that users have appropriate
access to system functionalities, enhancing security and maintaining the integrity of the
Supermarket Management System.
During user registration, assign an appropriate role (Admin, Employee, or Customer) based on
user type. Admins have the authority to create and manage user accounts.
Implement a secure login mechanism requiring valid credentials. Employ encryption techniques
to protect sensitive user data during authentication.
Continuous Improvement:
Feedback Mechanisms:
Enforce coding standards and best practices across the development team.
Use static code analysis tools to identify and address deviations from standards
2. Database Connectivity:
3. Role-Based Initialization:
Load user roles, permissions, and access control settings during startup.
Activate logging and monitoring mechanisms from the startup phase to track
system behavior.
Check that logging systems are functional and capable of recording startup-
related events.
2.7.2 Shutdown Boundary Condition:
1. Graceful Termination:
2. Data Persistence:
Ensure that critical data is saved and persisted to the database before shutdown.
3. Resource Cleanup:
1. Input Validation:
Implement thorough input validation to prevent invalid data from causing errors.
Provide clear error messages for users to understand and correct input mistakes.
2. Exception Handling:
Use robust exception handling mechanisms to catch and log errors during
runtime.
3. Graceful Degradation:
In the case of non-fatal errors, allow the system to continue functioning with
reduced functionality.
4. Security Errors:
5. Performance Thresholds:
6. Recovery Mechanisms:
Integrity: Safeguard data integrity during system startup, shutdown, and error scenarios.
User Experience: Provide clear and user-friendly error messages to assist users in
resolving issues.
Additional relationship:
A customer can have multiple orders, indicating that a customer places several orders.
An inventory is associated with products, indicating that inventory includes different products.
1. AdminDashboard:
Components:
AdminHome: Manages the home screen for the administrator.
2. ProductManagement:
Components:
3. InventoryManagement:
Components:
4. OrderManagement:
Components:
5. CustomerManagement:
Components:
6. SystemConfiguration:
Components:
The SPMS User Interface subsystem consists of the classes and components that are responsible
for the graphical user interface to the administrative office. This includes the SMIS menu as well
as the html pages and the navigation logic for the SPMS.
The Menu class is used to hold the different menu items that comprise of subsystem's menu and
the UI Manager handles the display of the different user interfaces of the SMIS. Since the SMIS is
a complex subsystem it makes use of submenus which are created using the SubMenu class.
3.4 Employee Portal User Interface
Employee Dashboard:
Order Processing:
Interface for processing customer orders, updating order status, and managing
order-related tasks.
Inventory Management:
Tools for managing stock levels, adding new items, and updating existing ones.
Customer Interaction:
Interface for viewing customer details, order history, and handling customer
inquiries.
Customer Dashboard:
Product Browsing:
Allows customers to browse products by category, view product details, and add
products to the shopping cart.
Interface for managing the shopping cart, reviewing selected items, and
proceeding to checkout.
Order Tracking:
The SPMS system involves various interactions and processes for managing inventory,
processing orders, and maintaining customer information. Below is a high-level overview of the
SPMS logic.
Authentication verifies user identity, and authorization checks their roles and
permissions.
Dashboard:
Upon login, administrators are directed to the dashboard.
Employee Management:
Inventory Management:
Tools for managing stock levels, adding new items, and updating existing
ones.
Product Management:
Order Management:
Tools for handling order exceptions and ensuring timely order processing.
Customer Management:
System Configuration:
Order Processing:
Inventory Management:
Tools for managing stock levels, adding new items, and updating existing
ones.
Customer Interaction:
Dashboard:
Product Browsing:
Interface for managing the shopping cart, reviewing selected items, and
proceeding to checkout.
Order Tracking:
Account Management:
Placing Orders:
Order Fulfillment:
The system monitors stock levels and generates alerts for low stock.
Administrators can add new products and update existing product details.
Customer Registration:
Data Encryption:
Access Control:
Role-based access control ensures that users have appropriate
permissions.
Audit Trail:
Exception Handling:
Generating Reports:
The Notifications Service subsystem consists of the classes used queue and send various system
notifications both internal to the system and external.
Notification Engine
1. Types of Notifications:
Order Updates:
Notify customers about order status changes (e.g., order placed, order
processed, order shipped).
Inventory Alerts:
2. Communication Channels:
Email Notifications:
Send detailed notifications via email for order updates, inventory alerts,
and system alerts.
SMS Notifications:
In-App Notifications:
3. Notification Triggers:
Order Processing:
Inventory Management:
Trigger alerts for low stock levels, successful inventory updates, or critical
inventory changes.
System Events:
5. Notification Templates:
Integrate the notification service with relevant SPMS modules (e.g., Order
Processing, Inventory Management).
9. Security Measures:
Order Processed:
Customer receives an email and SMS notifying them that the order has been
processed.
An EmailNotification is created for the customer and sent via the NotificationService
Data Controller
Main.py
Admin.py