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

Sir Umair Butt

School of Computer Science

Minhaj University, Lahore

DECLARATION

I declare that I completed the analysis, design, development, and testing of this final-year project myself. I have added references wherever I used information from documents or other writers. I have not submitted this report for any other academic award. I take full responsibility for this work.

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

DEDICATION

To

My Parents

For their prayers, patience, and sacrifices during my education.

My Teachers

For helping me learn, ask questions, and turn an idea into working software.

My Supervisor

For practical guidance and useful feedback during this project.

CERTIFICATE OF APPROVAL

This is to certify that Mohammad Rameez Imdad, Section B, Roll Number 58, has completed the project titled “B2B and B2C Digital Products and Services Platform” under the supervision of Sir Umair Butt at Minhaj University Lahore. The project meets the requirements of the BS Computer Science final-year project.

Supervisor: ______________________________
Sir 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 thank Allah Almighty for giving me the strength and patience to complete this project. I am thankful to my supervisor, Sir Umair Butt, for reviewing my work and guiding me throughout the project. I also thank the teachers of the School of Computer Science for the knowledge they shared during my degree. Most importantly, I am grateful to my parents for their prayers and continuous support.

ABSTRACT

This project is a web platform that handles two types of work in one place. It helps companies request custom software services, and it allows individual customers to buy digital products. Business clients can submit requirements, receive quotations, view tasks, and contact the team. Other customers can view products, source files, services, and plans. They can also use a cart and wishlist, make payments, and download approved purchases through secure links. The system gives separate access to customers, agents, employees, and administrators. It also works with Google sign-in, PayFast, manual payments, email, WhatsApp/WhatChimp, browser notifications, referrals, and YouTube checking. I tested various processes, including login, project submission, checkout, payment approval, support, and secure downloads. The platform keeps business work and digital sales organized instead of managing them through scattered messages and manually shared files. However, it still depends on the internet and third-party services.

TABLE OF CONTENTS

Use the links below to move through the document on screen. Check and update the page numbers before making the final 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 explains why I developed the platform and what it should achieve. It covers the business problem, weaknesses in the old work process, project scope, objectives, development plan, and report structure.

Background

A business that sells downloadable items and also develops custom projects deals with various types of customers. A normal buyer wants to find a product, pay, and get access quickly. A business client usually needs discussion, a quotation, progress updates, and support. When staff manage this work through separate pages, spreadsheets, and chat messages, it becomes hard to follow the complete history. My project brings these activities into one system.

Project Scope and Graph-Based Architecture Analysis

The application does more than a normal online store. I used Graphify to study the project source code. It found 244 files, about 1,756,293 words, 1,569 logical nodes, 2,176 links, and 325 communities. Around 83% of the links came directly from the source code. The remaining 17% came from meaning-based analysis. These results show that the project has various modules that use a smaller set of shared services.

I divided the project into three main areas. The customer area includes public pages, services, products, plans, bundles, free and paid files, cart, wishlist, checkout, purchases, points, referrals, profile, notifications, policies, and support. The service area manages B2B requirements, quotations, chats, tasks, progress, sales, expenses, and WhatsApp follow-up. The admin area manages users, catalogue content, payments, file access, security records, appearance settings, policies, cache, maintenance, and reports.

When I checked the dependency map, I found code that is used in more than one area. getAdminSetting() provides settings for registration, themes, catalogue pages, checkout, downloads, bundles, and messages. validateFingerprint() and handleAuthFailure() apply common session checks. WhatChimp helper functions connect chats with support, reminders, sales, tasks, and business-hour replies. Payment approval can also update access, sales, promotions, agent transactions, and outgoing messages. Because these shared functions affect various modules, I included them in repeat testing.

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

My main aim is to build one secure and responsive platform for custom software services and digital product sales. I want the system to provide role-based access, publish products and services, manage carts and wishlists, collect business requirements, handle quotations and tasks, process payments, provide secure downloads, connect required outside services, and keep a record of important actions.

Gap Analysis

Before developing this project, much of the work was handled through normal chat messages. Payments were checked by hand, and files were also shared manually. In this process, staff could miss a requirement, handle one payment twice, or send a file to the wrong person. My system uses proper forms, ownership checks, searchable records, clear payment status, secure file delivery, notifications, and controls based on the user role.

Project Plan

I developed the project in small stages. First, I collected the requirements and planned the database and access rules. Next, I worked on the storefront and B2B modules. I added payments, file delivery, staff panels, security, testing, deployment, and documentation in later stages.

Work Breakdown Structure

I divided the project work into analysis, database and security design, B2C sales, B2B project work, administration, integrations, testing, documentation, and deployment. Sales work includes the catalogue, plans, cart, wishlist, offers, checkout, callbacks, and delivery. Service work includes requirements, quotations, tasks, discussions, and support cases.

ADD IMAGE HERE
Figure 1.1 Work Breakdown Structure

Gantt Chart

The schedule shows the planned time for analysis, design, development, integration, testing, report writing, and deployment. As I am the only student working on this project, I handled development, testing, evidence collection, documentation, and correction myself.

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 2 explains the system requirements, users, interfaces, and quality needs. Chapter 3 describes the main use cases. Chapter 4 explains the architecture, database, interactions, states, deployment, and screen designs. Chapter 5 discusses implementation. Chapter 6 covers testing, performance, stress testing, and future improvements.

CHAPTER 2 SYSTEM REQUIREMENTS AND SPECIFICATION

This chapter turns the project idea into clear requirements that can be developed and tested. It covers buying digital products, requesting custom work, and the staff tasks needed for payments, delivery, communication, content management, and support.

Document Conventions

The report follows the university format. The body text uses 12-point Times New Roman, headings are bold, and paragraphs use double spacing. In this report, B2B means services provided to a business, B2C means direct sales to customers, RBAC means access based on user roles, and CRUD means creating, reading, updating, and deleting records.

Intended Audience

This report is prepared for my supervisor and examiners. It can also help future developers, system staff, customers, and business clients understand the platform and its requirements.

Service Perspective

I built the system as a PHP 8+ web application with a MySQL database. PHP handles browser and AJAX requests. It checks the input and user permission before using PDO for database work. Sessions, CSRF tokens, roles, and database transactions protect important actions. The application also connects with payment, Google login, email, WhatsApp, browser push, and YouTube services.

Service Function

The platform keeps various activities connected. Public pages help people find products and services. Customer accounts save user details and history. The sales module changes a paid order into approved access, while project tools turn a business request into trackable work. Notifications and reports show updates, but outside messages are not treated as the main system record.

Product Functions

User Functions

Administrative and Staff Roles

Administrators can manage accounts, catalogue items, files, bundles, plans, offers, payments, projects, tasks, policies, settings, security records, and maintenance. Employees work on assigned delivery and support tasks. Agents handle only their assigned transactions. Customers can access only their own account, orders, projects, messages, notifications, and approved downloads.

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 needs a current web browser, internet access, a working MySQL database, required PHP extensions, secure hosting, and valid service details. Returning from a payment page does not prove that payment was successful. The server checks the provider response and saved order status before approval.

External Interface Requirements

The system has four types of screens: public pages, the customer account area, employee or agent pages, and the administrator panel. Forms show useful messages, pages adjust for mobile screens, tables help users find records, uploads are checked on the server, and menus change according to the logged-in role.

System Features

User Authentication and Access Control

Users can register, log in with a password, recover a password, connect a Google account, continue a valid session, and log out. After login, the saved role decides which dashboard and actions are available. Wrong login details, too many attempts, invalid CSRF data, or a session fingerprint problem cause a safe rejection and a security log entry.

B2B Project Requirement Management

The B2B form asks for company details, the current problem, expected result, required features, user roles, estimated number of users, timeline, technology or hosting choice, budget, and extra notes. After submission, allowed staff can discuss the request, prepare a quotation, create tasks, and update its status.

B2B and B2C Commerce Fulfilment

At checkout, the server calculates the cart again, checks any discount or points, and saves a pending payment before opening the selected payment method. File or plan access is given only after payment verification. A late or repeated callback cannot deliver the same purchase twice.

Security, Notifications, and Support

The system uses security checks for requests, login, database work, and files. These checks include CSRF protection, PDO prepared statements, password hashing, session fingerprints, role checks, signed links with expiry, upload checking, request limits, HTTPS, and event logs. These controls follow relevant areas of OWASP ASVS [3]. Email, in-app messages, browser push, and WhatsApp only inform users; they cannot avoid permission checks.

Other Nonfunctional Requirements

Performance, Safety, and Reliability

Common pages should use proper database indexes, pagination, limited results, and cached settings instead of loading complete tables again and again. Private data must be shown only to its owner or an allowed role. If an outside service fails, an action may be delayed, but payment, purchase, project, task, ticket, and audit records must stay correct. A failure must never give access automatically.

Security and Ease of Use

The system should be secure and easy to understand. Important actions use strong checks, while normal users get short forms, clear status messages, responsive tables, a simple checkout process, and an easy way to contact support. Complex admin options stay inside the correct staff area.

CHAPTER 3 USE CASE ANALYSIS

Use cases explain what each user wants to do instead of showing source-code details. The human users are customers, business clients, administrators, employees, and agents. PayFast, Google sign-in, WhatsApp/WhatChimp, email, and the YouTube API are outside actors because their responses affect system tasks.

ADD IMAGE HERE
Figure 3.1 Use Case Model

User Registration and Login

A user can make a local account or connect through Google. The user can then log in, recover a forgotten password, keep a valid session, and log out. After successful checking, the system creates a protected session and opens the dashboard allowed for that role.

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 business client enters the reason for the project, its scope, needed features, users, schedule, technical choices, and budget. Staff can then use the saved request for discussion, quotation, task planning, messages, and progress updates.

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 visitor can view available services, products, source files, plans, examples, and help information. Search and detail pages make comparison easier. A logged-in customer can also save an item in the cart or 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

At checkout, the customer reviews the allowed items and selects a payment method. The server calculates the amount again, checks discounts or points, and saves a pending payment. Access is not given until the provider verifies the payment or staff approves a manual payment.

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

A file appears in the customer area after a verified purchase or proper assignment. Before downloading, the server checks ownership, token validity and age, file status, domain rules, and download limits. It sends the file only when all checks pass.

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

Staff members can view and update only the records allowed for their roles. Their work may include users, catalogue content, projects, quotations, tasks, payments, sales, tickets, conversations, notifications, settings, and audit records.

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

This chapter explains the technical design of the system. It shows how PHP handles browser requests, how MySQL records are connected, where security checks are used, how various modules work together, and how the application is hosted.

Architecture Diagram

The first layer contains the public, customer, staff, and admin screens. The middle layer contains PHP pages and AJAX endpoints. This layer checks input, user permission, and business rules before saving data. MySQL and protected file storage make the data layer. Payment, login, messaging, push notification, and video-checking services remain outside the application.

ADD IMAGE HERE
Figure 4.1 Architecture Diagram

Detailed Runtime and Data Flows

Identity workflow: Registration, login, password recovery, and Google callback requests first pass format, CSRF, and request-limit checks. The login code checks the password or Google identity, starts a fingerprinted session, records the attempt, and opens the dashboard for the user's role. An expired session or fingerprint mismatch returns the user to a safe logged-out state.

Retail purchase workflow: When a customer selects a product or plan, the server calculates the cart again. It checks the discount, points, currency, and payment method. Checkout saves a pending order before PayFast or manual review starts. A verified result runs the delivery process once. It grants the plan or file, updates sales and offer use, removes purchased cart items, and sends customer messages. If the callback comes again, the system uses the existing result instead of delivering twice.

Business-project workflow: The requirement form saves the company, problem, required result, features, users, size, schedule, technical choices, hosting needs, budget, and attachments in one case. Allowed staff can discuss it, create a quotation, assign tasks, change progress, and send updates. This keeps the complete project linked with the first request.

Protected-delivery workflow: Files are not provided from a public storage link. The download page checks the user, file, purchase or assignment, signature, expiry, domain, and request limit before sending anything. It also records the decision. Free files use their own viewing rules, while paid files require confirmed ownership.

Communication workflow: An important action first creates an internal notification or history record. If enabled, the system may also send email, browser push, or WhatsApp/WhatChimp messages. WhatsApp is used for quick replies, invoices, task updates, reminders, after-hours replies, and verified webhook updates. If WhatsApp fails, the main business record remains saved.

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

Graphify showed that most features are separated into modules. However, settings, login, WhatChimp, purchase delivery, and admin navigation are shared by many areas. This shows that the application works as one connected system. It also means that a change in a widely used service should be tested in all related customer and staff tasks.

The graph links do not all have the same level of proof. Calls and references found directly in the source code are treated as confirmed. Links suggested by meaning are treated as possible links until I check the code or test the complete process. The design keeps this point clear.

The report discusses 25 relationships. Important shared points include wcBotSweep(), getAdminSetting(), the WhatChimp API, follow-up and after-hours jobs, WhatsApp helpers, admin navigation, validateFingerprint(), and handleAuthFailure(). A fault in one of these areas can affect various modules, so I test more than the single page where a change is made.

Domain Model

The main domain starts with User and Role. Sales records include Product, SourceFile, Plan, Cart, Wishlist, Payment, Purchase, PromoCode, and Referral. Project records include ProjectRequirement, Quote, Task, and SupportTicket. FileAssignment, Notification, and ActivityLog support access, communication, and record keeping in both areas.

ADD IMAGE HERE
Figure 4.2 Domain Model

Entity Relationship Diagram

Each user account is linked with its projects, quotations, tasks, tickets, payments, access, notifications, referrals, sessions, and audit records. Products and source files can be used in bundles, carts, wishlists, order items, and access records. Plans are linked through subscription or plan-purchase records. Foreign keys keep these links and help the server check ownership.

ADD IMAGE HERE
Figure 4.3 Entity Relationship Diagram

Class Diagram

The logical classes are grouped by their jobs. These jobs include login and sessions, users and roles, catalogue and plans, cart and wishlist, payments, purchase delivery, projects and tasks, support, notifications, outside services, cache, security, and reports. Shared services use clear interfaces, so the same rule does not have to be written again on every page.

ADD IMAGE HERE
Figure 4.4 Class Diagram

Sequence / Collaboration Diagram

A normal process starts when the browser sends a protected request. PHP checks the CSRF token, role, record owner, and form values. It then completes the database action and contacts an outside service only when needed. Notifications are created after the main action is saved. Payment callbacks repeat the security checks and use a process that prevents duplicate delivery.

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 activity starts when a person opens the public pages. The person may log in, choose a product, or submit a business requirement. A purchase goes through item checking, total calculation, and payment verification before access is given. A service request goes to staff review and project tracking. Both paths show the result to the user and save an audit record.

ADD IMAGE HERE
Figure 4.6 Activity Diagram

State Transition Diagrams

The login process starts in the logged-out state. It can move to registration or login checking and then to the correct dashboard after success. A failed check moves to denied. Session expiry or logout ends the active session.

ADD IMAGE HERE
Figure 4.7 State Transition Diagram — Authentication

A project begins as a draft, is submitted, and is then reviewed. Staff can prepare a quotation, receive approval, and start the work. The project may wait for a client reply before completion. Cancelled and archived projects are kept as clear states instead of being silently deleted.

ADD IMAGE HERE
Figure 4.8 State Transition Diagram — Project Requirement

The purchase process moves from an active cart to started checkout and pending payment. A verified payment leads to completed delivery, while a failed payment is declined. A completed order can later be refunded or reversed. Access is created only after verification.

ADD IMAGE HERE
Figure 4.9 State Transition Diagram — Checkout

A download starts with an access request. The system checks ownership, issues and checks a signed token, and then sends the file. Expired, changed, over-limit, or unauthorized requests are denied and recorded without showing the storage location.

ADD IMAGE HERE
Figure 4.10 State Transition Diagram — Secure Download

A support ticket is opened, assigned, and worked on. It may wait for more information from the customer before it is resolved and closed. If the customer replies later, the ticket can be opened again without removing the old discussion.

ADD IMAGE HERE
Figure 4.11 State Transition Diagram — Support

Component Diagram

The design separates the public website, login, customer portal, staff tools, admin panel, catalogue, cart, payments, delivery, projects, support, notifications, integrations, security, cache, and reports. The components connect through business actions and shared services instead of directly using each other's private code.

ADD IMAGE HERE
Figure 4.12 Component Diagram

Deployment Diagram

Users open the system in a browser through HTTPS. An Apache-compatible server runs PHP and connects with MySQL, protected file storage, and configured outside services. Scheduled jobs handle maintenance and follow-up tasks. Database passwords, signing keys, API secrets, and environment settings are kept outside public files.

ADD IMAGE HERE
Figure 4.13 Deployment Diagram

User Interface Screens

The public page first shows the main services and digital products. It also provides plans, source files, examples, common questions, policies, contact details, language selection, login, and cart access. A visitor can look around before creating an account.

ADD IMAGE HERE
Figure 4.14 Public Landing and Catalog Screen

The account screen provides login, registration, password recovery, and Google sign-in in one place. Its error messages give useful guidance without showing private account information.

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

The customer dashboard gives one place to view profile details, active plans, orders, points, business projects, support tickets, notifications, and allowed downloads.

ADD IMAGE HERE
Figure 4.16 Customer Dashboard Screen

A product or service page shows the title, category, details, price, access rules, and related options. According to the item, the customer can add it to the cart or wishlist, buy it, or contact support.

ADD IMAGE HERE
Figure 4.17 Product and Service Details Screen

The cart contains items the customer plans to buy, while the wishlist keeps items for later. The cart shows quantity, currency, discounts or points, subtotal, and the button to continue to checkout.

ADD IMAGE HERE
Figure 4.18 Cart and Wishlist Screen

Checkout shows the order calculated by the server, including currency, discounts, final amount, and available payment methods. After submission, it displays the saved status as pending, successful, or failed instead of assuming payment succeeded.

ADD IMAGE HERE
Figure 4.19 Checkout and Payment Screen

The business requirement form groups fields for client and company details, the current problem, expected result, required features, user roles, project size, schedule, technology, hosting, budget, notes, and attachments.

ADD IMAGE HERE
Figure 4.20 B2B Project Requirements Screen

The administrator dashboard shows summary figures and links for users, catalogue items, plans, assignments, transactions, projects, tasks, traffic, settings, security, and audit records.

ADD IMAGE HERE
Figure 4.21 Administrator Dashboard Screen

Staff can filter payment history by customer, date, method, amount, and status. An allowed reviewer can view the proof and invoice, approve or reject the payment, and check whether delivery has already taken place.

ADD IMAGE HERE
Figure 4.22 Payment History and Fulfilment Screen

The support and communication pages show the project or ticket beside its conversation. Staff can use the task, assignment, reminder, attachment, and status options allowed for their role.

ADD IMAGE HERE
Figure 4.23 Support and WhatsApp Operations Screen

The downloads page uses active purchase and assignment records. A customer only sees files linked with that account and the current access status of each file.

ADD IMAGE HERE
Figure 4.24 Secure Downloads Screen

At download time, the delivery page again checks ownership and the signed token. It also checks expiry, origin, and request frequency. It either sends the protected file or records and shows a safe access-denied result.

ADD IMAGE HERE
Figure 4.25 Secure File Delivery Flow

The reporting pages use payment, download, login, user, traffic, task, project, and admin records. Staff can filter this information for monitoring and later checking.

ADD IMAGE HERE
Figure 4.26 Reports and Activity History Screen

CHAPTER 5 IMPLEMENTATION

During implementation, I used shared helper code for login, permissions, database access, transactions, payments, file downloads, email, notifications, and screen messages. PHP 8+ and PDO apply server-side rules with MySQL. I used HTML, CSS, JavaScript, jQuery, DataTables, Chart.js, Font Awesome, and SweetAlert2 for the web interface. Important decisions remain on the server, and various pages can use the same checked functions.

ADD IMAGE HERE
Figure 5.1 Important Platform Flow

Libraries and Frameworks

Deployment Environment

Tools and Techniques

CHAPTER 6 TESTING AND EVALUATION

Testing checks whether each workflow saves the correct result in normal, invalid, delayed, and simultaneous situations. The plan covers functions, input limits, permissions, calculations, outside-service failure, response time, and data consistency for orders, file access, projects, tasks, tickets, and notifications.

Use Case Testing

Complete tests start from registration or login and continue through product selection, checkout, verified payment, file download, business requirement submission, staff action, support, and logout. I test each process with correct input and at least one failure case. Screenshots, database records, or logs are kept as proof of the result.

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

For boundary testing, I use values just below, equal to, and just above each accepted limit. I also test empty, incorrect, duplicate, expired, and unauthorized values. This method is used for account fields, prices, quantities, discounts, uploads, project details, payments, token expiry, and searches.

Authentication and Identity Inputs

Login and registration tests use various lengths and formats for usernames, email addresses, passwords, and contact details. I also try already registered values and more login attempts than the allowed limit.

Commerce and Project Fields

Sales and project tests use zero, negative, decimal, very large, duplicate, expired, and unavailable values for prices, quantities, discounts, points, dates, file sizes, and required descriptions. Security tests use another user's record, a wrong CSRF token, an expired session, changed download data, unsupported files, long text, and special characters.

Performance Testing

Performance testing measures page display time, server response, database query time, completed requests, CPU and memory use, simultaneous users, failure rate, and recovery after an outside service delay. The values in the next tables are targets, not made-up results. I will fill the result cells after taking repeatable measurements from the deployed Hostinger website.

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 increases searches, dashboard requests, project forms, support tickets, checkouts, and downloads until the hosting reaches a practical limit. I also repeat payment callbacks and notifications, increase audit records, and delay outside services. The aim is to see whether the system slows down safely, recovers properly, and avoids duplicate delivery or another user's data.

Future Improvements

Future work can add company accounts with several users, a complete B2B sales process, recurring payments, more local payment methods, help with quotation preparation, better reports, mobile applications, and improved WhatsApp automation. Automated testing, central monitoring, and deployment reports can also make future changes safer.

REFERENCES

  1. PHP Group. “PHP Manual.” https://www.php.net/manual/en/.
  2. Oracle Corporation. “MySQL 8.0 Reference Manual.” https://dev.mysql.com/doc/refman/8.0/en/.
  3. OWASP Foundation. “Application Security Verification Standard 5.0.” https://owasp.org/www-project-application-security-verification-standard/.
  4. PayFast. “PayFast Developer Documentation.” https://developers.payfast.co.za/api.
  5. Google for Developers. “Using OAuth 2.0 to Access Google APIs.” https://developers.google.com/identity/protocols/oauth2.
  6. DataTables. “DataTables Manual.” https://datatables.net/manual/.
  7. Chart.js. “Chart.js Documentation.” https://www.chartjs.org/docs/latest/.