eShop E-Commerce System
A secure, asynchronous electronic marketplace framework. This detailed analysis covers the custom relational database engine, singleton query handling pipelines, asynchronous controller processors, security configurations, and dynamic invoicing.
Project Overview
The eShop application addresses the demand for low-latency, online shopping experiences. By implementing unified JavaScript AJAX requests paired with standard server-side processing protocols, the platform achieves a fast, zero-flicker experience without traditional PHP page refreshes.
Key Engineering Highlights
- Centralized SQL Views: Integrates views like `product_view` and `images_view` to abstract complex joins, resulting in highly efficient page queries.
- Secure Verification: Uses PHPMailer SMTP endpoints for dispatching temporary tokens, securing administrative controls and password resets.
- Business Intelligence Metrics: Dynamic metrics calculation (Daily Revenue, Monthly Income) executed straight from aggregate database views.
Asynchronous Request-Response Pipeline
Form Interception
Inputs from login, signup, or checkout are retrieved asynchronously. JavaScript overrides default form submission events.
Asynchronous AJAX Call
Form fields are packed via `FormData` objects and sent over XMLHttpRequests directly to backend script controllers.
Procedural PHP processing
PHP handles variable sanitization, processes queries through a Singleton database connection, and responds with raw success/fail strings.
Dynamic DOM Update
The frontend callback processes the server response to alert users, update lists, or execute modern redirections.
Database Schema & View Architecture
The database follows a normalized relational design where information is distributed across multiple tables such as products, categories, brands, models, colors, images, and users. While this structure minimizes data duplication and improves consistency, retrieving complete product information often requires joining several related tables.
To simplify these operations, the system uses MySQL Views. A view is a virtual table that combines data from multiple tables into a single logical result. Instead of writing complex JOIN statements throughout the application, the backend can query a view just like a normal table. This keeps SQL queries cleaner, improves code maintainability, and ensures consistent business logic across different modules.
In this project, several custom views are created to provide simplified datasets for the application. For example, product_view combines product information with category, brand, and model details, color_view provides product color information, and images_view retrieves all images associated with each product. These views allow the application to access complete business data without repeatedly writing complex SQL joins.
Using views also creates a clear separation between the database layer and the application layer. If the underlying table structure changes in the future, only the view definitions need to be updated, while the application can continue querying the same view without major code modifications. This improves scalability and makes long-term maintenance much easier.
Although MySQL views do not physically store data, they provide an effective abstraction layer that promotes cleaner SQL, code reusability, centralized business logic, and easier database management. Combined with proper indexing on the underlying tables, this architecture enables the application to efficiently retrieve well-structured information while keeping the codebase organized and maintainable.
Application Video Walkthrough
View the complete application workflow, system setup, security layers, and administrator control panels in action:
Tech Stack & Compliance
PHP 8.2
MySQL
AJAX / XML
Bootstrap 5
PHPMailer
html2pdf
Details
- Project Type Academic
- Category Full Stack Web App
- Status Demo & Source Available
- Role Lead Developer
- Duration 3 Weeks