Build Status Total Downloads Latest Stable Version License

Who's Valkyrie

So you stop asking about who's Valkyrie or why. Valkyrie is character in one of my favirot show, The Last Ship.

About The Project

This project was created inorder to provide an illustration of how modular architecture can be implemnted in Laravel. Modular architecture provides an approach to manage the complexity of large scale projects by breaking problems down into small components while maintaining low coupling between the different modules of the projct.

Generally every project is compaination of set of different features or components that communicate and interact with each other to provide a solution for a business problem. Following the modular architecture, a number of these tightly coupled feature can be grouped together to form one module. This module can then be shared and reused with other projects inorder to reduce the time spent to deliver project to client or market.





Inspiration

This project was mainly inspired by the approach Laravel has when developing composer packages that can be installed and easily integrated by any developer without having to write the code yourself (reinventing the wheel).

Why the change

Laravel comes with a pretty neat structure that is suited for almost every small to medium project. However after completing a number of considerably large and complex projects such as Zcova and e-MCQ. The were serveral issues that made these projects very hard to maintain and very risky to introduce new features complex features without introducing bugs to the already built features.

This project aims to prevent these issues from happing again in future projects.

Learning Resources

  • Meduim Article On Modular Architecture

  • Laravel Modules Package

    Laravel Modules Package provides the tooling necessery to get setup and create new modules easily with having to create the new files by yourself.

  • Bagisto Source Code

    Bagisto is an open source Ecommerce Application that has a real life example of how modular architecture can be implemented in complex projects. This github package can show you how features can be broken down into smaller modules and how they can interact with each other.

Getting Started

  1. Clone the repository and cd to the project folder.
git clone git@github.com:thetechyhub/valkyrie.git && cd valkyrie
  1. Run composer install
composer install
  1. Update the modules composer

This command will update all modules composer packages.

php artisan modules:update
  1. Run migration and seed commands
php artisan migrate

php artisan module:migrate

php artisan db:seed

php artisan module:seed
  1. cd to the Admin module and then install and compile the npm packages
cd Modules/Admin

npm install && npm run dev
  1. Setup your domain

This may vary for windows and macs so just setup your localhost domain with Valet or XAMMP. Take a note that the Admin module is set to be served over sub-domain for example admin.valkyrie.ts

Issues Reporting

If you discover any issues within Valkyrie, Please open an issue highliting the problem.