Skip to content

danial-blackhat/e-commerce-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-Commerce System πŸ›’

PHP MySQL Composer License

A modern e-commerce platform built with PHP and MySQL, featuring a responsive design, secure payment processing, and a comprehensive admin dashboard.


Features ✨

  • 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

Technology Stack πŸ’»

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)

Installation Guide πŸ› οΈ

Prerequisites

  • PHP 7.4 or higher
  • MySQL 8.0 or higher
  • Composer
  • Web server (Apache/Nginx)

Step-by-Step Setup

  1. Clone the repository:
    git clone https://github.com/danial-blackhat/e-commerce-system.git
    cd e-commerce-system
  2. Install PHP dependencies:
    composer install
  3. Configure environment variables:
    cp .env.example .env
    Edit the .env file with your database credentials:
    DB_HOST=localhost
    DB_NAME=ecommerce_db
    DB_USER=root
    DB_PASS=your_password
    APP_KEY=your_secret_key
  4. Import database schema:
    mysql -u root -p ecommerce_db < database/schema.sql
  5. 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>
  6. Run the application:
    php -S localhost:8000 -t public
  7. Access the site:

Admin Access πŸ”’

Default admin credentials:

  • Email: admin@example.com
  • Password: Admin@123

Note: Change these credentials immediately after first login.


Project Structure πŸ“‚

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

Configuration βš™οΈ

Payment Gateway Setup

  • 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

Email Configuration

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

Screenshots πŸ“Έ

Customer View Admin Dashboard
tesp1 admin
Shopping Cart Order Management
shopcart ordermanage

Contributing 🀝

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

Code Style Guidelines

  • 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

Security Best Practices πŸ”’

  • 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

License πŸ“„

This project is licensed under the MIT License - see the LICENSE file for details.


Developed by Danial


Roadmap πŸ—ΊοΈ

  • Implement multi-language support
  • Add recommendation engine
  • Develop mobile application
  • Integrate with shipping APIs
  • Create affiliate program system
  • Implement AR product preview

Releases

No releases published

Packages

 
 
 

Contributors