SRS Document - melcholign/harvest-cart GitHub Wiki
1. Introduction :
1.1 Purpose:
The purpose of this platform is to combat ongoing inflation and dismantle the existing syndicate system that controls the distribution of raw agricultural products. The platform will make organic, toxin-free raw products readily available to the public by establishing direct communication between farmers, the platform, and consumers. By doing so, the platform will increase the value that farmers receive while reducing price hikes at the consumer level.
1.2 Intended Audience
- Requirements Engineers
- Development Team
- Project Managers
- Quality Assurance Team
1.3 Intended Use:
- The requirements engineers use this document as a foundation to refine and expand upon the system’s requirements, ensuring that they align with the overall vision of the project, and that all necessary functionalities are captured.
- The development team refers to this document to comprehend the functional and non-functional requirements, ensuring that the platform is designed and implemented according to the outlined features, and technical constraints.
- The project managers rely on this document to manage project scope, prioritise key features, and maintain alignment with the project vision, facilitating the delivery of an optimal solution for both farmers and customers.
- The quality assurance team uses this document to guide the creation of test cases, ensuring the final system meets the specified requirements and performs as intended for the users of the platform.
1.4 Product Scope:
The product aims to create a transparent, efficient, and direct marketplace connecting farmers with consumers. It will eliminate middlemen, reducing the impact of inflation by offering fair prices to both producers and consumers. Farmers will be able to sell their organic products directly to buyers at competitive wholesale prices, ensuring higher earnings without being exploited by syndicates. Consumers will gain access to fresh, organic products in bulk directly from farmers at lower costs. The platform will emphasise sustainability and organic farming practices, fostering healthier food consumption while stabilising market prices.
1.5 Risk Definitions:
1.5.1 Technological Risks
There could be system downtimes, data security breaches, and difficulties in maintaining smooth communication between farmers and consumers
1.5.2 Resistance from Syndicates
The current syndicate system may attempt to undermine the platform’s operations, posing a significant risk to its success.
1.5.3 Agricultural Output Fluctuations
Changes in weather conditions or other environmental factors may impact product availability and prices.
1.5.4 Regulatory Compliance
Ensuring that the platform adheres to organic certification and food safety standards could present challenges.
1.5.5 Rural Infrastructure Limitations
Many farmers live in rural areas where internet connectivity may be poor, and they may lack the knowledge to fully utilise a digital platform. To address this, the platform will need to offer free digital training to farmers and deploy ground teams to assist with the collection and distribution of goods. However, this will incur significant additional costs.
2. Overall Descriptions
2.1 User Classes
2.1.1 Customers
Customers are individuals who seek fresh, locally-sourced agricultural food commodities to purchase at affordable prices.
2.1.2 Farmers
The farmers who sell their goods on the website since they want a syndicate-free outlet that accepts a reasonable price.
2.1.3 Delivery Service Providers
The third party services transport the perishable goods from farmers’ countryside regions to Dhaka, and from the warehouses to consumers.
2.2 User Characteristics
2.2.1 Customers
Customers value high-quality, fresh products, and prefer supporting small, local businesses. They may have moderate online shopping experience and expect a user-friendly interface for easy browsing and purchasing.
2.2.2 Farmers
Young to middle-aged individuals who are farming in the countryside, must be sufficiently tech-literate to be able to interact with the website interface.
2.2.3 Delivery Service Providers
Delivery Service Providers (DSPs) are third-party logistics companies responsible for managing the transportation, tracking, and delivery of orders from sellers to customers, often using a network of delivery personnel.
2.3 User Needs
2.3.1 Customers
Customers need an easy-to-use online platform to find and buy fresh food directly from small farmers. They want clear product details, to know where their food comes from, and dependable delivery options. They also look for simple payment methods, updates on seasonal items, and clear order tracking.
2.3.2 Farmers
Farmers require a fair selling price for their goods, an online storefront, a means of requesting delivery to their consumers and monitoring the status of the delivery, a digital transaction system to receive their payments quickly and conveniently.
2.3.3 Delivery Service Providers
Delivery Service Providers (DSPs) need efficient systems for receiving order assignments, managing delivery personnel, updating delivery statuses in real-time, handling cancellations or delays, and providing proof of delivery to ensure seamless order fulfillment and communication with the e-commerce platform.
2.4 Operating Environments
2.4.1 Hardware Requirements
- A web server to host the website (e.g., a basic cloud server).
- A database server to store product and user information.
- User devices, including personal laptops or smartphones for accessing the site.
2.4.2 Software Requirements
- Operating systems: Linux (e.g., Ubuntu) for server environments.
- Web server software: Node server module.
- Database management system: MySQL.
- Development tools: HTML, CSS, JavaScript, React, NodeJS.
2.4.3 Network Environment
- A reliable internet connection to access the website and databases.
2.4.4 User Environment
- Users accessing the website through various devices (desktops and smartphones).
- Focus on a mobile-responsive design to ensure usability on different screen sizes.
- Simple user interface for easy navigation and product browsing.
2.5 Constraints
- The application must be developed and delivered within a span of two months.
- Notification system must be free of charge due to budget limitation, hence the use of emails rather than SMS.
- Website will be run locally due to the limited scope of the project.
- The application must run on web browsers, such as Chrome, FireFox, Edge, etc.
- The application code must be written in HTML, CSS, and JavaScript.
2.6 Assumptions
- Users have basic computer literacy.
- Users are located in Bangladesh.
- Users have access to the Internet.
- Users know how to operate a web browser.
- Users own internet-compatible devices installed with web browsers.
- Users possess active email addresses and phone numbers.
- Users may have online transaction wallets.
3. Requirements
3.1 Functional Requirements
Customer: Create Account
As a customer, I want to create an account so that I can have a personalized experience and access all website features.
ACCEPTANCE CRITERIA
Accessing the Account Creation Form
- The customer can access the account creation form from the website.
Validating Account Information
- The account creation form requires necessary information (e.g., full name, phone number, password).
- If the provided information is invalid or incomplete, appropriate error messages are displayed, and the customer remains on the form.
Handling Duplicate Email Addresses
- If the customer enters an email address that is already associated with an existing account, an error message is displayed indicating that the email is already in use.
Completing the Verification Process
- If the provided information is valid, the customer is prompted to verify their account.
- The customer can complete the account verification process by entering the correct verification code.
- If the verification code is incorrect, an error message is displayed, and the customer is prompted to re-enter the code.
Accessing Website Features
- Once the account is successfully verified, the customer gains access to the website's personalized features.
Customer: Browse Products
As a customer, I want to browse through a selection of products so that I can discover new items to purchase.
ACCEPTANCE CRITERIA
Displaying Products
- Products are shown in card format on the homepage, displaying essential information such as name, seller, rating, price, and image.
Organizing Products
- Products are categorized into sections such as top-selling, seasonal items, new arrivals, and discounts.
- Customers can expand any category to see more products.
Filtering Categories
- Customers can filter categories by attributes such as price range, rating, and availability.
Personalized Recommendations
- Logged-in customers receive personalized product recommendations based on their preferences, search history, purchases, and interactions.
Accessing Product Pages
- Clicking on a product card opens the detailed product page, which includes full descriptions, reviews, pricing, and availability.
Discovering Related Products
- Product pages display related or similar items to encourage further exploration.
Customer: Search Products
As a customer, I want to search for a specific product so that I can quickly find what I need.
ACCEPTANCE CRITERIA
Performing a Basic Search
- Users can search for products by entering a partial or full product name in the search field.
- If no products match the search query, the system displays a message: "No products found matching your search."
Displaying Search Results
- When products match the search query, the system displays a list of results showing products whose names include the search string.
- Results prioritize products whose names start with the search string.
- For products with identical names, the system orders the list by product rating, with higher-rated products shown first.
Applying Filters
- Users can apply filters to narrow search results by attributes such as category, price range, and product rating.
- Filters dynamically update the search results to reflect the selected criteria.
Sorting Search Results
- Users can sort filtered search results by the following criteria:
- Price (low to high, high to low)
- Rating (highest to lowest)
- Newest arrivals
- The system updates the search results dynamically as sorting options are applied.
Customer: Rate Products
As a customer, I want to rate products that I have consumed to provide feedback and help others make informed decisions.
ACCEPTANCE CRITERIA
Rating Eligibility
- Customers can only rate a product after it has been delivered and consumed.
Accessing the Rating Feature
- The rating feature is available on both the product preview and the detailed product page.
Submitting Ratings and Reviews
- Customers can submit ratings on a scale of 1 to 5 stars, with 1-star increments.
- Customers can optionally provide a text review to accompany their star rating for additional feedback.
Modifying Ratings and Reviews
- Customers can update their rating and review at any time.
- Changes to ratings and reviews are immediately reflected in the product's overall rating.
Ensuring Fairness in Ratings
- Each customer can submit only one rating per product to maintain fairness in the product's average rating.
Displaying Product Ratings
- The overall rating of a product is calculated as the average of all submitted ratings.
Confirmation of Submission
- Customers receive confirmation once their rating and review have been successfully recorded.
Customer: Read Ratings
As a customer, I want to read the ratings of products so that I can quickly make a judgment about which products to consider purchasing.
ACCEPTANCE CRITERIA
Displaying Average Ratings
- The average rating (out of 5) for a product is shown on both the product preview and its detailed product page.
Displaying Rating Distribution
- The rating distribution (e.g., the number of ratings for each star level) is presented on the product page to provide a broader view of customer feedback.
Viewing Individual Ratings and Reviews
- Individual user ratings are displayed with reviews in the review section of the product page.
- If a product has no ratings, the system shows a placeholder message to indicate the absence of reviews.
Filtering and Sorting Reviews
- Customers can filter reviews by star rating (e.g., 1-star, 5-star) to find relevant feedback.
- Customers can sort reviews by criteria such as most recent, highest rating, or lowest rating.
Additional Review Information
- The total number of ratings for a product is displayed, providing context for the average rating.
- Reviews marked as helpful by other customers are highlighted to emphasize valuable feedback.
Customer: Add Product to Basket
As a customer, I want to gather the products I want to buy in one place (basket) so that I can order them together.
ACCEPTANCE CRITERIA
Adding Products to Basket
- Customers can add products to the basket from both product cards and product pages.
- Basket contents persist between browsing sessions until the order is placed.
Adjusting Product Quantities
- Customers can adjust the quantity of products in the basket from product cards, product pages, or within the basket.
- The quantity of each product is restricted between 1 and the maximum available stock.
Basket Overview
- The basket displays the quantity, unit price, and aggregate price for each product, as well as the total value of the basket.
Stock Management During Checkout
- Adding products to the basket does not reduce the available stock immediately.
- If stock drops below the quantity in the basket before checkout, the system prevents checkout and notifies the customer.
Stock Management Between Sessions
- If stock decreases between browsing sessions, the system automatically adjusts or removes products from the basket.
- The system notifies customers when products are removed or quantities are adjusted due to stock changes.
Customer: Order Products
As a customer, I want to easily order the products I need.
ACCEPTANCE CRITERIA
Accessing Checkout
- Customers must proceed to checkout to place an order for the items in their basket.
Product Stock Updates
- When proceeding to checkout, product stock is updated to prevent availability issues during the process.
- If a customer cancels checkout or exits the session without placing the order, the reserved stock is restored.
Shipping Information
- Customers must provide shipping information during checkout, including their phone number (linked to the account), delivery address, and optionally an email for order notifications.
- Customers can enter a new address or email, or select from saved addresses and emails.
Payment Methods
- Customers must select a payment method. Options include at least cash-on-delivery and digital payment.
Digital Payment Processing
- For digital payment, customers must complete the transaction immediately via their chosen payment processor.
- If the digital payment fails due to insufficient funds, the system notifies the customer and halts payment processing.
- After a failed payment attempt, the customer is returned to checkout, retaining the same checkout state.
Receiving Invoice
- Customers can opt to receive an invoice via SMS (using their account phone number) and/or email (selected from saved emails or entered manually).
Order Placement
- The system prevents order placement if shipping information or payment method is missing, displaying an appropriate message.
- Upon successful order placement, customers are redirected to the order processing/tracking view.
Customer: Track Orders
As a customer, I want to track my orders so that I can stay informed about its status and know when it will be delivered.
ACCEPTANCE CRITERIA
Accessing Order Tracker
- Customers can track their orders by navigating to the “Order History” section after logging into their accounts.
- Orders with status "Ongoing" are displayed in the order history.
- Alternatively, after placing an order, the system redirects the customer to the order details page for that specific order.
Viewing Order Status
- On the order details page, customers can view the current order status.
- Possible order statuses include "Processing", "Out for Delivery", "Delivered", and "Cancelled".
Estimated Delivery Date
- The system provides an estimated delivery date once the order has been shipped.
Notifications
- Whenever the order status changes, the system sends an SMS notification to the customer's phone number.
- If an email address is provided in the shipping information, the system also sends an email notification.
- Before the order status changes to "Out for Delivery", the delivery personnel contacts the customer via phone call to arrange delivery.
Customer: Cancel Order
As a customer, I want to be able to cancel my order so that I can avoid purchasing items I no longer want.
ACCEPTANCE CRITERIA
Cancellation through Notification
- The deliverer confirms the order with the customer.
- Upon customer request to cancel, the deliverer notifies the system.
- Customer receives a cancellation notification via SMS or email with a cancellation link.
- Clicking the link directs the customer to a cancellation request page.
- If confirmed, the order cancellation process begins.
- Failure to respond to notifications results in automatic cancellation after repeated attempts.
Cancellation through Order Details Page
- Customer navigates to the order details page.
- While the order status is "Processing", customer clicks "Cancel".
- A cancellation form appears with options to select predefined reasons or provide a custom reason.
- Upon confirmation, the order status changes to "Canceled".
- Quantities of canceled products are replenished back into stock.
Payment Refund Process
- If payment was made via an online wallet:
- Upon cancellation, the system initiates a refund to the wallet through the payment processor.
- Customers receive confirmation of the refund process via a pop-up message and notifications.
- Final confirmation of the successful refund is sent via SMS and email.
Customer: Access Order History
As a customer, I want to view my order history so that I can monitor my expenditures and easily reorder products.
ACCEPTANCE CRITERIA
Viewing Order History
- When the customer navigates to the order history page, the system generates a paginated list of the most recent orders.
- Each order summary includes:
- Order ID
- Date and time of order
- Current status of the order
- Delivery date (if delivered)
- Order total
- Options to view order details and reorder
Sorting Orders
- Customer can sort orders by:
- Time
- Order value
Reordering Products
- The reorder option is enabled for orders where all products are available in stock.
- Upon choosing to reorder, the customer is directed to the checkout process.
Viewing Order Details
- When the customer views the details of an order, they are redirected to the order details page.
- Order details page includes:
- Order summary information
- Shipping information
- Order breakdown:
- Product names with links to product pages
- Producer names with links to producer storefronts
- Unit prices, quantities, and aggregate prices
- Total order value
Managing Product Availability
- Products listed in the order can be added to the cart and their quantities adjusted if they are available in stock.
Customer: Follow a Farmer
As a customer, I want to follow my favorite farmers to stay updated on new product listings, discount offers, and stock updates.
ACCEPTANCE CRITERIA
Following Farmers
- Customers can add a farmer as a favorite by clicking the favorite button on the farmer’s storefront or product pages.
- Clicking the favorite button again removes the farmer from favorites.
Filtering Product Searches
- Customers can filter product searches to show products only from farmers they have favorited.
Notifications for Farmer Updates
- Customers receive notifications via email or SMS when a favorited farmer:
- Updates their stock levels.
- Adds new products to their inventory.
- Offers discounts on products.
- Releases sales promotions.
Farmer: Create Account
As a farmer, I want to create an account to manage my personal and business-related data conveniently in one place.
ACCEPTANCE CRITERIA
Accessing Account Creation
- Click the “Sign Up” link in the website header or the “Register” link on the Login page to access the account creation form.
Account Information Entry
- Complete required fields including full name, phone number, password (with confirmation), address, credit card/debit card/financial service wallet details, and NID card scan.
- Agree to terms and conditions for conducting business on the platform.
Submitting Account Creation
- Click “Create Account” to submit the data.
- If data is invalid (wrong format, missing, or other conditions like duplicate phone numbers), display appropriate error messages and remain on the account creation page.
Verification Process
- If data is valid, redirect to the account verification page.
- Enter the verification code sent via SMS to the phone number and click “Verify” to proceed.
- If the verification code is incorrect, prompt the user to enter the correct code.
Verification Call
- If the verification code is correct, an agent will call the farmer to confirm their willingness to sell products on the site.
- If the farmer cannot respond satisfactorily during the call, their account remains inactive until they request another verification session.
Farmer: Set Up & Manage an Online Store
As a farmer, I want to sell products on a webpage that presents them in an organized manner to attract customers.
ACCEPTANCE CRITERIA
Account and Store Creation
- After creating a farmer’s account, the farmer must create a storefront.
- The storefront must include at least one product.
Product Pricing
- Set a price for each product.
- The platform deducts a fixed amount as its commission from the product price.
- Prices should align reasonably with the statistical average for similar products.
Product Quantity Requirement
- Each product must meet a platform-specific threshold quantity to ensure profitable delivery and storage arrangements.
- Products failing to meet this threshold cannot be added to the store.
Product Visual Representation
- Upload sample images showcasing each product's quality.
- Optionally, provide videos covering the entire product range.
Product Descriptions
- Include brief product descriptions detailing farming methods, pesticide or fertilizer use, etc.
Product Listing Management
- Farmers can edit product listings, prices, and descriptions.
- Edits take effect upon restocking of products.
Clearance Sales and Disposal
- Conduct manual clearance sales for products no longer fresh or automate sales after a fixed period post-restock.
- Zero out stock quantities for spoiled products upon disposal.
Stock Management
- Update stock quantities upon receiving product deliveries from the farmer.
Farmer: Receive Customer Feedback
As a farmer, I want to receive consumer feedback via reviews and ratings to evaluate product quality and build a reputation on the platform.
ACCEPTANCE CRITERIA
Customer Interaction
- Farmers can respond to customer reviews, expressing appreciation for positive feedback or addressing complaints.
- Farmers have the option to issue refunds for customers dissatisfied with product quality or experience.
Public Visibility of Refunds
- Refunds issued by farmers are publicly displayed to enhance the farmer’s reputation.
Recognition and Badges
- Farmers receive badges based on product performance:
- Best Quality: Awarded for high ratings on freshness and taste.
- Best Prices: Recognized for setting competitive product prices.
- Top Seller: Earned for maintaining large stock, frequent restocks, and high sales.
- Trusted Seller: Achieved for having fewest bad reviews and issuing refunds when necessary.
Farmer: Get Product and Sales Notifications
As a Farmer, I want to be notified about the condition of my products and sales in crucial circumstances and receive regular updates.
ACCEPTANCE CRITERIA
Product Notifications
- Farmers receive notifications when products are nearing spoilage and should be cleared off at a discount.
- Notifications are sent when products have spoiled and been disposed of, ensuring farmers are informed of inventory losses.
- Alerts are provided when products run out of stock, allowing farmers to manage replenishment promptly.
Clearance Sales Notifications
- Farmers receive notifications for any automated clearance sales initiated after a specified period following restock, helping manage inventory turnover efficiently.
Sales Updates
- Farmers receive daily updates on total sales, providing real-time insights into daily performance and revenue generation.
- Sales statistics are updated weekly, monthly, and seasonally, offering comprehensive insights into sales trends and patterns over different time intervals.
Farmer: Product Delivery
As a farmer, I want my products picked up and delivered to Dhaka, so that I can restock my store efficiently.
Acceptance Criteria Initiating Pickup Request
- From the store dashboard, the farmer can initiate a pickup request by providing the pickup address and specifying the quantity of products.
Assigning Delivery Agent
- The logistics service assigns a suitable delivery agent located nearby.
- The farmer receives details including the agent's contact number, estimated arrival time, and name for effective communication.
Agent Arrival Notification
- An email notification is sent to the farmer when the delivery agent arrives at the pickup address.
Successful Restock Notification
- Upon successful unloading of products in good condition at the Dhaka warehouse, the farmer receives a confirmation email indicating the products are ready for sale.
Farmer: Track Product Distribution
As a farmer, I want to track the delivery status of purchases from my store in real-time, ensuring products are delivered correctly and on schedule.
ACCEPTANCE CRITERIA
Sales Tracker Page
- When on the Sales Tracker page, each customer's order appears as a row in a table.
- It includes the customer's name, order timestamp, and contact details for both the customer and the deliverer.
- The initial status for each order is "Awaiting pickup".
Order Progress Updates
- When the delivery agent picks up the purchased products from the warehouse, the order status is updated to "On the way".
- Updates include estimated delivery times and any relevant delivery notes.
Delivery Completion
- Upon successful delivery to the customer's address, the status is changed to "Delivered".
- Proof of delivery, including customer confirmation or signatures, is provided and logged.
Handling Delivery Issues
- If a delivery fails during transit ("On the way"), the reason and proof of failure are logged in the order tracker.
- The farmer may seek compensation from the delivery service provider (DSP).
Order Rejection
- If a customer rejects an order upon delivery, the status is updated to "Rejected".
- Customer feedback and reasons for rejection are recorded and visible in the order tracker.
- The farmer may issue a refund to the customer to restore trust.
- Positive refunds are noted in the farmer's sales record, promoting trust and credibility.
DSP: Receive Order Shipment Requests
As a Delivery Service Provider (DSP), I want to receive and process order assignment requests efficiently to allocate appropriate deliverers.
ACCEPTANCE CRITERIA
Order Assignment Request
- Upon order processing, the system automatically sends an assignment request to the DSP.
- The request includes recipient details (shipping address), package specifics (dimensions, weight), and pickup location.
Acknowledgement Response
- The DSP acknowledges the receipt of the assignment request promptly.
- This acknowledgment confirms that the request is being processed and logged by the system.
Allocation of Deliverer
- Once a deliverer is assigned to the order, the DSP notifies the system.
- Information provided includes the deliverer’s details and a tracking number for the shipment.
DSP: Send Delivery Status Updates
As a Delivery Service Provider (DSP), I want to send real-time delivery status updates to the e-commerce platform, ensuring customers and sellers are informed about the progress of their orders.
ACCEPTANCE CRITERIA
Delivery Status Updates
- The DSP sends status updates to the system at critical milestones:
- Out for Delivery: When the order has been picked up and is en route to the customer.
- Delivered: When the order has been successfully delivered to the customer.
- Each update includes the order ID, current status (Out for Delivery or Delivered), and timestamp of the update.
System Integration
- The system promptly receives and updates the order status based on the DSP's updates.
- Customers and sellers are automatically notified by the system about the order's progress upon receiving each status update.
DSP: Notify Real-Time About Order Cancellation
As a Delivery Service Provider (DSP), I want to notify the e-commerce platform in real-time when an order is canceled or returned, so appropriate actions can be triggered automatically.
ACCEPTANCE CRITERIA
Order Cancellation Request
- The delivery driver can request an order cancellation upon receiving notification from the customer that they no longer want the order.
Customer Notification
- Upon the delivery driver's cancellation request, the system sends a notification to the customer (via email or SMS) requesting confirmation or rejection of the cancellation.
Cancellation Handling
- Once the cancellation request is submitted by the delivery driver, they are no longer responsible for the order, irrespective of the customer's response.
Customer Confirms Cancellation
- The system updates the order status to "Cancelled," and no further actions are necessary.
Customer Rejects Cancellation
- The system reassigns the order for a new delivery attempt, ensuring another driver or DSP handles the new assignment.
DSP: Provide Proof of Delivery
As a Delivery Service Provider (DSP), I want to provide proof of delivery to the e-commerce platform, so it can update the order status to "delivered" for the customer and seller.
ACCEPTANCE CRITERIA
Submission of Proof of Delivery (POD)
- After completing the delivery, the DSP submits proof of delivery to the e-commerce platform.
- The proof of delivery includes
- Order ID
- Delivery timestamp
- Relevant attachments such as signature or delivery photo, if applicable.
Update Order Status
- Upon receiving the proof of delivery, the e-commerce platform updates the order status to "delivered."
Notification
- The e-commerce platform notifies both the customer and seller about the updated order status.
3.2 Non-functional requirements
3.2.1 Performance
Many rural areas of Bangladesh lack smooth, fast internet. Our website will sport a lightweight UI to reduce long load times caused by any such poor network.
3.2.2 Accessibility
Most Bangladeshi farmers are not proficient in English and technology due to cultural and financial factors. Hence our website will default to Bengali language and contain an extensive help page which guides them through each key feature.
3.2.3 Security
Any online transaction will be performed by highly trusted third party financial services.