Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/venturaproject/laravel-nextjs-
Laravel NextJs
https://github.com/venturaproject/laravel-nextjs-
cqrs ddd-architecture laravel nextjs14 react tailwindcss typescript
Last synced: about 2 months ago
JSON representation
Laravel NextJs
- Host: GitHub
- URL: https://github.com/venturaproject/laravel-nextjs-
- Owner: venturaproject
- Created: 2024-10-31T15:43:37.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-11T07:05:21.000Z (about 2 months ago)
- Last Synced: 2024-11-11T08:19:01.152Z (about 2 months ago)
- Topics: cqrs, ddd-architecture, laravel, nextjs14, react, tailwindcss, typescript
- Language: PHP
- Homepage:
- Size: 214 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel NextJs
![Laravel NextJs](https://i.ibb.co/W38tZ0B/laravel-project.png)
## Project Information
This project is designed as a decoupled application, showcasing the separation of concerns between the **Frontend** and **Backend** components.
### Backend
```bash
localhost:8000
```The backend is developed using **Laravel**, following a hexagonal architecture that utilizes bounded contexts. This design allows for better organization and separation of different aspects of the application. The backend implements the **CQRS** (Command Query Responsibility Segregation) pattern, utilizing both command and query buses for efficient management of information. This approach facilitates smooth registration, modification, and access to data within the system.
### Frontend
```bash
localhost:3000
```The frontend operates independently from the backend and is built using **Next.js** with **React**. It leverages **TypeScript** for improved type safety and developer experience. For styling and layout, the project integrates **Tailwind CSS**, allowing for a responsive and modern design without compromising performance. The decoupling of the frontend from the backend enables independent development, deployment, and scaling of both components.
## Installation
To install this project, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/venturaproject/laravel-nextjs.git
cd laravel-nextjs
make run## Architecture
```
├── Products
│ ├── Application
│ │ ├── Commands
│ │ │ ├── Create
│ │ │ │ ├── CreateProduct.php
│ │ │ │ ├── CreateProductDTO.php
│ │ │ │ └── CreateProductHandler.php
│ │ │ ├── Delete
│ │ │ │ ├── DeleteProduct.php
│ │ │ │ └── DeleteProductHandler.php
│ │ │ └── Update
│ │ │ ├── UpdateProduct.php
│ │ │ ├── UpdateProductDTO.php
│ │ │ └── UpdateProductHandler.php
│ │ ├── Queries
│ │ │ ├── GetAll
│ │ │ │ ├── GetAllProducts.php
│ │ │ │ └── GetAllProductsHandler.php
│ │ │ └── GetById
│ │ │ ├── GetProductById.php
│ │ │ └── GetProductByIdHandler.php
│ │ ├── Services
│ │ │ └── PriceCalculator.php
│ │ └── UseCases
│ │ └── ApplyDiscountToProduct.php
│ ├── Domain
│ │ ├── Events
│ │ │ └── ProductCreated.php
│ │ ├── Model
│ │ │ └── Product.php
│ │ └── Repository
│ │ └── ProductRepositoryInterface.php
│ └── Infrastructure
│ ├── Listeners
│ │ └── SendProductCreatedEmailListener.php
│ ├── Repository
│ │ └── ProductRepository.php
│ └── Requests
│ ├── CreateProductRequest.php
│ └── UpdateProductRequest.php
├── Shared
│ ├── Application
│ │ ├── Bus
│ │ │ ├── Command
│ │ │ │ ├── CommandBus.php
│ │ │ │ └── CommandBusInterface.php
│ │ │ └── Query
│ │ │ ├── QueryBus.php
│ │ │ └── QueryBusInterface.php
│ │ ├── Console
│ │ │ └── Commands
│ │ │ ├── ExportProductsCommand.php
│ │ │ ├── ShowInfoCommand.php
│ │ │ └── TestJob.php
│ │ └── Services
│ │ ├── EmailService.php
│ │ └── ExcelExportService.php
│ ├── Domain
│ │ └── Exceptions
│ │ ├── Handler.php
│ │ └── ProductNotFoundException.php
│ ├── Infrastructure
│ │ ├── Http
│ │ │ ├── Controllers
│ │ │ │ ├── Api
│ │ │ │ │ ├── AuthController.php
│ │ │ │ │ ├── ProductController.php
│ │ │ │ │ └── UserController.php
│ │ │ │ └── Controller.php
│ │ │ ├── Kernel.php
│ │ │ ├── Middleware
│ │ │ │ └── Authenticate.php
│ │ │ └── Requests
│ │ └── Providers
│ │ ├── AppServiceProvider.php
│ │ ├── BusServiceProvider.php
│ │ ├── ProductsServiceProvider.php
│ │ └── UsersServiceProvider.php
│ └── Utils
└── Users
├── Application
│ ├── Commands
│ │ ├── Create
│ │ │ ├── CreateUser.php
│ │ │ ├── CreateUserDTO.php
│ │ │ └── CreateUserHandler.php
│ │ ├── Delete
│ │ │ ├── DeleteUser.php
│ │ │ └── DeleteUserHandler.php
│ │ ├── Password
│ │ │ ├── ChangePassword.php
│ │ │ ├── ChangePasswordDTO.php
│ │ │ └── ChangePasswordHandler.php
│ │ └── Update
│ │ ├── UpdateUser.php
│ │ ├── UpdateUserDTO.php
│ │ └── UpdateUserHandler.php
│ ├── Console
│ │ └── CreateUserCommand.php
│ ├── Queries
│ │ ├── GetAll
│ │ │ ├── GetAllUsers.php
│ │ │ └── GetAllUsersHandler.php
│ │ └── GetById
│ │ ├── GetUserById.php
│ │ └── GetUserByIdHandler.php
│ ├── Services
│ └── UseCases
├── Domain
│ ├── Events
│ │ └── PasswordUpdate.php
│ ├── Model
│ │ └── User.php
│ └── Repository
│ └── UserRepositoryInterface.php
└── Infrastructure
├── Listeners
│ └── SendPasswordUpdateEmailListener.php
├── Repository
│ └── UserRepository.php
└── Requests
├── CreateUserRequest.php
├── ChangePasswordRequest.php
└── UpdateUserRequest.php