YaqoobD / david_ecommerce_website

E-commerce has become an integral part of modern life, enabling us to purchase a wide range of goods and services online. As part of the Advance Software Engineering course, I developed a basic e-commerce website. The course has been immensely helpful in enhancing my knowledge and skills in this area, and I hope that my project will benefit others.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

David E-commerce Quality Gate Status68747470733a2f2f7472617669732d63692e636f6d2f6368616e64726176616d7368692f65636f6d6d657263652e7376673f6272616e63683d6d6173746572

About: πŸ’‘

E-commerce website allows people to buy and sell physical goods, services, and digital products over the internet rather than at a brick-and-mortar location. It’s tough to imagine daily life without e-commerce. We order food, clothes, and furniture; we register for classes and other online services; we download books, music, and movies; and so much more. E-commerce has taken root and is here to stay.

In winter semester 21/22 for the cource of Advance Software Engeneering offered and taught by "Prof. Dr. Stefan Edlich". I am developing this simple E-commerce website with the basic functionalities, I have found this cource very informative and I have learned a lot during the developmemt of this project. I hope this project will help many others as it have helped me.

Demo: πŸŽ₯

Home

home

Product Added to Cart

product-add-to-cart

Product Brands

products-brands

Products Categories

products-categories

Product Searched by Keywords

products-search-by-keywords

Register

register

Cart

cart

Database tables

daatabase-tables

Database Diagram

image

Features: πŸš€

  • register (validation added)
  • login & logout
  • search
  • categories
  • cart (add edit delete update) /only login user
  • payment with paypal
  • pagenation
  • sessions
  • payment success fail landing pages

Tools: πŸ”§

  • bootstrap 3.7
  • jquery
  • js
  • fontawesome
  • mysqli

1) Git: πŸ™

Git is a free, open-source version control software. It was created by Linus Torvalds in 2005. This tool is a version control system that was initially developed to work with several developers on the Linux kernel.

1_BtPsoEy04N6uszgwbwYRjQ

GitHub

download

Matthew McCullough, a trainer at GitHub, explains that Git, like other version control systems, manages and stores revisions of projects. Although it’s mostly used for code but Git could be used to manage any other type of file, such as Word documents or Final Cut projects. Think of it as a filing system for every draft of a document. GitHub is a Git repository hosting service, but it adds many of its own features. While Git is a command line tool, GitHub provides a Web-based graphical interface. It also provides access control and several collaboration features, such as a wikis and basic task management tools for every project.

2) UML Diagrams: πŸ“Š

A UML diagram is a diagram based on the UML (Unified Modeling Language) with the purpose of visually representing a system along with its main actors, roles, actions, artifacts or classes, in order to better understand, alter, maintain, or document information about the system. Mainly, UML has been used as a general-purpose modeling language in the field of software engineering, for the purpose of this project I have used 3 Diagrams to illustrate my design.

Sequence Diagram

Sequence Diagram

Customer Usecase Diagram

UseCase Diagram

Class Diagram

Screenshot 2022-03-13 at 09 47 49

3) DDD: πŸ›οΈ

Core Domians

Sales

  • put a product for sale
  • categorize a product
  • update a product
  • change a product price
  • validate an order
  • place an order

Supporting Subdomains

Billing

  • Collect a payment

Shipping

  • Dispatch a delivery

Warehouse

  • stack goods
  • fetch goods for shipping

User Reviews

  • Add a product review

The e-commerce system is a web application using a Portal component implementing the Backends For Frontends (BFF) pattern.

Event Workflow

The communication among domains is implemented via events:

event-workflow

When the customer places an order the following process starts up:

  1. Shipping prepares a new delivery.
  2. Sales creates a new order and publishes the OrderPlaced event.
  3. Shipping accepts the delivery.
  4. Billing collects payment for the order and publishes the PaymentCollected event.
  5. Warehouse fetches goods from the stock and publishes the GoodsFetched event.
  6. Shipping dispatches the delivery and publishes the DeliveryDispatched event.

There is only the basic workflow implemented with a big room for improvement, for example when Shipping doesn't get bot Events within a time period, the delivery process should be cancelled etc..

4) Metrics: πŸ“ˆ

SonarCloud

Sonarcloud Status

SonarCloud is a cloud service offered by SonarSource and based on SonarQube. SonarQube is a widely adopted open source platform to inspect continuously the quality of source code and detect bugs, vulnerabilities and code smells in more than 20 different languages. Screenshot 2022-02-07 at 11 26 21

Codacy

Codacy Automatically identify issues through static code review analysis. Therefore we can be notified on security issues, code coverage, code duplication, and code complexity in every commit and pull request, directly from your current workflow https://app.codacy.com/gh/YaqoobD/david-ecommerce/dashboard

Screenshot 2022-02-07 at 11 22 27

5) Clean code development: 🧹

  • meaning full file names
  • OOP Concept -> see line 2 register.php
  • meaningful variable names (no one letter variable naming)
  • Comments

Screenshot 2022-03-13 at 21 43 55

6) Build Management (Semaphore): 🚦 68747470733a2f2f6368616e64726176616d7368692e73656d6170686f726563692e636f6d2f6261646765732f65636f6d6d657263652f6272616e636865732f6d61737465722e737667

Screenshot 2022-01-30 at 22 02 33

I used semaphore which is very easy and simple to understand. In semaphore build I did

  • (installing dependencies) where all the dependencies related to application are installed.
  • (code analysis) it runs the PHP Copy Paste Detector from online repository.
  • (unit test) runs the unit tests from the phpunit binary in vendor folder.
  • (browser test) Here it runs the browser test by openeing the application in browser and checks the response.
  • (security check) ensioLabs security checker, will scan the project dependencies which are known for vulnerabilities.

7) Unit-Tests: βœ…

The PHP AutoloadBuilder CLI tool is used and phpab is a command line application to automate the process of generating an autoload require file with the option of creating static require lists as well as phar archives.

When using phpab it is necessary to recreate the autoload file every time a new class is created. This usually also happens after pulling from a repo or when switchting branches. Using a git post-checkout hook placed in .git/hooks/post-update this can be automated for most cases.

WhatsApp Image 2022-03-12 at 8 58 58 PM

8) Continuous Delivery: πŸ”„

Continuous Delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, without doing so manually.

GitHub Action

GitHub Action is a continuous integration service used to build and test software projects hosted at GitHub by GitHub.

GitHub Action is configured by adding a file named python-app.yml, which is a YAML format text file, to the .github/workflows directory of the repository.This file specifies the programming language used, the desired building and testing environment (including dependencies which must be installed before the software can be built and tested), and various other parameters.

MicrosoftTeams-image (1)

Screenshot 2022-03-11 at 18 32 57

TeamCity

TeamCity is a general-purpose CI/CD solution that allows the most flexibility for all sorts of workflows and development practices. The Projects Overview lets you quickly check the status of your builds, see what triggered them, download the latest build artifacts, and more.

Screenshot 2022-03-11 at 18 39 19 Screenshot 2022-03-11 at 18 39 55 Screenshot 2022-03-11 at 18 40 24

9) IDE: πŸ’»

PhpStorm is Usd as IDE in this Project it is a PHP IDE. It provides on-the-fly error prevention, autocompletion and code refactoring, zero configuration debugging and an extended HTML, CSS, and JavaScript editor. PhpStorm also provides powerful built-in tools for debugging, testing and profiling your applications.

  • Intelligent coding assistance
  • Smart PHP Code Editor
  • Code Quality Analysis
  • Debugging, Testing and Profiling
  • HTML/CSS/JavaScript Editor
  • JavaScript Editor
  • Development Environment
  • Databases & SQL

download

10) DSL: πŸ–‹οΈ

Small Example of the Domain Specific Language.

Screenshot 2022-02-11 at 13 24 25

11) Functional Programming: βš™οΈ

Functional programming is a paradigm, or style, that values immutability, first-class functions, referential transparency, and pure functions. functions as machines β€” they take an input, or arguments, and then output something, the return value. Throughout this project, good practices for functional programming have been adopted, for this project i have used followings.

  • used only crud operations.
  • to make it work on live server change credentials in db.php
  • custom made, no framework used

About

E-commerce has become an integral part of modern life, enabling us to purchase a wide range of goods and services online. As part of the Advance Software Engineering course, I developed a basic e-commerce website. The course has been immensely helpful in enhancing my knowledge and skills in this area, and I hope that my project will benefit others.


Languages

Language:PHP 76.6%Language:JavaScript 11.9%Language:Hack 10.8%Language:CSS 0.7%