Skip to content

Market Haven is an e-commerce platform, featuring a range of products, categories, brands, shopping carts, and seamless payment options. Users can purchase products, mark them as favorites, and provide valuable feedback through reviews.

Notifications You must be signed in to change notification settings

yaman-shahbander-dev/market-haven

Repository files navigation

A Laravel e-commerce project with a Domain-Driven Design (DDD) structure.

Requirements

  • PHP ^8.1
  • Composer ^2.2

Installed Packages

General:

Development:

Features

API Response Helper

A simple trait allowing consistent API responses throughout your Laravel application.

Available methods:

Method Status
okResponse() 200
createdResponse() 201
failedResponse() 400
unauthorizedResponse() 401
forbiddenResponse() 403
notFoundResponse() 404
unprocessableResponse() 422
serverErrorResponse() 500

Scribe Api Tags

Additional scribe tags that match the ApiResponseHelper responses.

Available Response tags:

Tag Status
@okResponse 200
@createdResponse 201
@failedResponse 400
@unauthorizedResponse 401
@forbiddenResponse 403
@notFoundResponse 404
@unprocessableResponse 422
@serverErrorResponse 500

Other Available tag:

Tag Description
@usesPagination will add page[number] and page[size] to the query parameters

Global Helper

Simple php file that contains you global functions, which you can find it in ./src/shared/Helpers/global.php.

Migration Structure

In order to group your migration files by their domains, you can create additional migration directories and load them in the AppServiceProvider using loadMigrationsFrom function:

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        $this->loadMigrationsFrom([
            database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'Client',
        ]);
    }
}

Shared Directory

The src/shared/ directory is used for helper, traits, enums .... that are going to be used by the application and the domain.

About

Market Haven is an e-commerce platform, featuring a range of products, categories, brands, shopping carts, and seamless payment options. Users can purchase products, mark them as favorites, and provide valuable feedback through reviews.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages