Giter Club home page Giter Club logo

modular-monolith-laravel's Introduction

Modular Monolith Laravel

The sample e-commerce application for Laracon Online Winter 2022. You can also find the slides here.

System requirements

Docker is installed on your machine.

Setup local environment

Copy example env file

cp .env.example .env

Install composer dependencies

docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v $(pwd):/var/www/html \
    -w /var/www/html \
    laravelsail/php81-composer:latest \
    composer install --ignore-platform-reqs

This repository uses Laravel Sail for the local docker environment. You can use the sail command by configuring a bash alias below.

alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'

Start docker containers

sail up -d

Generate app key and places inside the .env file

sail artisan key:generate

Run DB migration

sail artisan migrate:fresh --seed

Now you can access the app via http://localhost.

Running tests

sail composer test

Static code analysis for domain boundaries

Deptrac is a static code analysis tool for PHP that helps you define architectual layers over classes and rules on which layer can access which layer.

You can run deptrac with the command below.

sail exec app deptrac

You can also visualize the dependency graph by exporting the analysis result as an image.

sail exec app deptrac --formatter=graphviz-image --output="./deptrac.png"

modular-monolith-laravel's People

Contributors

avosalmon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.