GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - avosalmon/modular-monolith-laravel: Sample application for Laracon Online 2022.

BranchesTags
Open more actions menu

Latest commit

 

History

115 Commits
115 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
app
app
 
 
bootstrap
bootstrap
 
 
config
config
 
 
database
database
 
 
docker
docker
 
 
public
public
 
 
resources/lang/en
resources/lang/en
 
 
routes
routes
 
 
src
src
 
 
storage
storage
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.env.example
.env.example
 
 
.env.testing
.env.testing
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
artisan
artisan
 
 
composer.json
composer.json
 
 
composer.lock
composer.lock
 
 
deptrac.yaml
deptrac.yaml
 
 
docker-compose.yml
docker-compose.yml
 
 
phpunit.xml
phpunit.xml
 
 
pint.json
pint.json
 
 
server.php
server.php
 
 

Repository files navigation

Modular Monolith Laravel

The sample e-commerce application for Laracon Online Winter 2022.

  • Laracon Video
  • Slides

System requirements

Docker is installed on your machine.

Setup local environment

Copy example env file

cp .env.example .env

Start docker compose

docker compose up -d

Install composer dependencies

docker compose exec app composer install

Generate app key and places inside the .env file

docker compose exec app php artisan key:generate

Run DB migration

docker compose exec app php artisan migrate:fresh --seed

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

To stop Docker containers

docker compose down

Laravel Sail command (optional)

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'

The sail command is an shortcut for docker compose exec app php which runs a given command within the docker container. The docker compose commands in the previous section can be shortened like this.

sail composer install
sail artisan key:generate
sail artisan migrate:fresh --seed

Testing

This repository uses Pest for writing tests. Pest is a testing framework with a simpler syntax like Jest and better reporting. Since it's powered by PHPUnit, it supports all the PHPUnit syntaxes as well.

Running tests

sail test

Filtering tests

sail test --filter OrderControllerTest

Display code coverage

sail test --coverage --min=80

Static code analysis to enforce 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 ./vendor/bin/deptrac

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

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

About

Sample application for Laracon Online 2022.

youtu.be/0Rq-yHAwYjQ?t=4070

Topics

laraconlaravelmodular-monolith

Resources

Readme
Activity

Stars

204 stars

Watchers

4 watching

Forks

41 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.