Skip to content

lphucnguyen/movie-clean-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie project

  1. Framework: Laravel (version 10)
  2. Programming Language: php
  3. Database: MySQL, Neo4J

Technicals:

  1. Apply Command Bus pattern
  2. Building Infrastructure as code in AWS
  3. Building Dockerfile for this repo
  4. Apply Clean Architecture
  5. Apply Payment Gateway
  6. Processing abandoned orders

Clean Architecture:

  1. Domain Layer: At the heart of the system is the Domain Layer. The domain layer consists of the core business entities. All the other layers in the system depend on the Domain layer and are there to support the Domain Layer. Domain Layer itself does not depend on any other Layer.
  2. Application Layer: The Application layer is where all the magic happens. This is where your business logic resides.Based on the business rules and regulations, this layer controls the flow of data to and from your business entities. Generally, this layer consists of all your services, commands, queries, exceptions, logs, etc.
  3. Infrastructure Layer: This is where all your external services and database logic are located. All your external services, like email service, storage solutions, message queues, third-party API calls, etc., are handled by this layer. Besides, it is also a common practice to separate database logic into its own Persistence Layer. This is where your DbContext and migrations, etc., will go.
  4. Presentation Layer: This is the gateway or the entry point to your application. This layer is responsible for presenting data to the end user in an easily understandable manner. You will probably implement this layer as a Web or API project consisting of controllers defining the Action Methods or API endpoints.

Setup Steps:

  1. composer install & composer update
  2. add database info in .env
  3. composer require laravel/passport
  4. php artisan migrate
  5. php artisan passport:install
  6. php artisan storage:link

Libraries & Services Used:

  1. JWPlayer : For video hosting
  2. Laratrust: For roles & permissions
  3. Passport: For API Authentication
  4. Laravel File Manager: Laravel File Manager