ZenBladi-V2 is a web application, likely an e-commerce or marketplace platform, built primarily with PHP and MySQL. It features distinct user roles for Clients, Sellers, and Administrators, providing a structured environment for managing products, orders, and user accounts.
The repository has been reorganized into a more standard and maintainable structure to improve clarity and development workflow.
The project now follows a clear separation of concerns, dividing the codebase into src (source code) and public (publicly accessible assets).
| Directory | Purpose |
|---|---|
src/backend |
Contains core server-side logic, including database connection (db.php) and order processing (create_order.php). |
src/backend/db |
Holds the database schema file (database.sql). |
src/frontend |
Contains the main PHP files for the user-facing application, including the home page, login, and sign-up pages. |
src/frontend/admin |
PHP files specific to the Administrator dashboard and management panels. |
src/frontend/client |
PHP files for the Client dashboard, including account management and order history. |
src/frontend/seller |
PHP files for the Seller dashboard, including product management and order viewing. |
src/includes |
Reusable PHP components like the header and session configuration. |
public/assets |
All static assets, including CSS, JavaScript, and images, which are directly accessible by the browser. |
public/assets/css |
All CSS files, organized into subdirectories for Admin, Client, and Seller specific styles. |
public/assets/js |
JavaScript files for client-side interactivity. |
public/assets/images |
General images used across the site (e.g., logos, headers). |
public/assets/img_products |
Directory for product images. |
To get a local copy up and running, follow these steps.
- A web server with PHP support (e.g., Apache, Nginx)
- MySQL or MariaDB database server
- PHP extensions (e.g.,
mysqli,session)
-
Clone the repository:
git clone https://github.com/ayoub21dev/ZenBladi-V2.git cd ZenBladi-V2 -
Database Setup:
- Create a new MySQL database (e.g.,
zenbladi_v2). - Import the database schema from the provided file:
mysql -u your_user -p zenbladi_v2 < src/backend/db/database.sql
- Create a new MySQL database (e.g.,
-
Configure Database Connection:
- Open
src/backend/db.phpand update the database connection details ($servername,$username,$password,$dbname) to match your local setup.
- Open
-
Web Server Configuration:
- Point your web server's document root to the
ZenBladi-V2/directory. - Ensure PHP is configured correctly and the necessary extensions are enabled.
- Point your web server's document root to the
-
Access the Application:
- Open your web browser and navigate to the configured URL (e.g.,
http://localhost/ZenBladi-V2/src/frontend/index.php).
- Open your web browser and navigate to the configured URL (e.g.,
The application supports a multi-role structure:
- Client: Sign up, log in, browse products, place orders, view order history, and manage account details.
- Seller: Sign up, log in, add new products, manage existing products, view their orders, and manage their profile.
- Admin: Log in, manage users (Clients and Sellers), manage products, and oversee orders through dedicated panels.