CodeTower is a powerful .NET solution restructuring and architecture scaffolding tool that helps you maintain clean and organized codebases. It provides features for restructuring existing solutions and generating new architectural patterns.
-
Solution Restructuring
- Move and rename namespaces
- Extract classes to new files
- Analyze and validate dependencies
- Automatic backup before changes
- Comprehensive logging
-
Architecture Scaffolding
- Clean Architecture template
- Onion Architecture template (coming soon)
- Vertical Slice Architecture template (coming soon)
-
Safety Features
- Automatic solution backup
- Dependency conflict detection
- Rollback capability
- Detailed logging
dotnet tool install --global CodeTowercodetower restructure --solution YourSolution.sln --config restructure.jsonExample configuration file (restructure.json):
{
"transformations": [
{
"type": "MoveNamespace",
"source": "OldNamespace",
"target": "NewNamespace"
},
{
"type": "ExtractClass",
"source": "LargeClass",
"target": "Infrastructure.Services"
}
]
}codetower generate --solution YourSolution.sln --template cleanarchitectureMoveNamespace: Move classes from one namespace to anotherRenameNamespace: Rename an existing namespaceExtractClass: Move a class to a new file/namespaceGenerateLayer: Create a new architectural layer with predefined structure
- Domain Layer
- Entities
- Value Objects
- Interfaces
- Application Layer
- Use Cases
- Interfaces
- DTOs
- Services
- Infrastructure Layer
- Data
- Services
- Repositories
- External
- Presentation Layer
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Roslyn
- Command-line interface powered by System.CommandLine