0% found this document useful (0 votes)
3 views

gp_srs

The Software Requirements Specification (SRS) outlines the requirements for the Global Grocers online grocery shopping platform, which includes user registration, product browsing across eight departments, cart management, order tracking, and an admin panel. The system is built using PHP and MySQL, supports multilingual functionality, and aims to provide a secure and user-friendly shopping experience. Key features include user authentication, order management, and performance and security requirements to ensure reliability and scalability.

Uploaded by

a113k114y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

gp_srs

The Software Requirements Specification (SRS) outlines the requirements for the Global Grocers online grocery shopping platform, which includes user registration, product browsing across eight departments, cart management, order tracking, and an admin panel. The system is built using PHP and MySQL, supports multilingual functionality, and aims to provide a secure and user-friendly shopping experience. Key features include user authentication, order management, and performance and security requirements to ensure reliability and scalability.

Uploaded by

a113k114y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Software Requirements Specification (SRS)

Global Grocers: Online Grocery Shopping Platform


Document Version: 1.0
Date: April 15, 2025
Prepared by: Prince Yadav , Aman Kumar Yadav , Shivam Kumar , Preet Singh
Project: Global Grocers Online Grocery Website

1. Introduction
1.1 Purpose
This Software Requirements Specification (SRS) document outlines the requirements for "Global
Grocers," an online grocery shopping platform designed to provide users with a seamless experience
to browse, select, and purchase groceries. The system supports multiple departments (e.g., Fruits,
Bakery), user authentication (login/signup), cart management, order tracking, and an admin panel
for order management. The goal is to create a user-friendly, secure, and scalable e-commerce
platform for grocery shopping.

1.2 Scope
Global Grocers allows users to:

• Register and log in to their accounts.

• Browse groceries across 8 departments: Fruits, Vegetables, Bakery, Dairy, Pantry, Beverages,
Snacks, and Personal Care.

• Add products to a cart, checkout, and place orders.

• View order history.

• Admins can manage orders and view customer purchases.

The system integrates a MySQL database (via phpMyAdmin), uses PHP for backend logic, and
provides a responsive frontend with multilingual support (e.g., Hindi, English).

1.3 Definitions, Acronyms, and Abbreviations


• SRS: Software Requirements Specification.

• PHP: Hypertext Preprocessor, a server-side scripting language.

• MySQL: An open-source relational database management system.

• PDO: PHP Data Objects, a database access layer.

• XAMPP: A local server environment for PHP and MySQL.


• Admin: A user with elevated privileges to manage orders and products.

1.4 References
• Previous project code snippets (e.g., cart.php, admin.php, retrieve_data.php).

• Screenshot of the Global Grocers homepage (provided).

2. Overall Description
2.1 Product Perspective
GlobalGrocers is a web-based e-commerce platform for grocery shopping. It integrates:

• A frontend with HTML, CSS, and JavaScript for user interaction.

• A PHP backend for processing requests, managing sessions, and interacting with the MySQL
database.

• A database (via phpMyAdmin) to store products, user data, carts, and orders.

The system supports multilingual functionality (e.g., Hindi, English) and features fast delivery options,
as seen in the screenshot ("24h Fast Delivery").

2.2 Product Functions


• User Registration and Login: Users can sign up, log in, and manage their profiles.

• Product Browsing: Products are categorized into 8 departments with details (name, price,
image, rating).

• Cart Management: Users can add/remove items, view their cart, and checkout.

• Order Placement: Users can place orders and track their status.

• Admin Panel: Admins can view and manage orders.

• Multilingual Support: Users can switch languages (e.g., Hindi, English).

• Data Retrieval: Admins can retrieve data from the database for reporting.

2.3 User Classes and Characteristics


• Guest User: Can browse products and categories but cannot add to cart or place orders.

• Registered User: Can log in, add products to cart, place orders, and view order history.

• Admin: Can log in, view all orders, update order statuses, and retrieve database data.

2.4 Operating Environment


• Frontend: HTML, CSS, JavaScript (with potential Bootstrap for styling).
• Backend: PHP 7.4 or higher, running on Apache (via XAMPP).

• Database: MySQL, managed through phpMyAdmin.

• Server: Local (XAMPP) or hosted server with PHP and MySQL support.

• Browser: Compatible with Chrome, Firefox, and Edge.

2.5 Design and Implementation Constraints


• The system must use PHP and MySQL for backend and database.

• The database schema must support 8 product departments.

• Multilingual support requires language-switching functionality.

• Security measures (e.g., PDO prepared statements, password hashing) must be


implemented.

2.6 Assumptions and Dependencies


• Users have internet access and a compatible browser.

• XAMPP is installed for local development.

• The database schema from previous interactions (e.g., products, carts, orders) is in place.

3. System Features
3.1 User Registration and Login (Login/Signup Pages)
3.1.1 Description
Users can register and log in to access personalized features (cart, orders). The login/signup page is
accessible via the top-right link ("Login / Sign Up") in the screenshot.

3.1.2 Functional Requirements


• FR1: The system shall allow users to sign up with a username, password, and role (default:
'user').

• FR2: The system shall hash passwords using password_hash() before storing them.

• FR3: The system shall allow users to log in with their username and password.

• FR4: Upon login, the system shall set session variables (user_id, role).

• FR5: The system shall redirect unauthenticated users to login.php when accessing protected
pages.
3.2 Product Browsing (8 Departments)
3.2.1 Description
Users can browse products across 8 departments: Fruits, Vegetables, Bakery, Dairy, Pantry,
Beverages, Snacks, and Personal Care. The homepage (screenshot) shows products with ratings,
prices, and "Add to Cart" buttons.

3.2.2 Functional Requirements


• FR6: The system shall display products from 8 departments with details (name, price, image,
rating).

• FR7: The system shall allow users to browse categories via a "Browse Categories" section.

• FR8: The system shall display a "Shop Now" button linking to the product catalog.

• FR9: The system shall fetch product data from the products table:

sql

SELECT id, name, price, image_url, department FROM products;

3.3 Cart Management


3.3.1 Description
Users can add products to their cart, view the cart, and proceed to checkout. The "Add to Cart"
button is visible on product cards.

3.3.2 Functional Requirements


• FR10: The system shall allow logged-in users to add products to their cart via a POST request
to cart.php.

• FR11: The system shall store cart items in the carts and cart items tables.

• FR12: The system shall display the cart contents (product name, price, quantity) when users
view their cart.

• FR13: The system shall allow users to remove items from the cart.

• FR14: The system shall calculate the total price of cart items.
3.4 Order Placement and Checkout
3.4.1 Description
Users can checkout their cart, converting it into an order stored in the orders and order_items tables.

3.4.2 Functional Requirements


• FR15: The system shall allow users to place an order via checkout.php.

• FR16: The system shall save the order in the orders table with user_id, created_at, status,
and total_price.

• FR17: The system shall save order items in the order_items table with order_id, product_id,
quantity, and price.

• FR18: The system shall clear the cart after a successful order placement.

3.5 Admin Panel (Order Management)


3.5.1 Description
Admins can view and manage orders via admin.php, as implemented previously.

3.5.2 Functional Requirements


• FR19: The system shall allow admins to view all orders with details (order ID, user, date,
status, total, items).

• FR20: The system shall allow admins to update order status (e.g., pending, completed,
cancelled).

• FR21: The system shall restrict access to admin.php to users with role = 'admin'.

3.6 Multilingual Support


3.6.1 Description
The system supports multiple languages (e.g., Hindi, English), as seen in the screenshot with a
language dropdown.

3.6.2 Functional Requirements


• FR22: The system shall provide a language selection dropdown (Hindi, English, etc.).

• FR23: The system shall display content in the selected language (e.g., product names,
buttons).

• FR24: The system shall store translated content in the database or a language file.
3.7 Data Retrieval
3.7.1 Description
Admins can retrieve database data (e.g., products, cart items) via retrieve_data.php.

3.7.2 Functional Requirements


• FR25: The system shall allow admins to retrieve data from tables (e.g., products, cart_items).

• FR26: The system shall display retrieved data in an HTML table.

4. External Interface Requirements


4.1 User Interfaces
• Homepage: Displays a banner ("Fresh Groceries Delivered to Your Door"), product cards,
categories, and a language selector (screenshot).

• Login/Signup Page: Form with username and password fields.

• Product Page: Lists products with name, price, image, rating, and "Add to Cart" button.

• Cart Page: Displays cart items, quantities, and a checkout button.

• Admin Page: Table of orders with status update options.

4.2 Hardware Interfaces


• The system runs on a standard web server (e.g., Apache via XAMPP) with no specific
hardware requirements beyond a computer with internet access.

4.3 Software Interfaces


• PHP: Version 7.4 or higher for backend logic.

• MySQL: For database storage and retrieval.

• Apache: Web server to host PHP files.

• phpMyAdmin: For database management.

4.4 Communications Interfaces


• HTTP/HTTPS for client-server communication.

• AJAX for asynchronous cart updates (e.g., adding items without page reload).
5. Non-Functional Requirements
5.1 Performance Requirements
• The system shall load pages within 3 seconds under normal conditions.

• The system shall handle up to 100 concurrent users without significant performance
degradation.

5.2 Security Requirements


• Passwords shall be hashed using password_hash().

• SQL queries shall use PDO prepared statements to prevent SQL injection.

• User inputs shall be sanitized to prevent XSS attacks.

• Admin pages shall be accessible only to users with role = 'admin'.

5.3 Quality Attributes


• Usability: The interface shall be intuitive, with clear navigation and multilingual support.

• Reliability: The system shall handle database errors gracefully using try-catch blocks.

• Scalability: The database schema shall support adding more departments and products.

6. Database Requirements
6.1 Tables
• users: id, username, password, role

• products: id, name, price, image_url, department (e.g., Fruits, Bakery)

• carts: id, user_id, created_at

• cart_items: cart_id, product_id, quantity

• orders: id, user_id, created_at, status, total_price

• order_items: order_id, product_id, quantity, price

6.2 Sample Data


• Products (across 8 departments):

sql
INSERT INTO products (name, price, image_url, department) VALUES

('Fresh Mango', 349.99, 'img/mango.jpg', 'Fruits'),

('Organic Honey', 456.50, 'img/honey.jpg', 'Pantry'),

('Premium Almonds', 599.99, 'img/almonds.jpg', 'Snacks'),

('Dark Chocolate', 299.99, 'img/chocolate.jpg', 'Snacks'),

('Milk Bread', 45.00, 'img/bread.jpg', 'Bakery'),

('Fresh Milk', 60.00, 'img/milk.jpg', 'Dairy'),

('Orange Juice', 120.00, 'img/juice.jpg', 'Beverages'),

('Shampoo', 250.00, 'img/shampoo.jpg', 'Personal Care');

7. Assumptions and Constraints


• Users must register to add items to the cart or place orders.

• The system assumes the 8 departments are fixed for this version.

• The system uses a local server (XAMPP) for development.

8. Deliverables
• PHP files: index.php, cart.php, checkout.php, admin.php, retrieve_data.php, login.php,
signup.php, config.php.

• Database: MySQL schema with the above tables and sample data.

• Documentation: This SRS document.

9. Conclusion
This SRS provides a comprehensive overview of the GlobalGrocers platform, covering user
authentication, product browsing across 8 departments, cart and order management, admin
functionality, and multilingual support. The system leverages PHP and MySQL to deliver a secure,
user-friendly grocery shopping experience.

Youtube _ https://youtu.be/veWdO6Jle48?feature=shared

Linkedin –
Ss

You might also like