gp_srs
gp_srs
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:
• Browse groceries across 8 departments: Fruits, Vegetables, Bakery, Dairy, Pantry, Beverages,
Snacks, and Personal Care.
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.4 References
• Previous project code snippets (e.g., cart.php, admin.php, retrieve_data.php).
2. Overall Description
2.1 Product Perspective
GlobalGrocers is a web-based e-commerce platform for grocery shopping. It integrates:
• 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").
• 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.
• Data Retrieval: Admins can retrieve data from the database for reporting.
• 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.
• Server: Local (XAMPP) or hosted server with PHP and MySQL support.
• 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.
• 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.
• 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
• 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.
• 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.
• 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'.
• 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.
• Product Page: Lists products with name, price, image, rating, and "Add to Cart" button.
• 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.
• SQL queries shall use PDO prepared statements to prevent SQL injection.
• 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
sql
INSERT INTO products (name, price, image_url, department) VALUES
• The system assumes the 8 departments are fixed for this version.
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.
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