fast-clean-architecture 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fast_clean_architecture/__init__.py +24 -0
- fast_clean_architecture/cli.py +480 -0
- fast_clean_architecture/config.py +506 -0
- fast_clean_architecture/exceptions.py +63 -0
- fast_clean_architecture/generators/__init__.py +11 -0
- fast_clean_architecture/generators/component_generator.py +1039 -0
- fast_clean_architecture/generators/config_updater.py +308 -0
- fast_clean_architecture/generators/package_generator.py +174 -0
- fast_clean_architecture/generators/template_validator.py +546 -0
- fast_clean_architecture/generators/validation_config.py +75 -0
- fast_clean_architecture/generators/validation_metrics.py +193 -0
- fast_clean_architecture/templates/__init__.py +7 -0
- fast_clean_architecture/templates/__init__.py.j2 +26 -0
- fast_clean_architecture/templates/api.py.j2 +65 -0
- fast_clean_architecture/templates/command.py.j2 +26 -0
- fast_clean_architecture/templates/entity.py.j2 +49 -0
- fast_clean_architecture/templates/external.py.j2 +61 -0
- fast_clean_architecture/templates/infrastructure_repository.py.j2 +69 -0
- fast_clean_architecture/templates/model.py.j2 +38 -0
- fast_clean_architecture/templates/query.py.j2 +26 -0
- fast_clean_architecture/templates/repository.py.j2 +57 -0
- fast_clean_architecture/templates/schemas.py.j2 +32 -0
- fast_clean_architecture/templates/service.py.j2 +109 -0
- fast_clean_architecture/templates/value_object.py.j2 +34 -0
- fast_clean_architecture/utils.py +553 -0
- fast_clean_architecture-1.0.0.dist-info/METADATA +541 -0
- fast_clean_architecture-1.0.0.dist-info/RECORD +30 -0
- fast_clean_architecture-1.0.0.dist-info/WHEEL +4 -0
- fast_clean_architecture-1.0.0.dist-info/entry_points.txt +2 -0
- fast_clean_architecture-1.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,541 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: fast-clean-architecture
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: CLI tool for scaffolding clean architecture in FastAPI projects
|
5
|
+
Project-URL: Homepage, https://github.com/alden-technologies/fast-clean-architecture
|
6
|
+
Project-URL: Repository, https://github.com/alden-technologies/fast-clean-architecture
|
7
|
+
Project-URL: Documentation, https://fast-clean-architecture.readthedocs.io
|
8
|
+
Project-URL: Bug Tracker, https://github.com/alden-technologies/fast-clean-architecture/issues
|
9
|
+
Project-URL: Changelog, https://github.com/alden-technologies/fast-clean-architecture/blob/main/CHANGELOG.md
|
10
|
+
Author-email: Adegbenga Agoro <adegbenga@aldentechnologies.com>
|
11
|
+
License: MIT
|
12
|
+
License-File: LICENSE
|
13
|
+
Keywords: clean-architecture,cli,ddd,domain-driven-design,fastapi,scaffold
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
15
|
+
Classifier: Framework :: FastAPI
|
16
|
+
Classifier: Intended Audience :: Developers
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
18
|
+
Classifier: Operating System :: OS Independent
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
25
|
+
Classifier: Topic :: Software Development :: Code Generators
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
27
|
+
Requires-Python: >=3.8
|
28
|
+
Requires-Dist: jinja2<4.0.0,>=3.1.0
|
29
|
+
Requires-Dist: pathlib-mate<2.0.0,>=1.0.0
|
30
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
31
|
+
Requires-Dist: pyyaml<7.0.0,>=6.0
|
32
|
+
Requires-Dist: rich<14.0.0,>=13.0.0
|
33
|
+
Requires-Dist: typer[all]<1.0.0,>=0.9.0
|
34
|
+
Provides-Extra: dev
|
35
|
+
Requires-Dist: bandit<2.0.0,>=1.7.0; extra == 'dev'
|
36
|
+
Requires-Dist: black<24.0.0,>=23.0.0; extra == 'dev'
|
37
|
+
Requires-Dist: isort<6.0.0,>=5.0.0; extra == 'dev'
|
38
|
+
Requires-Dist: mypy<2.0.0,>=1.0.0; extra == 'dev'
|
39
|
+
Requires-Dist: pytest-cov<5.0.0,>=4.0.0; extra == 'dev'
|
40
|
+
Requires-Dist: pytest<8.0.0,>=7.0.0; extra == 'dev'
|
41
|
+
Requires-Dist: safety<3.0.0,>=2.0.0; extra == 'dev'
|
42
|
+
Description-Content-Type: text/markdown
|
43
|
+
|
44
|
+
# Fast Clean Architecture
|
45
|
+
|
46
|
+
[](https://www.python.org/downloads/)
|
47
|
+
[](https://opensource.org/licenses/MIT)
|
48
|
+
[](https://github.com/psf/black)
|
49
|
+
|
50
|
+
A powerful CLI tool for scaffolding clean architecture in FastAPI projects. Generate well-structured, maintainable code following clean architecture principles with domain-driven design patterns.
|
51
|
+
|
52
|
+
## 🚀 Features
|
53
|
+
|
54
|
+
- **Clean Architecture**: Enforces separation of concerns with distinct layers
|
55
|
+
- **Domain-Driven Design**: Supports bounded contexts and domain modeling
|
56
|
+
- **Code Generation**: Automated scaffolding for entities, repositories, services, and more
|
57
|
+
- **Template System**: Customizable Jinja2 templates for code generation
|
58
|
+
- **Type Safety**: Full type hints and Pydantic validation
|
59
|
+
- **Modern Python**: Built for Python 3.8+ with async/await support
|
60
|
+
- **CLI Interface**: Intuitive command-line interface with rich output
|
61
|
+
- **Configuration Management**: YAML-based project configuration with versioning
|
62
|
+
|
63
|
+
## 📦 Installation
|
64
|
+
|
65
|
+
### From PyPI (Recommended)
|
66
|
+
|
67
|
+
#### Using pip
|
68
|
+
```bash
|
69
|
+
pip install fast-clean-architecture
|
70
|
+
```
|
71
|
+
|
72
|
+
#### Using Poetry
|
73
|
+
```bash
|
74
|
+
poetry add fast-clean-architecture
|
75
|
+
```
|
76
|
+
|
77
|
+
### From Source
|
78
|
+
|
79
|
+
#### Using pip
|
80
|
+
```bash
|
81
|
+
git clone https://github.com/alden-technologies/fast-clean-architecture.git
|
82
|
+
cd fast-clean-architecture
|
83
|
+
pip install -e .
|
84
|
+
```
|
85
|
+
|
86
|
+
#### Using Poetry
|
87
|
+
```bash
|
88
|
+
git clone https://github.com/alden-technologies/fast-clean-architecture.git
|
89
|
+
cd fast-clean-architecture
|
90
|
+
poetry install
|
91
|
+
```
|
92
|
+
|
93
|
+
### Development Installation
|
94
|
+
|
95
|
+
#### Using pip
|
96
|
+
```bash
|
97
|
+
git clone https://github.com/alden-technologies/fast-clean-architecture.git
|
98
|
+
cd fast-clean-architecture
|
99
|
+
pip install -e ".[dev]"
|
100
|
+
```
|
101
|
+
|
102
|
+
#### Using Poetry
|
103
|
+
```bash
|
104
|
+
git clone https://github.com/alden-technologies/fast-clean-architecture.git
|
105
|
+
cd fast-clean-architecture
|
106
|
+
poetry install --with dev
|
107
|
+
```
|
108
|
+
|
109
|
+
## 🏗️ Architecture Overview
|
110
|
+
|
111
|
+
Fast Clean Architecture follows the clean architecture pattern with these layers:
|
112
|
+
|
113
|
+
```
|
114
|
+
📁 project_root/
|
115
|
+
├── 📁 systems/
|
116
|
+
│ └── 📁 {system_name}/
|
117
|
+
│ └── 📁 {module_name}/
|
118
|
+
│ ├── 📁 domain/ # Business logic and rules
|
119
|
+
│ │ ├── 📁 entities/ # Domain entities
|
120
|
+
│ │ ├── 📁 repositories/ # Repository interfaces
|
121
|
+
│ │ └── 📁 value_objects/# Value objects
|
122
|
+
│ ├── 📁 application/ # Use cases and services
|
123
|
+
│ │ ├── 📁 services/ # Application services
|
124
|
+
│ │ ├── 📁 commands/ # Command handlers
|
125
|
+
│ │ └── 📁 queries/ # Query handlers
|
126
|
+
│ ├── 📁 infrastructure/ # External concerns
|
127
|
+
│ │ ├── 📁 repositories/ # Repository implementations
|
128
|
+
│ │ ├── 📁 external/ # External service clients
|
129
|
+
│ │ └── 📁 models/ # Database models
|
130
|
+
│ └── 📁 presentation/ # API layer
|
131
|
+
│ ├── 📁 api/ # FastAPI routers
|
132
|
+
│ └── 📁 schemas/ # Pydantic schemas
|
133
|
+
└── 📄 fca-config.yaml # Project configuration
|
134
|
+
```
|
135
|
+
|
136
|
+
## 📋 Prerequisites
|
137
|
+
|
138
|
+
**Important**: This tool is designed to scaffold clean architecture components for FastAPI projects. You should have:
|
139
|
+
|
140
|
+
- **Python 3.8+** installed on your system
|
141
|
+
- **Basic understanding of FastAPI** and web API development
|
142
|
+
- **Familiarity with clean architecture principles** (recommended but not required)
|
143
|
+
- **A new or existing directory** where you want to create your FastAPI project structure
|
144
|
+
|
145
|
+
**Note**: This tool generates the architectural foundation and components for your FastAPI application. You'll need to create the main FastAPI application instance (`main.py`) using the FastAPI CLI and configure dependency injection to wire everything together.
|
146
|
+
|
147
|
+
## 🔄 FastAPI Developer Workflow Integration
|
148
|
+
|
149
|
+
Fast Clean Architecture fits seamlessly into the modern FastAPI development workflow:
|
150
|
+
|
151
|
+
```mermaid
|
152
|
+
graph TD
|
153
|
+
A[Create Default FastAPI Project in your directory of choice] --> B[Install FCA Tool]
|
154
|
+
B --> C[Initialize FCA in Project]
|
155
|
+
C --> D[Generate System Contexts]
|
156
|
+
D --> E[Create Domain Modules]
|
157
|
+
E --> F[Generate Components]
|
158
|
+
F --> G[Wire Dependencies]
|
159
|
+
G --> H[Implement Business Logic]
|
160
|
+
H --> I[Add Tests]
|
161
|
+
I --> J[Deploy Application]
|
162
|
+
```
|
163
|
+
|
164
|
+
### Workflow Steps:
|
165
|
+
|
166
|
+
1. **FastAPI Project Creation**: Create your FastAPI project instance and basic structure using either Poetry or pip
|
167
|
+
2. **FCA Installation & Setup**: Install FCA tool and initialize the clean architecture foundation
|
168
|
+
3. **Component Generation**: Generate entities, repositories, services, and API routers
|
169
|
+
4. **FastAPI Integration**: Update your `main.py` and include generated routers
|
170
|
+
5. **Dependency Injection**: Wire up services and repositories using FastAPI's DI system
|
171
|
+
6. **Business Logic**: Implement your domain-specific logic in the generated components
|
172
|
+
7. **Testing & Deployment**: Add tests and deploy your well-structured application
|
173
|
+
|
174
|
+
## 🚀 Quick Start
|
175
|
+
|
176
|
+
### 1. Create and Initialize Your FastAPI Project using Poetry
|
177
|
+
|
178
|
+
```bash
|
179
|
+
# Instantiate a new Poetry project
|
180
|
+
poetry new --flat my-fastapi-project --name custom_app_folder
|
181
|
+
cd my-fastapi-project
|
182
|
+
|
183
|
+
# Add FastAPI and Uvicorn
|
184
|
+
poetry add fastapi
|
185
|
+
poetry add uvicorn
|
186
|
+
|
187
|
+
# Create a basic main.py file
|
188
|
+
cat > main.py << 'EOF'
|
189
|
+
from fastapi import FastAPI
|
190
|
+
|
191
|
+
app = FastAPI(
|
192
|
+
title="My Clean Architecture API",
|
193
|
+
description="FastAPI application with clean architecture",
|
194
|
+
version="1.0.0"
|
195
|
+
)
|
196
|
+
|
197
|
+
@app.get("/")
|
198
|
+
async def root():
|
199
|
+
return {"message": "Hello World"}
|
200
|
+
EOF
|
201
|
+
|
202
|
+
# Test your FastAPI application
|
203
|
+
uvicorn custom_app_folder.main:app
|
204
|
+
```
|
205
|
+
|
206
|
+
### 2. Install and Initialize FCA
|
207
|
+
|
208
|
+
```bash
|
209
|
+
# Install Fast Clean Architecture tool
|
210
|
+
pip install fast-clean-architecture
|
211
|
+
|
212
|
+
# Interactive initialization
|
213
|
+
fca-scaffold init
|
214
|
+
|
215
|
+
# Or with arguments
|
216
|
+
fca-scaffold init --name "my-project" --description "My FastAPI project"
|
217
|
+
```
|
218
|
+
|
219
|
+
### 3. Create a System Context
|
220
|
+
|
221
|
+
```bash
|
222
|
+
# Create a new bounded context
|
223
|
+
fca-scaffold create-system-context user-management --description "User management system"
|
224
|
+
```
|
225
|
+
|
226
|
+
### 4. Create a Module
|
227
|
+
|
228
|
+
```bash
|
229
|
+
# Create a module within a system
|
230
|
+
fca-scaffold create-module user-management users --description "User domain module"
|
231
|
+
```
|
232
|
+
|
233
|
+
### 5. Generate Components
|
234
|
+
|
235
|
+
```bash
|
236
|
+
# Generate a complete domain entity
|
237
|
+
fca-scaffold create-component user-management users entities user
|
238
|
+
|
239
|
+
# Generate repository interface
|
240
|
+
fca-scaffold create-component user-management users repositories user
|
241
|
+
|
242
|
+
# Generate application service
|
243
|
+
fca-scaffold create-component user-management users services user
|
244
|
+
|
245
|
+
# Generate API router
|
246
|
+
fca-scaffold create-component user-management users api user
|
247
|
+
```
|
248
|
+
|
249
|
+
### 6. Integrate Generated Components
|
250
|
+
|
251
|
+
**Important**: Now enhance your existing `main.py` to include the generated routers and wire everything together.
|
252
|
+
|
253
|
+
Update your `main.py` to include the generated routers:
|
254
|
+
|
255
|
+
```python
|
256
|
+
# main.py (enhanced with generated components)
|
257
|
+
from fastapi import FastAPI
|
258
|
+
from systems.user_management.users.presentation.api.user_router import router as user_router
|
259
|
+
|
260
|
+
app = FastAPI(
|
261
|
+
title="My Clean Architecture API",
|
262
|
+
description="FastAPI application with clean architecture",
|
263
|
+
version="1.0.0"
|
264
|
+
)
|
265
|
+
|
266
|
+
# Include generated routers
|
267
|
+
app.include_router(user_router, prefix="/api/v1", tags=["users"])
|
268
|
+
|
269
|
+
# Add middleware, exception handlers, startup events, etc.
|
270
|
+
|
271
|
+
@app.get("/")
|
272
|
+
async def root():
|
273
|
+
return {"message": "Clean Architecture API is running!"}
|
274
|
+
```
|
275
|
+
|
276
|
+
### 7. Run Your Application
|
277
|
+
|
278
|
+
```bash
|
279
|
+
# Install FastAPI and uvicorn if not already installed
|
280
|
+
pip install fastapi uvicorn
|
281
|
+
|
282
|
+
# Run the application
|
283
|
+
uvicorn main:app --reload
|
284
|
+
|
285
|
+
# Or run directly
|
286
|
+
python main.py
|
287
|
+
```
|
288
|
+
|
289
|
+
Your API will be available at `http://localhost:8000` with automatic documentation at `http://localhost:8000/docs`.
|
290
|
+
|
291
|
+
## 📚 Detailed Usage
|
292
|
+
|
293
|
+
### Component Types
|
294
|
+
|
295
|
+
| Layer | Component | Description |
|
296
|
+
|-------|-----------|-------------|
|
297
|
+
| **Domain** | `entities` | Core business entities with domain logic |
|
298
|
+
| | `repositories` | Repository interfaces (abstract) |
|
299
|
+
| | `value_objects` | Immutable value objects |
|
300
|
+
| **Application** | `services` | Application services and use cases |
|
301
|
+
| | `commands` | Command handlers (CQRS) |
|
302
|
+
| | `queries` | Query handlers (CQRS) |
|
303
|
+
| **Infrastructure** | `repositories` | Repository implementations |
|
304
|
+
| | `external` | External service clients |
|
305
|
+
| | `models` | Database/ORM models |
|
306
|
+
| **Presentation** | `api` | FastAPI routers and endpoints |
|
307
|
+
| | `schemas` | Pydantic request/response schemas |
|
308
|
+
|
309
|
+
### CLI Options
|
310
|
+
|
311
|
+
```bash
|
312
|
+
# Global options
|
313
|
+
fca-scaffold --help
|
314
|
+
fca-scaffold --version
|
315
|
+
fca-scaffold --dry-run # Preview changes without writing files
|
316
|
+
fca-scaffold --force # Overwrite existing files
|
317
|
+
fca-scaffold --verbose # Detailed output
|
318
|
+
|
319
|
+
# Command-specific help
|
320
|
+
fca-scaffold init --help
|
321
|
+
fca-scaffold create-component --help
|
322
|
+
```
|
323
|
+
|
324
|
+
### Configuration File
|
325
|
+
|
326
|
+
The `fca-config.yaml` file tracks your project structure:
|
327
|
+
|
328
|
+
```yaml
|
329
|
+
project:
|
330
|
+
name: my-project
|
331
|
+
description: My FastAPI project
|
332
|
+
version: 0.1.0
|
333
|
+
created_at: 2024-01-15T10:30:00Z
|
334
|
+
updated_at: 2024-01-15T10:30:00Z
|
335
|
+
systems:
|
336
|
+
user-management:
|
337
|
+
description: User management system
|
338
|
+
created_at: 2024-01-15T10:35:00Z
|
339
|
+
updated_at: 2024-01-15T10:35:00Z
|
340
|
+
modules:
|
341
|
+
users:
|
342
|
+
description: User domain module
|
343
|
+
created_at: 2024-01-15T10:40:00Z
|
344
|
+
updated_at: 2024-01-15T10:40:00Z
|
345
|
+
components:
|
346
|
+
domain:
|
347
|
+
entities: ["user"]
|
348
|
+
repositories: ["user"]
|
349
|
+
application:
|
350
|
+
services: ["user"]
|
351
|
+
presentation:
|
352
|
+
api: ["user"]
|
353
|
+
```
|
354
|
+
|
355
|
+
## 🎨 Customization
|
356
|
+
|
357
|
+
### Custom Templates
|
358
|
+
|
359
|
+
You can customize the generated code by modifying templates:
|
360
|
+
|
361
|
+
1. Copy the default templates:
|
362
|
+
```bash
|
363
|
+
cp -r $(python -c "import fast_clean_architecture; print(fast_clean_architecture.__path__[0])")/templates ./custom_templates
|
364
|
+
```
|
365
|
+
|
366
|
+
2. Modify templates in `./custom_templates/`
|
367
|
+
|
368
|
+
3. Use custom templates:
|
369
|
+
```bash
|
370
|
+
fca-scaffold create-component --template-dir ./custom_templates user-management users entities user
|
371
|
+
```
|
372
|
+
|
373
|
+
### Template Variables
|
374
|
+
|
375
|
+
Templates have access to these variables:
|
376
|
+
|
377
|
+
```jinja2
|
378
|
+
{# System context #}
|
379
|
+
{{ system_name }} # snake_case
|
380
|
+
{{ SystemName }} # PascalCase
|
381
|
+
{{ system_name_camel }} # camelCase
|
382
|
+
|
383
|
+
{# Module context #}
|
384
|
+
{{ module_name }} # snake_case
|
385
|
+
{{ ModuleName }} # PascalCase
|
386
|
+
{{ module_name_camel }} # camelCase
|
387
|
+
|
388
|
+
{# Component context #}
|
389
|
+
{{ component_name }} # snake_case
|
390
|
+
{{ ComponentName }} # PascalCase
|
391
|
+
{{ component_name_camel }}# camelCase
|
392
|
+
|
393
|
+
{# Import paths #}
|
394
|
+
{{ entity_import }} # Relative import path
|
395
|
+
{{ repository_import }} # Relative import path
|
396
|
+
{{ service_import }} # Relative import path
|
397
|
+
|
398
|
+
{# Metadata #}
|
399
|
+
{{ generated_at }} # ISO timestamp
|
400
|
+
{{ generator_version }} # Tool version
|
401
|
+
```
|
402
|
+
|
403
|
+
## 🧪 Testing
|
404
|
+
|
405
|
+
```bash
|
406
|
+
# Run all tests
|
407
|
+
pytest
|
408
|
+
|
409
|
+
# Run with coverage
|
410
|
+
pytest --cov=fast_clean_architecture
|
411
|
+
|
412
|
+
# Run specific test file
|
413
|
+
pytest tests/test_cli.py
|
414
|
+
|
415
|
+
# Run with verbose output
|
416
|
+
pytest -v
|
417
|
+
```
|
418
|
+
|
419
|
+
## 🔧 Development
|
420
|
+
|
421
|
+
### Setup Development Environment
|
422
|
+
|
423
|
+
```bash
|
424
|
+
git clone https://github.com/alden-technologies/fast-clean-architecture.git
|
425
|
+
cd fast-clean-architecture
|
426
|
+
python -m venv venv
|
427
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
428
|
+
pip install -e ".[dev]"
|
429
|
+
```
|
430
|
+
|
431
|
+
### Code Quality
|
432
|
+
|
433
|
+
```bash
|
434
|
+
# Format code
|
435
|
+
black fast_clean_architecture tests
|
436
|
+
|
437
|
+
# Sort imports
|
438
|
+
isort fast_clean_architecture tests
|
439
|
+
|
440
|
+
# Type checking
|
441
|
+
mypy fast_clean_architecture
|
442
|
+
|
443
|
+
# Security scanning
|
444
|
+
bandit -r fast_clean_architecture
|
445
|
+
|
446
|
+
# Dependency scanning
|
447
|
+
safety check
|
448
|
+
```
|
449
|
+
|
450
|
+
### Pre-commit Hooks
|
451
|
+
|
452
|
+
```bash
|
453
|
+
pip install pre-commit
|
454
|
+
pre-commit install
|
455
|
+
```
|
456
|
+
|
457
|
+
## 📖 Examples
|
458
|
+
|
459
|
+
### E-commerce System
|
460
|
+
|
461
|
+
```bash
|
462
|
+
# Initialize project
|
463
|
+
fca-scaffold init --name "ecommerce-api"
|
464
|
+
|
465
|
+
# Create systems
|
466
|
+
fca-scaffold create-system-context catalog --description "Product catalog"
|
467
|
+
fca-scaffold create-system-context orders --description "Order management"
|
468
|
+
fca-scaffold create-system-context payments --description "Payment processing"
|
469
|
+
|
470
|
+
# Create modules
|
471
|
+
fca-scaffold create-module catalog products
|
472
|
+
fca-scaffold create-module catalog categories
|
473
|
+
fca-scaffold create-module orders orders
|
474
|
+
fca-scaffold create-module orders cart
|
475
|
+
fca-scaffold create-module payments payments
|
476
|
+
|
477
|
+
# Generate components
|
478
|
+
fca-scaffold create-component catalog products entities product
|
479
|
+
fca-scaffold create-component catalog products repositories product
|
480
|
+
fca-scaffold create-component catalog products services product
|
481
|
+
fca-scaffold create-component catalog products api product
|
482
|
+
```
|
483
|
+
|
484
|
+
### Blog System
|
485
|
+
|
486
|
+
```bash
|
487
|
+
# Initialize
|
488
|
+
fca-scaffold init --name "blog-api"
|
489
|
+
|
490
|
+
# Create system
|
491
|
+
fca-scaffold create-system-context blog
|
492
|
+
|
493
|
+
# Create modules
|
494
|
+
fca-scaffold create-module blog posts
|
495
|
+
fca-scaffold create-module blog authors
|
496
|
+
fca-scaffold create-module blog comments
|
497
|
+
|
498
|
+
# Generate full stack for posts
|
499
|
+
fca-scaffold create-component blog posts entities post
|
500
|
+
fca-scaffold create-component blog posts repositories post
|
501
|
+
fca-scaffold create-component blog posts services post
|
502
|
+
fca-scaffold create-component blog posts api post
|
503
|
+
fca-scaffold create-component blog posts schemas post
|
504
|
+
```
|
505
|
+
|
506
|
+
## 🤝 Contributing
|
507
|
+
|
508
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
509
|
+
|
510
|
+
### Development Workflow
|
511
|
+
|
512
|
+
1. Fork the repository
|
513
|
+
2. Create a feature branch: `git checkout -b feature/amazing-feature`
|
514
|
+
3. Make your changes
|
515
|
+
4. Add tests for your changes
|
516
|
+
5. Run the test suite: `pytest`
|
517
|
+
6. Run code quality checks: `black . && isort . && mypy .`
|
518
|
+
7. Commit your changes: `git commit -m 'Add amazing feature'`
|
519
|
+
8. Push to the branch: `git push origin feature/amazing-feature`
|
520
|
+
9. Open a Pull Request
|
521
|
+
|
522
|
+
## 📄 License
|
523
|
+
|
524
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
525
|
+
|
526
|
+
## 🙏 Acknowledgments
|
527
|
+
|
528
|
+
- Inspired by Uncle Bob's Clean Architecture
|
529
|
+
- Built with [Typer](https://typer.tiangolo.com/) for the CLI
|
530
|
+
- Templates powered by [Jinja2](https://jinja.palletsprojects.com/)
|
531
|
+
- Configuration management with [Pydantic](https://pydantic-docs.helpmanual.io/)
|
532
|
+
|
533
|
+
## 📞 Support
|
534
|
+
|
535
|
+
- 📧 Email: [opensource@aldentechnologies.com](mailto:opensource@aldentechnologies.com)
|
536
|
+
- 🐛 Issues: [GitHub Issues](https://github.com/alden-technologies/fast-clean-architecture/issues)
|
537
|
+
- 💬 Discussions: [GitHub Discussions](https://github.com/alden-technologies/fast-clean-architecture/discussions)
|
538
|
+
|
539
|
+
---
|
540
|
+
|
541
|
+
**Made with ❤️ by [Alden Technologies](https://aldentechnologies.com)**
|
@@ -0,0 +1,30 @@
|
|
1
|
+
fast_clean_architecture/__init__.py,sha256=1B-oli8nUGzjXVe62dN_uAV6fTQlt_wNZmlbzLZs1C8,524
|
2
|
+
fast_clean_architecture/cli.py,sha256=bug84CZx87zlAw7eCRGMs6-wVtFDER9snAvWPv-GxEs,15447
|
3
|
+
fast_clean_architecture/config.py,sha256=W-H4r3sPHbx4CSp8_wC3VylnRRYngzw2OosC2__V0RE,18742
|
4
|
+
fast_clean_architecture/exceptions.py,sha256=cFgIcHGlY7EqIeQvt95_D57AWZxCJja9XVt_MQo4gFE,1667
|
5
|
+
fast_clean_architecture/utils.py,sha256=rrdiYUyj-xQ24nCaK5fspFvHIsjpspJAhxc64jzWgrk,18295
|
6
|
+
fast_clean_architecture/generators/__init__.py,sha256=xgd1_9vo1DZ5DgKZainvK-rqoRVKz8Nvo7X34uDOdIs,280
|
7
|
+
fast_clean_architecture/generators/component_generator.py,sha256=zPBkkTq0gTRPQGeaatCmqTeJt5QLmgN2k3kNZwzXfao,39089
|
8
|
+
fast_clean_architecture/generators/config_updater.py,sha256=5SNeOszx_9urd8_NBM3aDDqw_Pu4cyWW9gLE_IMwo3c,10518
|
9
|
+
fast_clean_architecture/generators/package_generator.py,sha256=pMi-SNMe2mUuwmE7YrJnfJNJrYmMk6jgTp7hJV_bozE,5896
|
10
|
+
fast_clean_architecture/generators/template_validator.py,sha256=xOBRxvCLaR6cE0q3CgVdMjN5pHud8tJEWIOEMh4kRBA,20399
|
11
|
+
fast_clean_architecture/generators/validation_config.py,sha256=OU46Ye2ik9AH51009faWIoe-GPzg-b8A4D2JaoFZSDY,2313
|
12
|
+
fast_clean_architecture/generators/validation_metrics.py,sha256=owUYjqbDIttg4ZLXKvUkjqRQqxsrYe2f009oTrzbXXU,6493
|
13
|
+
fast_clean_architecture/templates/__init__.py,sha256=uweRUmrNZosbwDlnM10Nfu9rKzPcEqXEr6BchsSAr58,146
|
14
|
+
fast_clean_architecture/templates/__init__.py.j2,sha256=ogycgpBmYv-O1yoyQK9-Ki_x4FlYgb58mvhPrhiQNpA,618
|
15
|
+
fast_clean_architecture/templates/api.py.j2,sha256=jPt1i84GuGEyeftJ8IythTrcTzac1GGyd4lQedl7_FA,2362
|
16
|
+
fast_clean_architecture/templates/command.py.j2,sha256=jjmteEF-UqXdlhM487SSUHzeaz2l8vHq6BzOykw0gJM,612
|
17
|
+
fast_clean_architecture/templates/entity.py.j2,sha256=5AIP6LwuusVNHiiAhph0bpFfnVzPhfnBdDMwZi_gx_s,1458
|
18
|
+
fast_clean_architecture/templates/external.py.j2,sha256=SbZ8GEp9Q02bQTI59k0wDE5lDWVJWa7wI6VOBpsoAd4,1844
|
19
|
+
fast_clean_architecture/templates/infrastructure_repository.py.j2,sha256=nxKe7zpSRnpZkqpBrlhOkKLu2vERAiFhrt9iWU3K6aU,2543
|
20
|
+
fast_clean_architecture/templates/model.py.j2,sha256=f3toWIDu5nX5wkHKPbk0-XXow3RLP7D5VknhLPNwSHo,1113
|
21
|
+
fast_clean_architecture/templates/query.py.j2,sha256=7AwqC8BpzGq6L4T-g3Wo8Xj_SPOK0L1ke1RkJ4DQsVU,594
|
22
|
+
fast_clean_architecture/templates/repository.py.j2,sha256=YsjPpVakZR2A-JmsK-VYE6bYDhmeRBfNtID9SdhsGj8,1694
|
23
|
+
fast_clean_architecture/templates/schemas.py.j2,sha256=iwZT42LxqgNL4ms_-uQkWKWQWaiMDflWzdlWMBke_3M,755
|
24
|
+
fast_clean_architecture/templates/service.py.j2,sha256=utNp_E7bywlMfjY9SHzzrH4isr-WeXpnRIb15XkZrj4,3926
|
25
|
+
fast_clean_architecture/templates/value_object.py.j2,sha256=IVI69cuYTa_7g1s9T5guigIqeSl1lXFapWFu-XKzYjE,919
|
26
|
+
fast_clean_architecture-1.0.0.dist-info/METADATA,sha256=UAswG12fAvPtXkdOGttTx-o3Dh10jIUAtdx9jYoHFeg,16765
|
27
|
+
fast_clean_architecture-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
28
|
+
fast_clean_architecture-1.0.0.dist-info/entry_points.txt,sha256=5R_7kBX0dYEq6n8lyTmv7Sn4Rs3pjpLqGX-mB_3FL1w,65
|
29
|
+
fast_clean_architecture-1.0.0.dist-info/licenses/LICENSE,sha256=wpM1B1Znw_YrC9L_R0jiXPHWz5iM_tNW4UOvBtl026s,1075
|
30
|
+
fast_clean_architecture-1.0.0.dist-info/RECORD,,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Alden Technologies
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|