LayerGen - Clean Architecture ScaffolderInstantly generate standardized directory structures and internal documentation based on Clean Architecture and DDD principles. 🚀 OverviewIn professional software engineering, maintaining a consistent project structure is critical for scalability. Clean Architecture Scaffolder is a framework-agnostic VS Code extension that automates the creation of architectural layers and includes automatic internal documentation via README files. Whether you work with Flutter, Node.js, Go, or Java, this tool ensures your codebase remains decoupled, testable, and maintainable. |
| Layer | Responsibility |
|---|---|
| domain/entities | Enterprise Business Rules (Pure data models). |
| domain/repositories | Contract definitions (Interfaces) for repositories. |
| domain/usecases | Application logic and business-specific use cases. |
| infrastructure/repositories | Concrete repository implementations. |
| infrastructure/datasources | Data sources: API calls or local databases. |
| presentation/providers | State management (Bloc, Riverpod, etc.) to connect UI and Logic. |
| presentation/screens | Main views or pages of the application. |
| presentation/widgets | Small, reusable visual components. |
⚙️ Customization (Advanced)
If you prefer a different structure, the extension supports external configuration. Simply create a file named architecture.json in your workspace root.
Example architecture.json (Array format):
{
"layers": ["core", "features/auth/data", "features/auth/domain"]
}
🚀 Quick Start
- Right-click on any folder in the VS Code Explorer.
- Select "LayerGen: Generate Clean Architecture".
- (Optional) Create an
architecture.jsonin your root to customize layers.
⚙️ Customization
To use your own folder structure, create an architecture.json file in your project root:
{
"layers": {
"core/domain": "Business logic and entities.",
"core/data": "Data sources and repositories.",
"features/auth": "Authentication presentation layer."
}
}
