A modern e-commerce platform built with PHP and MySQL, featuring a responsive design, secure payment processing, and a comprehensive admin dashboard.
- User Authentication β Secure registration/login system
- Product Management β Full CRUD operations for products
- Shopping Cart β Persistent cart with session management
- Order Processing β Complete order lifecycle management
- Payment Integration β Stripe/PayPal payment gateway
- Admin Dashboard β Sales analytics and inventory management
- Responsive Design β Mobile-friendly interface
- Search & Filtering β Advanced product search capabilities
- User Reviews β Product rating and review system
Backend:
- PHP 7.4+
- MySQL 8.0+
- Composer (Dependency Management)
Frontend:
- HTML5
- CSS3 (Flexbox/Grid)
- JavaScript (ES6)
- Bootstrap 5
Tools:
- phpMyAdmin (Database Management)
- Stripe/PayPal API (Payment Processing)
- Git (Version Control)
- Markdown (Documentation)
- PHP 7.4 or higher
- MySQL 8.0 or higher
- Composer
- Web server (Apache/Nginx)
- Clone the repository:
git clone https://github.com/danial-blackhat/e-commerce-system.git cd e-commerce-system - Install PHP dependencies:
composer install
- Configure environment variables:
Edit the
cp .env.example .env
.envfile with your database credentials:DB_HOST=localhost DB_NAME=ecommerce_db DB_USER=root DB_PASS=your_password APP_KEY=your_secret_key
- Import database schema:
mysql -u root -p ecommerce_db < database/schema.sql - Set up virtual host (Apache example):
<VirtualHost *:80> ServerName ecommerce.local DocumentRoot "/path/to/e-commerce-system/public" <Directory "/path/to/e-commerce-system/public"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
- Run the application:
php -S localhost:8000 -t public
- Access the site:
Default admin credentials:
- Email:
admin@example.com - Password:
Admin@123
Note: Change these credentials immediately after first login.
e-commerce-system/
βββ app/ # Application core
β βββ Controllers/ # MVC controllers
β βββ Models/ # Database models
β βββ Views/ # Presentation layer
β βββ Core/ # Framework components
β
βββ config/ # Configuration files
βββ database/ # Database scripts
β βββ schema.sql # Database schema
β βββ seeds.sql # Sample data
β
βββ public/ # Web root
β βββ assets/ # CSS, JS, images
β βββ index.php # Entry point
β
βββ vendor/ # Composer dependencies
βββ .env.example # Environment template
βββ composer.json # PHP dependencies
βββ README.md # Project documentation
- Create accounts at Stripe or PayPal
- Add API credentials to
.env:STRIPE_KEY=pk_test_your_stripe_key STRIPE_SECRET=sk_test_your_stripe_secret PAYPAL_CLIENT_ID=your_paypal_client_id PAYPAL_SECRET=your_paypal_secret
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_mail_username
MAIL_PASSWORD=your_mail_password
MAIL_FROM=no-reply@ecommerce.test| Customer View | Admin Dashboard |
|---|---|
![]() |
![]() |
| Shopping Cart | Order Management |
![]() |
![]() |
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -m 'feat: add new feature' - Push to the branch:
git push origin feature/your-feature
- Open a pull request
- Follow PSR-12 coding standards
- Use meaningful variable and function names
- Comment complex logic sections
- Keep methods under 25 lines when possible
- Write unit tests for new features
- Always use prepared statements for database queries
- Validate and sanitize all user inputs
- Implement CSRF protection for forms
- Use password hashing with bcrypt
- Set proper file permissions (755 for directories, 644 for files)
- Regularly update dependencies
- Implement HTTPS in production
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: mrdanial2791@outlook.my
- π± GitHub: danial-blackhat
- Implement multi-language support
- Add recommendation engine
- Develop mobile application
- Integrate with shipping APIs
- Create affiliate program system
- Implement AR product preview



