Bachelor of Science in Computer Science

Session 2022–2026 Fall

B2B and B2C Digital Products and Services Platform

Submitted By:

Mohammad Rameez Imdad

Section B | Roll Number 58

Supervisor

Umair Butt

School of Computer Science

School of Computer Science

Minhaj University, Lahore

DECLARATION

I declare that this project report is my original work, except where sources are acknowledged in the text and references. This work has not been submitted in any form for another degree or diploma at any university or institution. I accept responsibility for the accuracy and timely submission of this report.

Student: Mohammad Rameez Imdad
Section B | Roll Number 58
Signature: ____________________

DEDICATION

To

My Parents

For their unconditional support, prayers, encouragement, and sacrifices throughout my education.

My Teachers

For sharing knowledge, guidance, and motivation during the development of this project.

My Supervisor

For valuable direction and feedback throughout the project.

CERTIFICATE OF APPROVAL

It is certified that the project titled “B2B and B2C Digital Products and Services Platform” was carried out by Mohammad Rameez Imdad, Section B, Roll Number 58, under the supervision of Umair Butt, Minhaj University Lahore. The project is adequate in scope and quality as a final year project for the degree of Bachelor of Science in Computer Science.

Supervisor: ______________________________
Umair Butt
School of Computer Science, Minhaj University Lahore

Internal Examiner 1: ______________________________

Internal Examiner 2: ______________________________

FYP Coordinator: ______________________________

Head of Department: ______________________________

ACKNOWLEDGEMENT

First of all, I am thankful to Allah Almighty for giving me the strength and guidance to complete this project. I express my sincere gratitude to my supervisor, Umair Butt, for his guidance, feedback, and support. I am also thankful to the faculty of the School of Computer Science and to my parents for their prayers, encouragement, and continuous support.

ABSTRACT

The B2B and B2C Digital Products and Services Platform is a secure PHP and MySQL web application that connects business clients, individual customers, and platform administrators through one digital commerce and service environment. The B2B side allows clients to submit project requirements, request quotations, communicate with staff, track tasks, and receive updates. The B2C side allows customers to browse digital products, source code, plans, and services, manage carts and wishlists, apply promotional offers, make payments, and access purchased files through secure downloads. The system provides role-based dashboards for administrators, employees, agents, and customers. It integrates authentication, Google OAuth, payment processing, email and WhatsApp communication, notifications, YouTube verification, referral features, and activity logging. The application reduces manual coordination, improves payment and delivery tracking, and gives users a clearer self-service experience. Its main limitation is dependency on internet availability and external services such as payment gateways and messaging APIs. The implemented workflows are validated through authentication, project submission, product purchase, payment approval, access delivery, support, and security test scenarios. The final outcome is a unified, responsive, and maintainable platform for managing both business-to-business service workflows and business-to-consumer digital sales.

TABLE OF CONTENTS

Use the links below for screen navigation. Page numbers will be created automatically when this document is printed or saved as PDF.

  1. Chapter 1 — Introduction
  2. Chapter 2 — System Requirements and Specification
  3. Chapter 3 — Use Case Analysis
  4. Chapter 4 — System Design
  5. Chapter 5 — Implementation
  6. Chapter 6 — Testing and Evaluation
  7. References

CHAPTER 1 INTRODUCTION

This chapter introduces the B2B and B2C Digital Products and Services Platform, its business context, objectives, problem area, project plan, responsibility, and report organization. The platform combines digital commerce with custom software-service workflows in one role-based web application.

Background

Businesses and individual customers increasingly expect digital platforms to provide product discovery, online purchasing, secure content delivery, and direct support. Software-service providers also need structured ways to collect requirements, prepare quotations, track tasks, manage payments, and communicate with clients. The platform centralizes these activities and provides a single source of operational data.

Project Scope and Graph-Based Architecture Analysis

The implemented system is a complete PHP/MySQL digital business platform rather than a single-purpose storefront. Graphify analysis of the project corpus identified 244 files, approximately 1,756,293 words, 1,569 logical nodes, 2,176 relationships, and 325 communities. About 83% of the relationships were extracted directly from the source structure and 17% were inferred from semantic connections. This analysis shows that the project has a central core of shared services surrounded by specialized business modules.

The first major business boundary is the public storefront and customer portal. It contains landing pages, services, products, source-code files, plans, bundles, free files, cart, wishlist, checkout, payment methods, purchases, points, referrals, downloads, policies, courses, profile, sessions, notifications, and support. The second boundary is the B2B service operation: structured project requirements, client quotes, staff communication, tasks, status updates, sales records, expenses, and WhatsApp follow-up. The third boundary is the administration suite, which controls content, users, payments, security, logs, themes, policies, cache, system maintenance, and reporting.

Graphify identifies shared hubs that connect these boundaries. getAdminSetting() links storefront, checkout, downloads, bundles, registration, themes, and messaging configuration. validateFingerprint() and handleAuthFailure() connect authentication and security boundaries. The WhatChimp functions connect support, sales, tasks, reminders, business hours, notifications, and conversation handling. Payment approval connects payment history to user access, sales synchronization, promo usage, email, and agent transactions. These hubs are important because a change in one shared helper can affect several user journeys.

Table 1.2 Graph-Based Project Module Analysis
ModulePurposeMain Connected Areas
Public storefrontPublic discovery and conversionLanding, services, products, files, plans, FAQ, policies, SEO
Customer portalSelf-service account and accessProfile, plans, cart, wishlist, purchases, downloads, support
B2B service managementCollect and deliver custom project workRequirements, quotes, chats, tasks, sales, WhatsApp updates
Commerce and paymentsCalculate, collect, verify, and fulfil purchasesCart, promo codes, points, PayFast, manual payments, receipts
Secure deliveryProtect purchased and free contentAssignments, signed tokens, rate limits, download logs
AdministrationOperate and configure the platformUsers, content, payments, reports, security, settings, maintenance
CommunicationKeep customers and staff informedEmail, in-app notifications, web push, WhatsApp, follow-ups

Goals and Objectives

The primary objective is to develop a secure, responsive, and maintainable web platform for both B2B service operations and B2C digital sales. The objectives are to provide role-based authentication; publish digital products, plans, and services; support cart and wishlist workflows; collect B2B project requirements; manage quotations, tasks, payments, support requests, and notifications; grant purchased content through secure downloads; integrate external services; and maintain audit logs.

Gap Analysis

Traditional arrangements often rely on manual messaging, unstructured requirement descriptions, separate payment confirmations, and manual file delivery. These practices can cause missed requirements, delayed responses, duplicate records, weak access control, and limited reporting. The proposed platform addresses these gaps through structured forms, searchable records, role-based access, payment workflows, secure delivery, notifications, and activity history.

Project Plan

The project follows an incremental lifecycle: requirement analysis, database and access-control design, storefront development, B2B workflow development, payment and delivery integration, administrator and staff dashboards, security hardening, testing, documentation, and deployment.

Work Breakdown Structure

The work is divided into business analysis, database and security design, customer-facing commerce, B2B service management, administration, integrations, quality assurance, and deployment. Commerce development covers products, plans, cart, wishlist, promo codes, checkout, payment callbacks, and purchase fulfilment. Service management covers requirements, quotes, tasks, conversations, and support tickets.

ADD IMAGE HERE
Figure 1.1 Work Breakdown Structure

Gantt Chart

The Gantt chart should show the planned duration and dependencies of analysis, design, implementation, integrations, testing, documentation, and deployment. Since this is a single-student project, the development, testing, documentation, and review activities are assigned to the same project owner.

ADD IMAGE HERE
Figure 1.2 Gantt Chart

Project Responsibility

Table 1.1 Project Responsibility
NameSection / Roll NumberResponsibility
Mohammad Rameez ImdadB / 58Analysis, design, development, testing, deployment, and documentation

Report Outline

Chapter 1 introduces the business problem and objectives. Chapter 2 defines requirements and constraints. Chapter 3 presents actors and use cases. Chapter 4 explains architecture, database, interactions, states, deployment, and interfaces. Chapter 5 describes implementation technologies and security. Chapter 6 documents testing and future improvements.

CHAPTER 2 SYSTEM REQUIREMENTS AND SPECIFICATION

The purpose of this specification is to describe a web platform supporting two related business models. B2B users can request and manage custom software services, while B2C users can browse and purchase digital products, plans, and other services. Administrators and staff operate the workflows needed to approve payments, deliver access, manage content, and support users.

Document Conventions

This report uses Times New Roman, 12-point body text, bold section headings, and double line spacing. “B2B” means business-to-business service interaction. “B2C” means business-to-consumer digital purchase interaction. “RBAC” means role-based access control. “CRUD” means create, read, update, and delete.

Intended Audience

The intended audience includes the project supervisor, examiners, software developers, administrators, employees, sales agents, B2B clients, B2C customers, and future maintainers.

Service Perspective

The platform is a web-based PHP 8+ and MySQL application. A browser communicates with PHP pages and AJAX endpoints. The backend uses PDO prepared statements, session authentication, CSRF controls, role gates, and database transactions where required. External services provide payment processing, Google authentication, email, WhatsApp communication, web push, and YouTube verification.

Service Function

The main function is to connect customer-facing commerce with internal service operations. The platform manages product and plan discovery, requirements intake, quotations, tasks, payments, file access, support, notifications, and administrative reporting.

Product Functions

User Functions

Administrative and Staff Roles

The administrator manages users, products, source files, plans, bundles, promo codes, payments, sales, tasks, project requirements, policies, notifications, settings, security, logs, and maintenance. Employees support client projects and operational tasks. Agents handle assigned transaction workflows. Customers manage their own profile, purchases, projects, downloads, support, and notifications according to permissions.

Detailed Role and Permission Model

Table 2.1 Role Responsibility Matrix
RolePrimary ResponsibilityTypical Permissions
AdministratorFull platform operationManage users, content, payments, projects, staff, settings, logs, security, and reports
EmployeeInternal service deliveryWork on assigned projects, tasks, tickets, messages, and customer updates
AgentAssigned transaction supportView and process assigned agent transactions according to role scope
CustomerB2B/B2C self-serviceManage own profile, requirements, purchases, downloads, support, and notifications
External providerPayment or identity serviceExchange verified callback or identity data only; never receives internal admin access

Design and Implementation Constraints

Assumptions and Dependencies

The system assumes a modern browser, stable internet, a working MySQL database, correctly configured PHP extensions, valid payment credentials, Google OAuth configuration, WhatsApp configuration, and secure hosting. Payment success is confirmed through verified callbacks and server-side checks.

External Interface Requirements

The interface provides a public storefront, authenticated customer portal, agent/employee workspace, and administrator workspace. Forms include validation, feedback, mobile-friendly controls, secure file handling, searchable records, and clear navigation.

System Features

User Authentication and Access Control

Users can register, log in, recover passwords, connect Google accounts, maintain sessions, and receive a dashboard based on their role. Invalid credentials, rate limits, CSRF checks, or fingerprint failures deny access safely and record the relevant security event.

B2B Project Requirement Management

A B2B client submits company information, project overview, problem statement, expected outcomes, features, roles, timeline, scale, technology preferences, hosting needs, budget, and notes. Authorized staff can review, update status, communicate, create tasks, and notify the client.

B2B and B2C Commerce Fulfilment

A customer selects products, plans, or services, reviews totals, applies eligible offers, chooses a payment method, and submits checkout. The server stores a pending transaction, verifies the result, preserves payment history, and fulfils the order only once.

Security, Notifications, and Support

The platform uses CSRF tokens, prepared statements, password hashing, session fingerprinting, RBAC, signed download tokens, upload validation, rate limiting, HTTPS expectations, and activity logs. Email, WhatsApp, in-app notifications, and web push provide operational updates.

Other Nonfunctional Requirements

Performance, Safety, and Reliability

Pages should use indexed queries, pagination, caching, and minimized repeated database calls. Only authorized users may access private records and files. Payment, purchase, project, task, ticket, and audit records must remain consistent. Provider failures must return controlled pending or error states without granting unauthorized access.

Security and Ease of Use

The platform protects data with password hashing, secure sessions, CSRF controls, prepared statements, RBAC, signed tokens, rate limiting, upload validation, and audit logs. Clear role-based navigation, understandable forms, responsive tables, status messages, simple checkout, and support options improve usability.

CHAPTER 3 USE CASE ANALYSIS

A use-case model explains how actors interact with the platform to complete business goals. The main actors are Customer, B2B Client, Administrator, Employee, Agent, Payment Provider, Google OAuth, WhatsApp, Email Service, and YouTube API.

ADD IMAGE HERE
Figure 3.1 Use Case Model

User Registration and Login

This use case supports registration, normal login, password recovery, Google OAuth, session timeout, and logout. Successful authentication creates a protected session and routes the actor to the correct dashboard.

ADD IMAGE HERE
Figure 3.2 User Authentication Use Case
Table 3.1 Fully Dressed Use Case — User Authentication
Use Case NameUser Registration and Login
ScopeIdentity and access
ActorCustomer, staff, administrator, Google OAuth
Pre-conditionValid account or registration data is available
Post-conditionProtected session and role dashboard are available
Success ScenarioUser authenticates and receives permitted access
Failure ScenarioInvalid credentials or security checks deny access safely

Submit B2B Project Requirement

A B2B client submits structured project information so the provider can review the business need, scope, features, roles, timeline, technology, and budget. Authorized staff can review the request, communicate, create tasks, and update status.

ADD IMAGE HERE
Figure 3.3 B2B Project Requirement Use Case
Table 3.2 Fully Dressed Use Case — Project Requirement
Use Case NameSubmit B2B Project Requirement
ScopeB2B service management
ActorB2B client and staff
Pre-conditionClient can access the form and required fields are valid
Post-conditionProject is stored and visible to authorized users
Success ScenarioRequest is submitted, reviewed, and tracked

Browse Products, Plans, and Services

A B2C customer browses public products, source files, plans, services, case studies, and information pages. The customer can search, inspect details, compare options, add items to a cart, and save items to a wishlist.

ADD IMAGE HERE
Figure 3.4 Public Catalog Use Case
Table 3.3 Fully Dressed Use Case — Browse and Select
Use Case NameBrowse and Select
ScopeB2C catalog
ActorCustomer
Pre-conditionPublished catalog is available
Post-conditionItem is viewed, saved, or added to cart
Success ScenarioCustomer finds a suitable product or service

Complete Purchase and Payment

A customer checks out products, plans, or eligible digital services. The system calculates the payable amount, applies valid promo or points rules, selects an available payment method, stores a pending transaction, and verifies the provider or manual approval before fulfilment.

ADD IMAGE HERE
Figure 3.5 Checkout and Payment Use Case
Table 3.4 Fully Dressed Use Case — Checkout
Use Case NameComplete Purchase and Payment
ScopeB2C commerce and payment
ActorCustomer and payment provider
Pre-conditionCart contains eligible items and a payment method is available
Post-conditionVerified payment creates eligible fulfilment
Failure ScenarioPending, declined, or duplicate payment is controlled

Access Purchased Content Securely

After verified payment or administrator assignment, a customer opens the purchased area and downloads eligible content through a secure endpoint. Ownership, signed tokens, expiry, allowed domains, rate limits, and download permissions are checked before delivery.

ADD IMAGE HERE
Figure 3.6 Secure Download Use Case
Table 3.5 Fully Dressed Use Case — Secure Access
Use Case NameAccess Purchased Content
ScopeDigital delivery
ActorCustomer and secure download service
Pre-conditionOwnership or assignment exists and token is valid
Post-conditionEligible file is streamed and the attempt is logged

Manage Operations and Support

An administrator, employee, or agent manages operational records assigned to the role. This includes users, projects, quotes, tasks, sales, payment reviews, tickets, messages, notifications, content, settings, and audit history.

ADD IMAGE HERE
Figure 3.7 Administration and Support Use Case
Table 3.6 Fully Dressed Use Case — Operations
Use Case NameManage Operations and Support
ScopeAdministration and service delivery
ActorAdministrator, employee, agent
Pre-conditionActor has a permitted role and record scope
Post-conditionRecord, status, message, or task is updated and audited

CHAPTER 4 SYSTEM DESIGN

The system design describes the architecture, operating environment, subsystems, database entities, interfaces, processing logic, security boundaries, deployment arrangement, and user-interface screens.

Architecture Diagram

The browser presents public, customer, staff, and administrator interfaces. PHP pages and AJAX endpoints perform validation, authorization, business logic, database access, and integrations. MySQL stores the system of record. External services handle payments, Google authentication, email, WhatsApp, web push, and YouTube verification.

ADD IMAGE HERE
Figure 4.1 Architecture Diagram

Detailed Runtime and Data Flows

Authentication flow: a visitor submits login, registration, password-reset, or Google OAuth information. The application validates the request, applies rate limits and CSRF checks, verifies credentials or the external identity, creates a session fingerprint, records login activity, and redirects according to the role. Session timeout and fingerprint mismatch are handled by the shared authentication layer.

B2C purchase flow: a customer browses the catalog, adds a product or plan to the cart, applies a promo code or points rule, selects a country-appropriate payment method, and submits checkout. The application creates a pending payment record. PayFast or manual-payment handlers verify the result. Successful fulfilment grants file or plan access, synchronizes sales and agent records, increments eligible promo usage, sends branded email/WhatsApp notifications, and clears the cart. Repeated callbacks are checked so the same payment cannot grant access twice.

B2B project flow: a client submits a structured requirement containing company, problem, outcomes, features, roles, timeline, technology, hosting, budget, and notes. The record is scoped by account or contact ownership. Staff review it, exchange messages and attachments, update status, create tasks, send progress updates, and close or continue the project. This creates a traceable alternative to scattered chat messages.

Secure delivery flow: a customer requests a purchased or assigned file. The secure endpoint checks ownership or assignment, signed token, expiry, allowed domain, IP/download rate, and file state before streaming the file. The attempt is logged. Free-file delivery uses a separate watch-gated and rate-limited path, while paid delivery is linked to verified purchases or administrator assignments.

Communication flow: business events such as new projects, payment changes, purchases, ticket replies, task updates, downloads, and login activity create in-app notifications and may trigger branded email, web push, or WhatsApp/WhatChimp actions. WhatChimp also supports conversations, quick replies, invoices, task updates, reminders, business-hours responses, and webhook-based status handling.

Table 4.7 Primary End-to-End Data Flows
FlowStartCore ProcessingEnd State
AuthenticationLogin/register requestCSRF, rate limit, credentials/OAuth, fingerprint, role redirectProtected role session
B2C purchaseCart checkoutTotals, discount, payment, callback verification, idempotent fulfilmentPayment, sale, access, receipt, notification
B2B projectRequirement formValidation, ownership, chat, quote, task, status, staff updateTracked project lifecycle
Secure downloadFile requestOwnership, token, expiry, domain, rate limit, audit logPermitted file stream or controlled denial
Support messagingTicket/chat/task eventAssignment, response, notification, WhatsApp/email follow-upTraceable communication history

Graphify Findings and Architectural Risk

The graph shows a modular system with high coupling around configuration, authentication, WhatChimp, payment fulfilment, and administrator navigation. This is useful for the FYP because it demonstrates that the platform is an integrated information system with cross-module business rules, not a collection of unrelated pages. It also identifies testing priorities: shared hubs should be regression-tested whenever authentication, payment, settings, notifications, or messaging code changes.

Graphify also marks some relationships as inferred rather than directly extracted. These relationships are treated as architectural hypotheses and should be confirmed through code review and end-to-end testing. The final system design therefore separates confirmed source relationships from assumptions and documents the important flows that require validation.

The graph report also identifies 25 grouped relationships and high-connectivity core nodes: wcBotSweep(), getAdminSetting(), the WhatChimp API integration, follow-up and off-hours sweep functions, shared WhatsApp message helpers, administrator navigation, validateFingerprint(), and handleAuthFailure(). These nodes represent the platform’s operational control points. They should receive focused regression tests because they influence multiple communities at once.

Domain Model

The domain model contains User, Role, Product, SourceFile, Plan, Cart, Wishlist, ProjectRequirement, Quote, Task, SupportTicket, Payment, Purchase, FileAssignment, Notification, PromoCode, Referral, and ActivityLog entities. Ownership, role permissions, payment state, fulfilment, and secure access connect the core workflows.

ADD IMAGE HERE
Figure 4.2 Domain Model

Entity Relationship Diagram

The ERD should show users connected to projects, quotes, tasks, tickets, payments, purchases, file assignments, notifications, referrals, sessions, and audit logs. Products and files connect to bundles, carts, wishlists, purchases, and access records. Plans connect to users and plan purchases.

ADD IMAGE HERE
Figure 4.3 Entity Relationship Diagram

Class Diagram

The class design represents authentication and sessions, user and role management, products and plans, cart and wishlist services, payments, projects, tasks, support, notifications, integrations, security, caching, and reporting.

ADD IMAGE HERE
Figure 4.4 Class Diagram

Sequence / Collaboration Diagram

A representative sequence begins when a customer submits a checkout or project form. The browser sends a protected request, PHP verifies CSRF and role, validates input, writes the database record, calls an external provider where required, stores the resulting state, creates notifications or emails, and returns a controlled response. Payment callbacks repeat verification and execute idempotent fulfilment.

ADD IMAGE HERE
Figure 4.5 Sequence / Collaboration Diagram

Operation Contracts

Table 4.1 Operation Contract — Authenticate User
Operation NameAuthenticate User
Cross ReferenceUser Registration and Login
Pre-conditionValid credentials and CSRF token
Post-conditionSecure session, role redirect, login log, and notification state
Table 4.2 Operation Contract — Submit Project Requirement
Operation NameSubmit Project Requirement
Cross ReferenceSubmit B2B Project Requirement
Pre-conditionClient is authorized and required fields are valid
Post-conditionProject is stored, staff is notified, and ownership is enforced
Table 4.3 Operation Contract — Browse and Select
Operation NameBrowse and Select
Cross ReferenceBrowse Products, Plans, and Services
Pre-conditionPublished catalog data is available
Post-conditionCustomer views details or updates cart/wishlist
Table 4.4 Operation Contract — Complete Checkout
Operation NameComplete Checkout
Cross ReferenceComplete Purchase and Payment
Pre-conditionCart, totals, discount, and payment method pass validation
Post-conditionPayment state is stored and verified fulfilment executes once
Table 4.5 Operation Contract — Access Purchased Content
Operation NameAccess Purchased Content
Cross ReferenceAccess Purchased Content Securely
Pre-conditionOwnership, token, expiry, and rate checks pass
Post-conditionFile is streamed and the download attempt is logged
Table 4.6 Operation Contract — Manage Operations and Support
Operation NameManage Operations and Support
Cross ReferenceManage Operations and Support
Pre-conditionStaff role and record scope permit the operation
Post-conditionStatus, task, ticket, payment, message, or content is updated and audited

Activity Diagram

The main activity flow is: visitor opens the platform, authenticates if needed, browses or submits a requirement, selects a product or service, checks eligibility and totals, submits payment or a staff request, waits for verified processing, receives a notification, and accesses the resulting purchase or project workspace.

ADD IMAGE HERE
Figure 4.6 Activity Diagram

State Transition Diagrams

The authentication state model includes unauthenticated, registration pending, login pending, authenticated, session expired, access denied, and logged out.

ADD IMAGE HERE
Figure 4.7 State Transition Diagram — Authentication

The project state model includes draft, submitted, under review, quotation prepared, approved, in progress, awaiting client response, completed, cancelled, and archived.

ADD IMAGE HERE
Figure 4.8 State Transition Diagram — Project Requirement

The checkout state model includes cart active, checkout started, payment pending, payment verified, payment declined, fulfilment completed, and refunded or reversed.

ADD IMAGE HERE
Figure 4.9 State Transition Diagram — Checkout

The secure-download state model includes access requested, token generated, token validated, file streamed, rate limited, expired, and denied.

ADD IMAGE HERE
Figure 4.10 State Transition Diagram — Secure Download

The support state model includes ticket opened, assigned, in progress, waiting for customer, resolved, closed, and reopened.

ADD IMAGE HERE
Figure 4.11 State Transition Diagram — Support

Component Diagram

The component design groups the application into public pages, authentication, customer portal, admin panel, employee/agent tools, commerce and cart, payment processing, secure download, project management, support, notification, integration, security, cache, and reporting components.

ADD IMAGE HERE
Figure 4.12 Component Diagram

Deployment Diagram

The deployment arrangement contains a user browser, Apache/PHP application server, MySQL database server, protected upload/storage locations, and external provider endpoints. HTTPS, environment configuration, database credentials, API secrets, and scheduled maintenance tasks must be protected.

ADD IMAGE HERE
Figure 4.13 Deployment Diagram

User Interface Screens

Public landing pages introduce services, digital products, plans, source files, case studies, FAQs, policies, contact options, language controls, and login/register actions.

ADD IMAGE HERE
Figure 4.14 Public Landing and Catalog Screen

The authentication screen supports login, registration, password recovery, Google connection, and safe error messages.

ADD IMAGE HERE
Figure 4.15 Login, Registration, and Password Recovery Screen

The customer dashboard summarizes purchases, plans, points, notifications, projects, tickets, and downloads.

ADD IMAGE HERE
Figure 4.16 Customer Dashboard Screen

Product details provide descriptions, prices, access type, related content, and cart or wishlist actions.

ADD IMAGE HERE
Figure 4.17 Product and Service Details Screen

The cart and wishlist screens show selected items, quantities, promo rules, currency, and checkout actions.

ADD IMAGE HERE
Figure 4.18 Cart and Wishlist Screen

The checkout screen shows payment method, total, discount, currency, order details, and pending or verified status.

ADD IMAGE HERE
Figure 4.19 Checkout and Payment Screen

The B2B requirements screen captures client, company, project, problem, outcome, features, roles, timeline, and budget information.

ADD IMAGE HERE
Figure 4.20 B2B Project Requirements Screen

The administrator dashboard provides KPI summaries and management areas for users, files, plans, assignments, payments, traffic, projects, tasks, settings, and logs.

ADD IMAGE HERE
Figure 4.21 Administrator Dashboard Screen

Payment history provides filters, customer and amount details, approval controls, invoices, and fulfilment records.

ADD IMAGE HERE
Figure 4.22 Payment History and Fulfilment Screen

Support, tasks, and WhatsApp operations show project updates, tickets, replies, reminders, notifications, and role restrictions.

ADD IMAGE HERE
Figure 4.23 Support and WhatsApp Operations Screen

Secure downloads show only the files for which the customer has verified ownership or assignment.

ADD IMAGE HERE
Figure 4.24 Secure Downloads Screen

The protected delivery flow validates ownership, signed token, expiry, allowed domain, and rate limits before streaming a file and recording the activity.

ADD IMAGE HERE
Figure 4.25 Secure File Delivery Flow

Reports and activity history provide operational visibility into payments, downloads, logins, users, traffic, tasks, projects, and system events.

ADD IMAGE HERE
Figure 4.26 Reports and Activity History Screen

CHAPTER 5 IMPLEMENTATION

The implementation uses reusable authentication, security, database, payment, email, notification, and interface helpers. The browser layer uses HTML, CSS, JavaScript, jQuery, DataTables, Chart.js, Font Awesome, and SweetAlert2. The backend uses PHP 8+, PDO prepared statements, session controls, and MySQL.

ADD IMAGE HERE
Figure 5.1 Important Platform Flow

Libraries and Frameworks

Deployment Environment

Tools and Techniques

CHAPTER 6 TESTING AND EVALUATION

Testing verifies that the platform behaves correctly, protects private data, calculates commerce values accurately, handles provider failures, and maintains consistent purchase, access, project, task, support, and notification states. The plan covers functional use cases, alternate paths, boundaries, security, performance, and stress conditions.

Use Case Testing

The main end-to-end scenarios cover registration/login, browsing and selecting an item, cart and checkout, verified payment and secure access, B2B project submission, staff update, support response, and logout. Each scenario should be executed with valid and invalid data and recorded with evidence.

Table 6.1 Use Case Testing — Main Success Scenario
No.StepExpected ResultStatus
1Authenticate or browse publiclyCorrect page or dashboard opensRecord result
2Submit project or select productValidated project/cart state is createdRecord result
3Checkout or send requirementPending payment or project status appearsRecord result
4Verify payment or staff responseAccess, receipt, message, or update is availableRecord result
5Open download/support areaOnly permitted information is shownRecord result
6Logout or close workflowSession/status ends safelyRecord result
Table 6.2 Use Case Testing — Alternate and Exception Scenarios
No.ExceptionExpected Result
1-aInvalid login or expired sessionAccess denied and safe error shown
2-aInvalid project or checkout fieldValidation message shown and no unsafe write occurs
3-aPayment provider unavailableTransaction remains pending or retry is offered
4-aDuplicate callbackNo duplicate purchase, points, access, or notification
5-aUnauthorized downloadRequest denied and activity recorded

Boundary Value Analysis

Boundary testing checks empty, minimum, maximum, malformed, duplicate, expired, and unauthorized values for usernames, passwords, emails, phone values, prices, quantities, promo codes, upload sizes, project fields, payment amounts, token expiry, and search inputs.

Authentication and Identity Inputs

Test empty, minimum, maximum, duplicate, malformed, rate-limited, and already-registered values for username, email, password, and contact fields.

Commerce and Project Fields

Test zero, negative, maximum, decimal, duplicate, expired, and unavailable values for amounts, quantities, discounts, points, timelines, file sizes, and required project fields. Test unauthorized ownership, invalid CSRF tokens, expired sessions, invalid download tokens, disallowed uploads, long text, and special characters.

Performance Testing

Performance testing measures page loading, server response, database access, browser responsiveness, throughput, concurrent-user behavior, error rate, and recovery from slow external providers. The values below are acceptance targets for the FYP test plan; the measured-result fields must be completed with evidence from the deployed Hostinger environment.

Performance Test Environment and Measurement Method

Table 6.3 Performance Test Setup
ItemTest ConfigurationRecord Before Execution
ApplicationDeployed PHP/MySQL platform on Hostinger using HTTPSDomain, PHP version, build date
BrowserCurrent Chrome or Edge, desktop and mobile viewportBrowser version, device, screen size
NetworkNormal broadband, mobile/slow-network comparisonDownload/upload speed, latency
DatasetRepresentative users, products, files, payments, projects, tickets, notifications, and logsRow count for each table
Load profile1 baseline user, then 5, 10, 25, and 50 concurrent users where hosting permitsConcurrent users and test duration
ToolsBrowser DevTools, Lighthouse, server access logs, MySQL slow-query log, and an approved load toolTool version and test script
EvidenceWaterfall screenshot, response-time result, error log, query time, and screen recording where neededEvidence filename or link
Table 6.4 Performance Metrics and Calculation Rules
MetricHow to MeasureAcceptance GuidanceActual Result
Response timeTime from request start until complete responseRecord average, minimum, maximum, p95, and p99Record value
TTFBBrowser request start to first server bytePrefer below 800 ms for normal pagesRecord value
FCP / LCPFirst Contentful Paint and Largest Contentful PaintFCP below 1.8 s and LCP below 2.5 s where practicalRecord value
ThroughputSuccessful requests or completed workflows per second/minuteMust meet expected peak workload without queue failureRecord value
Error rateFailed requests ÷ total requests × 100Below 1% for normal load; no silent business failureRecord value
Database timeQuery execution time and total queries per requestIndexed common reads preferably below 1 s p95Record value
Memory / CPUServer and browser resource usage during the runNo uncontrolled growth, timeout, or worker exhaustionRecord value
RecoveryTime to return to normal after load or provider failurePending/retry state must be controlled and data must remain consistentRecord value

Authentication and Session Performance

Table 6.5 Performance Testing — Authentication and Sessions
IDScenario and WorkloadSteps / MeasurementMetricsTarget / Acceptance CriteriaResult / Status
PT-A01Public login page, cold and warm loadOpen in a new session, reload three times, record DevTools waterfallTTFB, FCP, LCP, total loadTTFB <800 ms; LCP <2.5 s where practicalRecord value / Pending
PT-A02Successful customer loginSubmit valid credentials 20 times with clean sessionsResponse average, p95, DB timeLogin response <2 s p95; correct dashboard every timeRecord value / Pending
PT-A03Successful admin/employee loginRepeat with each permitted role and role-specific redirectResponse, redirect, error rate<2.5 s p95; no cross-role page or data leakageRecord value / Pending
PT-A04Invalid login and rate limitingSend repeated invalid passwords from one client, then wait for recoveryResponse, rate-limit delay, CPUControlled denial; no server crash or user enumeration; recovery worksRecord value / Pending
PT-A05Registration and duplicate account checkSubmit valid, duplicate, long, malformed, and incomplete registration dataResponse, validation time, DB writes<3 s p95; only one valid account; no partial recordRecord value / Pending
PT-A06Password recovery and resetRequest reset, use valid token, expired token, and reused tokenPage response, token lookup, email queue time<3 s excluding provider email delay; token is single-use and expiry is enforcedRecord value / Pending
PT-A07Google OAuth callbackComplete success, denial, duplicate-email, and provider-timeout flowsCallback time, error rate, session creation<5 s excluding Google network time; safe fallback for failureRecord value / Pending
PT-A08Session validation, fingerprint, timeout, logoutOpen protected page, alter session conditions, expire session, logout, press BackValidation time, redirect timeProtected request <1 s overhead; session cannot be reused after logout/expiryRecord value / Pending
PT-A09Concurrent authenticationRun 5, 10, 25, and 50 login requests with mixed valid/invalid accountsThroughput, p95, error rate, CPU/memoryNo session mix-up, deadlock, or uncontrolled error growthRecord value / Pending

Catalog and Dashboard Performance

Table 6.6 Performance Testing — Catalog and Dashboards
IDScenario and WorkloadSteps / MeasurementMetricsTarget / Acceptance CriteriaResult / Status
PT-C01Landing page and public assetsLoad page on desktop/mobile, cold cache and repeat visitFCP, LCP, page weight, requestsLCP <2.5 s where practical; no broken assets or console errorsRecord value / Pending
PT-C02Product/service catalog with 100, 1,000, and 10,000 recordsOpen catalog, change page, sort, and inspect query planTTFB, query time, rows transferredInitial list <2 s p95; pagination prevents full-table transferRecord value / Pending
PT-C03Product detail and source-file pageOpen records with short and long descriptions, previews, and related itemsLoad time, image load, memory<2.5 s p95 excluding large media; no layout-breaking contentRecord value / Pending
PT-C04Customer dashboardLoad dashboard with purchases, plans, projects, tickets, notifications, and downloadsServer time, number of queries, JS time<3 s p95; no N+1 query growth; widgets remain usableRecord value / Pending
PT-C05Admin dashboard and KPI cardsLoad with large payment, user, project, log, and traffic datasetsQuery time, render time, memory<4 s p95; aggregates use indexed or precomputed queriesRecord value / Pending
PT-C06Theme, language, notification, and menu settingsSwitch settings and reload public/customer/admin pagesSettings lookup, response, visual delaySetting lookup adds <300 ms; no repeated query explosionRecord value / Pending
PT-C07Mobile responsive performanceRun on mobile emulation and a real mobile device across slow networkLCP, input delay, layout shiftReadable page, usable controls, no horizontal overflow, controlled errorsRecord value / Pending
PT-C08Concurrent catalog/dashboard visitsMix public, customer, employee, and admin requests at 5–50 usersThroughput, p95, error rate, CPUNo timeout or cross-user data; degradation remains predictableRecord value / Pending

Search, Filters, Tables, and Exports

Table 6.7 Performance Testing — Search and Table Pagination
IDScenario and WorkloadSteps / MeasurementMetricsTarget / Acceptance CriteriaResult / Status
PT-S01Product and service keyword searchUse exact, partial, case-mixed, numeric, special-character, and empty searchesResponse, query time, result countSearch <1 s p95; correct results; safe handling of special charactersRecord value / Pending
PT-S02File, plan, and bundle searchSearch titles, categories, tags, and unavailable recordsResponse, index use, transferred rows<1.5 s p95; no unauthorized or unpublished resultRecord value / Pending
PT-S03Admin users, payments, projects, and logsSearch with 1,000, 10,000, and 100,000-row test datasets if availablep95, DB plan, memoryIndexed/keyset or server-side search; no full-table browser loadRecord value / Pending
PT-S04Combined filters and date rangesApply one filter, every filter, conflicting filters, and resetFilter time, query count, accuracy<1.5 s p95; result count and totals remain accurateRecord value / Pending
PT-S05Pagination and sortingOpen first, middle, last, next, previous, and invalid pages; sort each sortable columnPage response, rows, DB time<1 s p95; stable ordering; no duplicate or missing rowsRecord value / Pending
PT-S06Empty and no-result statesSearch impossible value and filter an empty date rangeResponse, render time<1 s; clear empty state; no PHP/JS warningRecord value / Pending
PT-S07CSV/PDF/print exportExport 100, 1,000, and maximum permitted rows with filters appliedGeneration time, file size, memoryCSV <5 s and PDF/print <10 s for normal report size; filters preservedRecord value / Pending
PT-S08Concurrent search trafficRun mixed keywords and filters from 5–50 virtual usersThroughput, p95, DB CPU, error rateNo lock escalation, timeout, SQL error, or result leakageRecord value / Pending

Checkout and Payment Performance

Table 6.8 Performance Testing — Cart, Checkout, and Payment
IDScenario and WorkloadSteps / MeasurementMetricsTarget / Acceptance CriteriaResult / Status
PT-P01Cart add, update, remove, and wishlistAdd one and many products; change quantity; remove; move items to wishlistRequest time, DB writes, browser response<1 s p95 for cart actions; totals update correctlyRecord value / Pending
PT-P02Totals, currency, promo, and points calculationTest tax/discount/points/currency combinations, zero and maximum valuesCalculation time, numeric accuracy<1 s p95; 100% arithmetic accuracy; no rounding mismatchRecord value / Pending
PT-P03Checkout form validationSubmit valid, incomplete, duplicate, malformed, and oversized dataResponse, validation time, failed writes<1.5 s p95; no partial order or unsafe writeRecord value / Pending
PT-P04PayFast/payment initiationStart payment with valid cart, expired cart, changed price, and invalid amountInitiation time, provider response, error rate<5 s excluding provider delay; server recalculates totalsRecord value / Pending
PT-P05Verified callback/webhookSend success, failure, pending, malformed, delayed, and duplicate callbacksCallback time, DB transaction time, duplicate count<3 s processing; exactly-once fulfilment; safe response for invalid callbackRecord value / Pending
PT-P06Manual payment upload and approvalUpload valid/invalid proof, approve, decline, and re-open recordUpload time, validation, approval timeFile checks complete; state transition <2 s p95; no duplicate accessRecord value / Pending
PT-P07Receipt, email, WhatsApp, and notification fan-outComplete a purchase and observe all enabled notificationsQueue/response time, retries, duplicate messagesCheckout does not hang on provider delay; one logical notification per eventRecord value / Pending
PT-P08Concurrent checkout and stock/access raceRun several users purchasing the same limited or gated itemSuccess count, lock time, duplicate fulfilmentAtomic state; no negative quantity, duplicate purchase, or access leakRecord value / Pending

Secure Download and File Delivery Performance

Table 6.9 Performance Testing — Secure Download and File Delivery
IDScenario and WorkloadSteps / MeasurementMetricsTarget / Acceptance CriteriaResult / Status
PT-D01Authorized purchased-file requestRequest small, medium, and large files using valid ownershipAuth time, TTFB, throughput, memoryAuthorization <1 s; streaming starts <3 s; memory remains boundedRecord value / Pending
PT-D02Assigned B2B file requestRequest files assigned to a project/client and confirm scopeLookup time, response, access accuracy<1.5 s p95; only assigned project files streamRecord value / Pending
PT-D03Free-file watch-gated/rate-limited pathComplete valid gate, repeat within limit, then exceed limitToken time, rate-limit response, log timeValid request streams; repeat is controlled; no bypassRecord value / Pending
PT-D04Invalid, expired, reused, or altered tokenModify token, wait for expiry, reuse token, and change file IDDenial time, error rate, audit logDenied <1 s; no path disclosure; every denial is safely loggedRecord value / Pending
PT-D05Unauthorized account and direct URL accessUse another account, logged-out browser, guessed path, and referrer changeDenial accuracy, response time100% unauthorized denial; storage path is never exposedRecord value / Pending
PT-D06Concurrent large downloadsStart 5, 10, and 25 simultaneous downloads within hosting limitsTime to first byte, throughput, CPU/memory, failuresNo application crash; rate limits and server limits behave predictablyRecord value / Pending
PT-D07Upload validation and storage handlingTest allowed type, wrong MIME, oversized, corrupt, duplicate, and long filenameValidation time, storage size, error rateOnly allowed content stored; no executable upload; clear rejectionRecord value / Pending
PT-D08Download audit and notificationComplete and deny downloads while checking logs and user notificationsLog insertion time, duplicate logsOne accurate audit event; download response is not blocked by slow notification providerRecord value / Pending

Database, Cache, Scheduled Jobs, and Integrations

Table 6.10 Performance Testing — Database and Integrations
IDScenario and WorkloadSteps / MeasurementMetricsTarget / Acceptance CriteriaResult / Status
PT-I01Indexed user/product/payment/project queriesRun common list, detail, filter, and ownership queries with realistic row countsEXPLAIN plan, p95, rows examinedUses intended indexes; common reads <1 s p95Record value / Pending
PT-I02Transactions and concurrent state changesApprove payment, update project, assign file, and log activity concurrentlyLock wait, deadlock, rollback, consistencyAtomic result; no lost update, orphan record, or partial fulfilmentRecord value / Pending
PT-I03Cache hit/miss and invalidationLoad cached settings/content, update source, reload, and inspect expiryHit ratio, lookup time, stale durationCache improves repeat response; updates invalidate within defined periodRecord value / Pending
PT-I04Google OAuth and YouTube provider delayTest normal response, denial, timeout, malformed response, and retryExternal latency, retry count, page responseTimeout is bounded; user receives controlled message; no stuck sessionRecord value / Pending
PT-I05Email and web-push provider behaviorTrigger registration, payment, project, support, and download notificationsQueue delay, retry, duplicate countCore transaction completes independently; failed delivery is logged/retriableRecord value / Pending
PT-I06WhatsApp/WhatChimp messages and webhooksSend message, quick reply, invoice, reminder, off-hours response, and webhookAPI latency, retry, duplicate messages, log timeAPI delay does not block core page; webhook is authenticated/idempotentRecord value / Pending
PT-I07Scheduled follow-up and bot sweepsRun wcBotSweep(), follow-up, off-hours, and notification jobs on test dataJob duration, records processed, failuresBatch processing completes within schedule; no repeated message or skipped eligible recordRecord value / Pending
PT-I08Activity logs and report growthInsert and query high-volume login, payment, download, and admin eventsInsert time, report time, table growthLogging does not materially slow core action; reports stay paginatedRecord value / Pending
PT-I09Provider outage and recoveryDisable or delay payment, email, WhatsApp, Google, or YouTube providerTimeout, fallback, recovery time, data consistencyControlled pending/retry state; no duplicate charge, fulfilment, or messageRecord value / Pending

Performance Result Summary

Table 6.11 Performance Test Summary
SectionTestsPassedFailedBlockedOverall Evidence / Remarks
Authentication and sessionsPT-A01–PT-A09Enter countEnter countEnter countAttach screenshots and response report
Catalog and dashboardsPT-C01–PT-C08Enter countEnter countEnter countAttach waterfall and query evidence
Search and tablesPT-S01–PT-S08Enter countEnter countEnter countAttach search/export evidence
Checkout and paymentsPT-P01–PT-P08Enter countEnter countEnter countAttach callback and fulfilment evidence
Secure deliveryPT-D01–PT-D08Enter countEnter countEnter countAttach access-denial and throughput evidence
Database and integrationsPT-I01–PT-I09Enter countEnter countEnter countAttach logs, EXPLAIN, and provider evidence

Stress Testing

Stress testing evaluates stability when many users search products, open dashboards, submit requirements, create tickets, perform checkout, or request downloads at the same time. It also tests repeated payment callbacks, notification bursts, large audit histories, and temporary provider unavailability.

Future Improvements

Future improvements may include a richer B2B CRM pipeline, multi-tenant organizations, recurring invoices, additional payment gateways, advanced analytics, automated quotation generation, mobile applications, expanded WhatsApp workflows, stronger automated test coverage, and deployment observability.

REFERENCES

  1. PHP Documentation. PHP 8+ language and server-side web development reference.
  2. MySQL Documentation. Relational database, indexing, constraints, and transaction reference.
  3. OWASP Foundation. Web application security, authentication, access control, and secure coding guidance.
  4. PayFast Documentation. Payment initiation, callback verification, and transaction integration reference.
  5. Google Developers Documentation. OAuth and Google API integration reference.
  6. DataTables Documentation. Search, pagination, responsive tables, and export controls.