Skip to content

Commit 2061cba

Browse files
Beautify README
1 parent dd1a2cd commit 2061cba

File tree

1 file changed

+89
-72
lines changed

1 file changed

+89
-72
lines changed

README.md

Lines changed: 89 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,84 @@
1-
# Laravel Clean Architecture Package
1+
# 🏗️ Laravel Clean Architecture Package
22

3-
A Laravel package to easily implement Clean Architecture in your projects.
3+
A Laravel package to easily implement Clean Architecture in your projects. 🚀
44

5-
## Requirements
5+
[![🧪 Tests](https://github.com/plin-code/laravel-clean-architecture/workflows/Tests/badge.svg)](https://github.com/plin-code/laravel-clean-architecture/actions)
6+
[![🎨 Code Style](https://github.com/plin-code/laravel-clean-architecture/workflows/Code%20Style/badge.svg)](https://github.com/plin-code/laravel-clean-architecture/actions)
7+
[![🔍 Static Analysis](https://github.com/plin-code/laravel-clean-architecture/workflows/Static%20Analysis/badge.svg)](https://github.com/plin-code/laravel-clean-architecture/actions)
8+
[![📦 Latest Stable Version](https://poser.pugx.org/plin-code/laravel-clean-architecture/v/stable)](https://packagist.org/packages/plin-code/laravel-clean-architecture)
9+
[![📄 License](https://poser.pugx.org/plin-code/laravel-clean-architecture/license)](https://packagist.org/packages/plin-code/laravel-clean-architecture)
610

7-
- PHP 8.3+
8-
- Laravel 11.x or 12.x
11+
## ✨ Features
912

10-
## Installation
13+
- 🎯 **Domain-Driven Design** - Organize your code with DDD principles
14+
-**Quick Setup** - Get started with Clean Architecture in minutes
15+
- 🧩 **Auto-Generation** - Generate complete domains with one command
16+
- 🏛️ **Layer Separation** - Clear separation between Domain, Application, and Infrastructure
17+
- 🔧 **Customizable** - Flexible configuration to fit your project needs
18+
- 🧪 **Test-Ready** - Pre-built test templates for immediate testing
19+
- 📚 **Well-Documented** - Comprehensive documentation and examples
20+
- 🎨 **Modern PHP** - Built for PHP 8.3+ with latest Laravel features
21+
22+
## 📋 Requirements
23+
24+
- 🐘 PHP 8.3+
25+
- ⚡ Laravel 11.x or 12.x
26+
27+
## 📦 Installation
1128

1229
```bash
1330
composer require plin-code/laravel-clean-architecture
1431
```
1532

16-
## Configuration
33+
## ⚙️ Configuration
1734

1835
Publish the configuration files and stubs:
1936

2037
```bash
2138
php artisan vendor:publish --provider="PlinCode\LaravelCleanArchitecture\CleanArchitectureServiceProvider"
2239
```
2340

24-
## Usage
41+
## 🎯 Usage
2542

26-
### Installing Clean Architecture structure
43+
### 🏗️ Installing Clean Architecture structure
2744

2845
```bash
2946
php artisan clean-arch:install
3047
```
3148

3249
This command will create:
33-
- Folder structure for Domain, Application and Infrastructure layers
34-
- Base classes (BaseModel, BaseAction, BaseService, etc.)
35-
- Configuration file
36-
- Documentation
50+
- 📁 Folder structure for Domain, Application and Infrastructure layers
51+
- 🧩 Base classes (BaseModel, BaseAction, BaseService, etc.)
52+
- ⚙️ Configuration file
53+
- 📖 Documentation
3754

38-
### Creating a new domain
55+
### 🆕 Creating a new domain
3956

4057
```bash
4158
php artisan clean-arch:make-domain User
4259
```
4360

4461
This command will generate:
45-
- Domain model with events
46-
- Status enums
47-
- Domain events (Created, Updated, Deleted)
48-
- Actions (Create, Update, Delete, GetById)
49-
- Service
50-
- API Controller
51-
- Form Requests (Create, Update)
52-
- API Resource
53-
- Feature tests
54-
55-
### Available commands
56-
57-
- `clean-arch:install` - Install Clean Architecture structure
58-
- `clean-arch:make-domain {name}` - Create a complete new domain
59-
- `clean-arch:make-action {name} {domain}` - Create a new action
60-
- `clean-arch:make-service {name}` - Create a new service
61-
- `clean-arch:make-controller {name}` - Create a new controller
62-
- `clean-arch:generate-package {name} {vendor}` - Generate a new package
63-
64-
### Generated structure
62+
- 🏛️ Domain model with events
63+
- 📊 Status enums
64+
- 🔔 Domain events (Created, Updated, Deleted)
65+
- Actions (Create, Update, Delete, GetById)
66+
- 🔧 Service
67+
- 🌐 API Controller
68+
- 📝 Form Requests (Create, Update)
69+
- 📤 API Resource
70+
- 🧪 Feature tests
71+
72+
### 🛠️ Available commands
73+
74+
- `clean-arch:install` - 🏗️ Install Clean Architecture structure
75+
- `clean-arch:make-domain {name}` - 🆕 Create a complete new domain
76+
- `clean-arch:make-action {name} {domain}` - Create a new action
77+
- `clean-arch:make-service {name}` - 🔧 Create a new service
78+
- `clean-arch:make-controller {name}` - 🌐 Create a new controller
79+
- `clean-arch:generate-package {name} {vendor}` - 📦 Generate a new package
80+
81+
### 📂 Generated structure
6582

6683
```
6784
app/
@@ -94,29 +111,29 @@ app/
94111
└── UserResource.php
95112
```
96113

97-
## Clean Architecture Principles
114+
## 🏛️ Clean Architecture Principles
98115

99116
This package implements Clean Architecture principles:
100117

101-
1. **Domain Layer**: Contains business logic and entities
102-
2. **Application Layer**: Contains use cases and application logic
103-
3. **Infrastructure Layer**: Contains implementation details (controllers, database, etc.)
118+
1. **🎯 Domain Layer**: Contains business logic and entities
119+
2. **Application Layer**: Contains use cases and application logic
120+
3. **🏗️ Infrastructure Layer**: Contains implementation details (controllers, database, etc.)
104121

105-
### Dependencies
122+
### 🔗 Dependencies
106123

107-
- Domain Layer: Does not depend on any other layer
108-
- Application Layer: Depends only on Domain Layer
109-
- Infrastructure Layer: Depends on Application and Domain Layers
124+
- **🎯 Domain Layer**: Does not depend on any other layer
125+
- **Application Layer**: Depends only on Domain Layer
126+
- **🏗️ Infrastructure Layer**: Depends on Application and Domain Layers
110127

111-
## Examples
128+
## 💡 Examples
112129

113-
### Creating a Product domain
130+
### 🛍️ Creating a Product domain
114131

115132
```bash
116133
php artisan clean-arch:make-domain Product
117134
```
118135

119-
### Using in controller
136+
### 🎮 Using in controller
120137

121138
```php
122139
class ProductsController extends Controller
@@ -138,60 +155,60 @@ class ProductsController extends Controller
138155
}
139156
```
140157

141-
## Configuration
158+
## ⚙️ Configuration
142159

143160
The configuration file `config/clean-architecture.php` allows you to customize:
144161

145-
- Default namespace
146-
- Directory paths
147-
- Validation options
148-
- Logging settings
162+
- 🏷️ Default namespace
163+
- 📁 Directory paths
164+
- Validation options
165+
- 📊 Logging settings
149166

150-
## Development
167+
## 🛠️ Development
151168

152169
This package uses several tools to maintain code quality:
153170

154-
### Code Quality Tools
171+
### 🔧 Code Quality Tools
155172

156-
- **Laravel Pint** - Code formatting and style fixing
157-
- **PHPStan** - Static analysis for finding bugs
158-
- **PEST** - Modern testing framework built on PHPUnit
159-
- **Orchestra Testbench** - Laravel package testing
173+
- **🎨 Laravel Pint** - Code formatting and style fixing
174+
- **🔍 PHPStan** - Static analysis for finding bugs
175+
- **🧪 PEST** - Modern testing framework built on PHPUnit
176+
- **🎭 Orchestra Testbench** - Laravel package testing
160177

161-
### Available Scripts
178+
### 📜 Available Scripts
162179

163180
```bash
164-
# Run tests
181+
# 🧪 Run tests
165182
composer test
166183

167-
# Run tests with coverage
184+
# 📊 Run tests with coverage
168185
composer test-coverage
169186

170-
# Fix code style
187+
# 🎨 Fix code style
171188
composer format
172189

173-
# Check code style without fixing
190+
# 👀 Check code style without fixing
174191
composer format-test
175192

176-
# Run static analysis
193+
# 🔍 Run static analysis
177194
composer analyse
178195

179-
# Run all quality checks
196+
# Run all quality checks
180197
composer quality
181198
```
182199

183-
### Development Setup
200+
### 🚀 Development Setup
184201

185-
1. Clone the repository
186-
2. Install dependencies: `composer install`
187-
3. Run quality checks: `composer quality`
202+
1. 📥 Clone the repository
203+
2. 📦 Install dependencies: `composer install`
204+
3. Run quality checks: `composer quality`
188205

189-
## Contributing
206+
## 🤝 Contributing
190207

191-
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
208+
Pull requests are welcome! 🎉 For major changes, please open an issue first to discuss what you would like to change.
192209

193-
Please make sure to update tests as appropriate and follow our [Contributing Guidelines](CONTRIBUTING.md).
210+
Please make sure to update tests as appropriate and follow our [Contributing Guidelines](CONTRIBUTING.md). 📝
194211

195-
## License
212+
## 📄 License
196213

197-
[MIT](https://choosealicense.com/licenses/mit/)
214+
[MIT](https://choosealicense.com/licenses/mit/) 📜

0 commit comments

Comments
 (0)