How solimanshady/qatan works
Project type and purpose
• This is a monolithic PHP-based single-vendor e-commerce web application (“qatan”) built on a custom MVC framework.
• It provides storefront functionality, admin dashboard, payment integration, email/SMS notifications and basic file uploads.
File structure
• application/
• controller.php (front controller), model.php, view.php (core MVC dispatcher)
• controllers/ (account, admin, ajax, api, error, home)
• models/ and views/ (templates for admin, AJAX, public pages)
• config/ (database, pagination, SMS, SMTP, Stripe, upload)
• includes/ (global config, constants, functions, settings)
• index.php (entry point) and .htaccess / web.config (URL rewrite)
• css/, js/, images/, sound/, fonts (static assets served by the web server)
• uploads/ (user- and product-uploaded files)
• libraries/ (PHPMailer, messagebird SMS, payment libraries, geoplugin)
• db/ (MySQL dump)
• sessions/ (custom session handler)
Key insights from README
• Custom MVC framework
• Uses minimal dependencies
• Requires database setup, base URL configuration
Main components and their interactions
a. Client Browser
• Loads HTML/CSS/JS assets, interacts via HTTP/HTTPS
b. Web Server (Apache/IIS)
• Serves static assets (css, js, images)
• Forwards dynamic requests to index.php/front controller
c. MVC Application Layer
• index.php → core.php dispatches to application/controller.php
• Controller selects Model for data, calls application/models
• Model interacts with MySQL DB via config/database.php
• Controller calls View to render HTML using application/views
d. Database (MySQL)
• Stores products, orders, customers, settings
e. File Storage
• uploads/ for product and user files
• logs, session files in sessions/
f. External Services
• SMTP (PHPMailer via libraries/mail/phpmailer) for email
• SMS gateway (MessageBird via libraries/sms/messagebird)
• Payment gateway (Stripe via config/stripe.php and libraries/payments)
• Geolocation API (geoplugin in libraries/geoplugin)
Architectural patterns & design principles
• Custom MVC (separation of concerns: controllers, models, views)
• Front controller pattern (index.php central dispatcher)
• Configuration-driven (all credentials/settings in config/ and includes/)
• Modular libraries folder for third-party and custom integrations