You are on page 1of 37

Nanjing University of Information Science and Technology

Supermarket Management System

System Design Document

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.

1.2 Design Goals


Design goals for a supermarket management System revolve around enhancing operational
efficiency, improving customer experiences, and ensuring scalability. Here's an outline of these
goals:

1.2.1 Operational Efficiency


Operational efficiency within a supermarket Management System refers to the ability of the
system to optimize and streamline various operational processes and workflows involved in
running a retail business. Here's a detailed explanation:

 Streamlined Inventory Management: Design the system to efficiently track stock


levels, automate reordering processes, and optimize inventory turnover.

 Smooth Transaction Processing: Create an intuitive interface for quick and accurate
checkout processes, reducing waiting times and errors.

 Integrated Data Management: Ensure seamless integration between inventory, sales,


and customer data for real-time insights and informed decision-making.

 Automated Reporting: Implement reporting features to generate comprehensive


analytics, aiding in identifying trends and enhancing operational strategies.

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.

1.2.3 Enhanced Customer Engagement:


The system focuses on elevating customer experiences by implementing features like
personalized promotions, loyalty programs, and responsive customer service. By understanding
customer preferences and behavior, the system tailors services to provide a more engaging and
personalized shopping journey.

1.2.4 Data-Driven Decision-making:


The system compiles and analyzes comprehensive data from various operational aspects,
providing insights into sales trends, inventory performance, and customer behaviors. These
data-driven insights empower managerial decisions, aiding in strategic planning and optimizing
resource allocation.

1.2.5 Operational Efficiency and Cost Reduction:


By y automating routine tasks, optimizing inventory levels, and reducing manual errors, the
system aims to improve operational efficiency. This efficiency minimizes overhead costs,
enhances resource utilization, and maximizes profitability.

1.2.6 Scalability and Adaptability:


The system is designed with scalability in mind, capable of accommodating business growth,
additional products, or expanding to new locations. The system's adaptable architecture ensures
it remains relevant and effective as the supermarket evolves.

In summary, the Supermarket Management System serves as a comprehensive solution to


optimize supermarket operations, prioritize customer satisfaction, harness data-driven insights,
and drive continual growth and innovation within the retail business.

1.3 Definitions, acronyms and abbreviations


1. SMS: Supermarket Management System

2. POS: Point of Sale

3. ERP: Enterprise Resource Planning

4. CRM: Customer Relationship Management

5. BI: Business Intelligence

6. RFID: Radio-Frequency Identification

7. SKU: Stock Keeping Unit

8. API: Application Programming Interface

9. KPI: Key Performance Indicator

10. CSV: Comma-Separated Values

11. SQL: Structured Query Language

12. API: Application Programming Interface

13. UI: User Interface

14. UX: User Experience

15. PDF: Portable Document Format

16. XML: Extensible Markup Language

17. HTML: Hypertext Markup Language

18. CSS: Cascading Style Sheets

19. BI: Barcode Inventory

2. System design
This section documents the system design model of the new system.
2.1 Subsystem Decomposition

Figure 2.1.1 High-Level Representation of Subsystem Decomposition

The system will be implemented using a three-tier architecture consisting of a presentation


layer, business logic layer, and a data logic layer. Each layer is comprised of a set of subsystems
that have high coherence. The subsystems in the presentation layer are responsible for handling
the visual elements of the system, including the arrangement and display of menus and screens.
The business logic layer contains controller classes which handle the processing of instructions
executed in the presentation layer and serves as a bridge between the presentation layer and
the data logic layer which interacts with the database. Lastly the data logic layer contains classes
that are used to handle interactions with the database in order to read and write information.
2.1.1 Presentation Layer

Figure 2.1.2 High-Level Representation of Presentation Layer

The SPMS presentation layer consists of the following subsystems:

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.

2.1.2 Business Logic Layer


The Business Logic Layer of the Supermarket Management System (SPMS) is responsible for
implementing the core business rules, processes, and functionalities. This layer ensures that the
system behaves in a way that aligns with the business requirements and objectives. Here's an
explanation of the Business Logic Layer for SPMS:
Figure 2.1.3 High-Level Representation of Business Layer

The SPMS business layer consists of the following subsystems:

1. Order Processing: Implements rules for processing customer orders, including


validation of product availability, pricing, and order status updates.
2. Inventory Management: Enforces logic for managing inventory levels, handling
restocking procedures, and updating product information.
3. User Authentication and Authorization: Implements mechanisms for user
authentication during login, ensuring secure access to the system.
4. Sales and Transaction Handling: Manages the sales process, calculates total amounts,
applies discounts, and updates transaction records.
5. User Management: Handles user roles, permissions, and access control based on
administrative policies.
2.1.3 Data Logic Layer
The Data Logic Layer of a system manages the interaction between the Business Logic Layer and
the underlying data storage. For the Supermarket Management System (SPMS), the Data Logic
Layer is responsible for handling data access, manipulation, and storage. Here's an overview:

Figure 2.1.4 High-Level Representation of Data Logic Layer

The SPMS data logic layer consists of the following subsystems:

1. Data Management Logic: The Data Management Logic subsystem consists of the
classes used to handle interactions with the database.

2.2 Hardware/Software Mapping

Figure 2.2.1SMIS Deployment Diagram


A Hardware/Software Mapping Diagram illustrates the relationship between hardware
components and the software elements they support or interact with within a system. In the
context of the Supermarket Management System (SPMS), let's outline a simplified
representation.

2.3 Hardware Components


1. Server Hardware:

 Centralized Server: Hosting the SPMS application and database.

 Specifications: CPU, RAM, Storage (HDD/SSD), Network Interface Cards (NICs).

2. Client Devices:

 Point of Sale (POS) Terminals: Used by cashiers for transaction processing.

 Workstations: Used by employees for admin tasks, inventory management, etc.

 Customer Devices: PCs, tablets, or mobile devices for accessing the customer
portal.

3. Networking Infrastructure:

 Local Area Network (LAN): Connecting devices within the supermarket.

 Internet Connectivity: Providing external access and online functionalities.

2.4 Software Components:


1. Application Software:

 SPMS Application: Front-end and back-end software modules of the


Supermarket Management System.

 Programming Languages: (e.g., Java for back-end, HTML/CSS/JavaScript for


front-end).

 Frameworks and Libraries: (e.g., Spring Boot, Hibernate, React/Angular/Vue.js).

2. Database Software:

 Relational Database Management System (RDBMS): Storing SPMS data.

 Database Engine: (e.g., MySQL, PostgreSQL, Oracle).


2.5 Access Control and Security
SMIS Employee Portal Admin Portal
Admin Login() Additem()
GenerateReport()
ViewItem()
Employee Additem()
Updateinventory()
Deleteitem()
ViewItem()
Customer Checkin()
Figure 2.4.1 SPMS Access Matrix

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.

Login and Authentication:

Implement a secure login mechanism requiring valid credentials. Employ encryption techniques
to protect sensitive user data during authentication.

2.6 Global Software Control


Global Software Control refers to managing and governing the software components, versions,
and changes across a system or organization on a global scale. In the context of the
Supermarket Management System (SPMS), ensuring effective software control is essential for
maintaining consistency, stability, and security. Here are key considerations for Global Software
Control:

Continuous Improvement:

Feedback Mechanisms:

 Establish feedback mechanisms for developers and stakeholders to provide


insights on software control processes.

 Use feedback to continuously improve and optimize software control practices.


Compliance and Standards:

Adherence to Coding Standards:

 Enforce coding standards and best practices across the development team.

 Use static code analysis tools to identify and address deviations from standards

2.7 Boundary Conditions


Boundary conditions in software engineering define the limits or edges within which a system
functions. For the Supermarket Management System (SPMS), let's outline boundary conditions
for startup, shutdown, and error behavior:

2.7.1 Start-up Boundary Conditions:


1. System Initialization:

 Ensure that all necessary configurations, databases, and dependencies are


properly initialized during system startup.

 Validate the connection to external services, such as payment gateways or third-


party APIs.

2. Database Connectivity:

 The system should establish a connection to the database upon startup.

 Handle database connection errors gracefully and provide meaningful error


messages.

3. Role-Based Initialization:

 Load user roles, permissions, and access control settings during startup.

 Validate the integrity of role-based access controls.

4. Logging and Monitoring:

 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:

 Allow ongoing transactions or processes to complete before initiating system


shutdown.

 Notify users and administrators about the impending shutdown with a


configurable grace period.

2. Data Persistence:

 Ensure that critical data is saved and persisted to the database before shutdown.

 Confirm that data integrity is maintained during the shutdown process.

3. Resource Cleanup:

 Release system resources, such as memory or connections, during the shutdown


process.

 Verify that resource cleanup procedures are executed without errors.

2.7.3 Error Behavior Boundary Conditios:


If the system encounters errors while processing navigation requests, a navigation error screen
will be displayed stating a brief description of the error encountered and the steps that can be
used to remedy the situation.

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.

 Display user-friendly error messages and report detailed information to


administrators.

3. Graceful Degradation:
 In the case of non-fatal errors, allow the system to continue functioning with
reduced functionality.

 Implement mechanisms for graceful degradation to minimize service


interruptions.

4. Security Errors:

 Detect and handle security-related errors, such as unauthorized access attempts


or potential vulnerabilities.

 Log security events and notify administrators of security incidents.

5. Performance Thresholds:

 Monitor and set thresholds for system performance.

 Trigger alerts or actions when performance thresholds are exceeded to prevent


system degradation.

6. Recovery Mechanisms:

 Implement recovery mechanisms to address errors and restore the system to a


stable state.

 Provide administrators with tools to analyze and troubleshoot error conditions.

2.7.4 Objectives of Boundary Conditions:


 Robustness: Ensure the system can handle unexpected inputs and errors without
crashing.

 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.

 Continuous Monitoring: Implement mechanisms to monitor system behavior and


detect abnormal conditions
3. Object Design
3.1 Detailed Object Design
The detailed object design for the Supermarket Management System (SPMS) involves
specifying the classes, their attributes, methods, relationships, and behaviors. Below is an
illustrative example of how you might structure the object design for key entities in SPMS:

3.1.1 Detailed Object Design

Additional relationship:

10. Association between Customer and Order:

 A customer can have multiple orders, indicating that a customer places several orders.

11. Association between Employee and Inventory:


 An employee is associated with inventory, suggesting that an employee manages or has access to
inventory.

12. Association between Administrator and Employee:

 An administrator is associated with employees, indicating that an administrator may manage or


oversee employees.

13. Association between Inventory and Product:

 An inventory is associated with products, indicating that inventory includes different products.

3.2 Admin Portal User Interface

Figure 3.2.1 Admin Portal UI

3.2.1 Detailed Package Descriptions

1. AdminDashboard:

 Description: Represents the main dashboard for administrators.

 Components:
 AdminHome: Manages the home screen for the administrator.

 SalesAnalytics: Provides tools for viewing sales analytics and reports.

 EmployeeManagement: Allows the administrator to manage employees.

2. ProductManagement:

 Description: Handles product-related functionalities for administrators.

 Components:

 ProductList: Displays a list of products and their details.

 AddProduct: Provides a form for adding new products to the inventory.

 UpdateProduct: Allows the administrator to update product information.

3. InventoryManagement:

 Description: Manages inventory-related functionalities for administrators.

 Components:

 InventoryList: Displays a list of current inventory items.

 AddInventoryItem: Enables the addition of new items to the inventory.

 UpdateInventoryItem: Allows the administrator to update inventory item


details.

4. OrderManagement:

 Description: Handles order-related functionalities for administrators.

 Components:

 OrderList: Displays a list of customer orders and their details.

 ProcessOrder: Provides tools for processing customer orders.

5. CustomerManagement:

 Description: Manages customer-related functionalities for administrators.

 Components:

 CustomerList: Displays a list of registered customers.


 ViewCustomerDetails: Allows the administrator to view detailed
information about a specific customer.

6. SystemConfiguration:

 Description: Handles system configuration functionalities for administrators.

 Components:

 GeneralSettings: Manages general system settings.

 UserRoles: Allows the administrator to configure user roles and


permissions

3.3 SPMS User Interface

Figure 3.3.1 SMIS UI

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

Figure 3.4.1 Student Portal UI

3.4.1 Employee Portal User Interface:

 Employee Dashboard:

 Presents an overview of daily tasks, pending orders, and productivity metrics.

 Quick links to inventory, order processing, and customer-related functionalities.

 Order Processing:

 Interface for processing customer orders, updating order status, and managing
order-related tasks.

 Tools for viewing order details and handling exceptions.

 Inventory Management:

 Allows employees to view and update inventory details.

 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.

 Tools for assisting customers in finding products and providing product


information.
3.5 Customer Portal Logic

Figure 3.5.1 Customer Portal Logic

3.5.1 Customer Portal User Interface :

Customer Dashboard:

 Provides a personalized dashboard with order history, recommended products,


and promotions.

 Quick access to account details, shopping cart, and order tracking.

 Product Browsing:

 Allows customers to browse products by category, view product details, and add
products to the shopping cart.

 Search functionality for finding specific products.

 Shopping Cart and Checkout:

 Interface for managing the shopping cart, reviewing selected items, and
proceeding to checkout.

 Secure and user-friendly checkout process with multiple payment options.

 Order Tracking:

 Provides real-time tracking of placed orders.

 Notifications and updates on order status changes.


 Account Management:

 Allows customers to view and update personal information, manage addresses,


and change account settings.

 Access to order history and customer support.

3.6 SPMS Logic

Figure 3.6.1 SMIS Logic

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.

1. SMIS User Authentication and Authorization:

 Users (Administrators, Employees, and Customers) log in using their credentials.

 Authentication verifies user identity, and authorization checks their roles and
permissions.

2. Admin Portal Logic:

 Dashboard:
 Upon login, administrators are directed to the dashboard.

 The dashboard provides an overview of sales analytics, key metrics, and


system alerts.

 Employee Management:

 Administrators can add, update, and remove employees.

 Access to employee details, roles, and performance metrics.

 Inventory Management:

 Administrators can view, add, and update inventory items.

 Tools for managing stock levels, adding new items, and updating existing
ones.

 Product Management:

 Administrators can view, add, and update product details.

 Categorization and management of products.

 Order Management:

 Administrators can view customer orders, process orders, and manage


order-related tasks.

 Tools for handling order exceptions and ensuring timely order processing.

 Customer Management:

 Access to customer lists and details.

 View and manage customer information, including order history.

 System Configuration:

 Administrators configure general settings for the system.

 Management of user roles and permissions.

3. Employee Portal Logic:


 Dashboard:

 Upon login, employees are directed to their dashboard.

 The dashboard provides an overview of daily tasks, pending orders, and


productivity metrics.

 Order Processing:

 Interface for processing customer orders, updating order status, and


managing order-related tasks.

 Tools for viewing order details and handling exceptions.

 Inventory Management:

 Employees can view and update inventory details.

 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.

 Tools for assisting customers in finding products and providing product


information.

4. Customer Portal Logic:

 Dashboard:

 Upon login, customers are directed to their personalized dashboard.

 The dashboard includes order history, recommended products, and


promotions.

 Product Browsing:

 Customers can browse products by category, view product details, and


add products to the shopping cart.
 Search functionality for finding specific products.

 Shopping Cart and Checkout:

 Interface for managing the shopping cart, reviewing selected items, and
proceeding to checkout.

 Secure and user-friendly checkout process with multiple payment options.

 Order Tracking:

 Provides real-time tracking of placed orders.

 Notifications and updates on order status changes.

 Account Management:

 Customers can view and update personal information, manage addresses,


and change account settings.

 Access to order history and customer support.

5. Order Processing Logic:

 Placing Orders:

 Customers place orders through the customer portal.

 Orders are processed and stored in the system.

 Order Fulfillment:

 Employees view and process customer orders through the employee


portal.

 Inventory levels are updated as orders are fulfilled.

6. Inventory Management Logic:

 Adding and Updating Inventory:

 Administrators and employees can add new items to the inventory.

 Inventory levels are updated based on product sales and additions.


 Stock Level Monitoring:

 The system monitors stock levels and generates alerts for low stock.

7. Product Management Logic:

 Adding and Updating Products:

 Administrators can add new products and update existing product details.

 Products are categorized for easier management.

8. Customer Management Logic:

 Customer Registration:

 Customers can register accounts through the customer portal.

 Customer information is stored securely.

 Managing Customer Information:

 Administrators can view and update customer details.

 Access to order history and customer support.

9. System Configuration Logic:

 Configuring General Settings:

 Administrators configure general settings for the system.

 User Roles and Permissions:

 Administrators manage user roles and permissions.

 Access control to ensure secure and authorized access.

10. Security Measures:

 Data Encryption:

 Sensitive data such as passwords and payment information is encrypted.

 Access Control:
 Role-based access control ensures that users have appropriate
permissions.

 Audit Trail:

 Logging of critical actions for audit purposes.

11. Error Handling and Exception Handling:

 Exception Handling:

 Handling of exceptional scenarios such as unsuccessful order processing


or inventory additions.

12. Reporting and Analytics:

 Generating Reports:

 Administrators can generate reports on sales, inventory, and employee


performance.

3.7 Notifications Service


Implementing a notification service for the Supermarket Management System (SPMS) can
enhance user experience and provide timely updates to administrators, employees, and
customers. Below is an outline of a notification service for SPMS:
Figure 3.8.1 Notification Service

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:

 Alert administrators or employees about low stock levels or critical


inventory updates.
 System Alerts:

 Notify administrators about important system events, updates, or issues.

2. Communication Channels:

 Email Notifications:

 Send detailed notifications via email for order updates, inventory alerts,
and system alerts.

 SMS Notifications:

 Provide concise order status updates to customers via SMS.

 In-App Notifications:

 Display real-time notifications within the SPMS web or mobile application.

3. Notification Triggers:

 Order Processing:

 Trigger notifications when an order is placed, processed, or shipped.

 Inventory Management:

 Trigger alerts for low stock levels, successful inventory updates, or critical
inventory changes.

 System Events:

 Notify administrators about system updates, scheduled maintenance, or


potential issues.

4. Subscription and Preferences:

 Allow users to set their notification preferences.

 Provide an option to subscribe or unsubscribe from specific types of notifications.

5. Notification Templates:

 Create standardized templates for different types of notifications.

 Include dynamic variables (e.g., order ID, product details) to personalize


notifications.
6. Notification Logging:

 Maintain a log of sent notifications for audit and tracking purposes.

 Include information such as timestamp, recipient, and notification content.

7. Integration with SPMS Modules:

 Integrate the notification service with relevant SPMS modules (e.g., Order
Processing, Inventory Management).

 Ensure seamless communication between different components of the system.

8. Automated and Manual Triggers:

 Automate notification triggers based on predefined events.

 Allow manual triggers for urgent or ad-hoc notifications by administrators.

9. Security Measures:

 Implement secure communication channels for sensitive information in


notifications.

 Ensure compliance with data protection regulations.

10. Notification Analytics:

 Monitor the effectiveness of notifications.

 Collect data on user interactions with notifications to improve the notification


system.

Example Notification Flow:

 Customer Places an Order:

 System triggers an order confirmation email and in-app notification to the


customer.

 Inventory updates trigger an alert to administrators if stock levels are critically


low.

 Order Processed:
 Customer receives an email and SMS notifying them that the order has been
processed.

 Inventory updates trigger notifications to relevant employees.

 Low Stock Alert:

 System automatically sends an email to administrators and relevant employees


about low stock levels.

 In-app notifications are sent to administrators for immediate attention.

3.7.3 Example Usage:

 A customer places an order in the SPMS.

 The OrderProcessing module triggers the NotificationService to notify the customer


about the order confirmation.

 The NotificationService consults the NotificationManager to create an appropriate


template for the notification.

 An EmailNotification is created for the customer and sent via the NotificationService

3.8 Data Management Logic

Figure 3.9.1 Data Management Logic


The Data Management subsystem consists of the classes used to handle interactions with the
database.

Data Controller

connection: the connection attribute is used to store an instance of a connection to the


database

ConnectToDatabase:the ConnectToDatabase method of DataController class is used to


establish a connection to the database

DisconnectDatabase: the DisconnectDatabase method of DataController class is used to


disconnect from the database

UpdateEntity(newEntity):the UpdateEntity method of the DataController class is used to


update anentity. The method accepts anentity object and persists it to the database.

AddEntity(newEntity): the AddEntity method of the DataController class is used to add


anentity. The method accepts anentity object and persists it to the database.

ReadEntity(entityKey []):the ReadEntity method of the DataController class is used to retrieve


anentity from the database. The method accepts a key and searches the database to retrieve the
entity.

RemoveEntity(entityKey []):the RemoveEntity method of the DataController class is used to


remove an entity. The method accepts a entity key and removes the corresponding entity from
the database.

RemoveEntity (entityKey): the RemoveEntity method of the DataController class is used to


remove an entity. The method accepts a entity object and removes it from the database.
4. Database Design
4.1 ER diagram
4.2 Flowchart
5. GUI mockups
(Add your gui screen mockups which are drawn by visual paradigm)

Main.py
Admin.py

Username: ISHAQ Password: 1234


Employee.py

You might also like