nusretzinkli/ProjectGen-CLI
A powerful CLI tool designed to scaffold .NET solutions with various architectures (N-Tier, Onion, Vertical Slice) and best practices automatically.
🚀 ProjectGen CLI - Professional .NET Scaffolding Tool
🌐 English
ProjectGen CLI is a high-performance command-line tool designed to accelerate the development of .NET applications by scaffolding professional project structures in seconds.
Vision: This project is not just a generator; it's a backend engineering tool that enforces Best Practices, SOLID Principles, and Standardized Architectures across different project types.
📸 Project Overview
📊 Capabilities at a Glance
| Feature | Support Count | Details |
|---|---|---|
| Architectures | 4 Patterns |
Clean, N-Tier, Vertical Slice, Layered |
| Databases | 3 Providers |
MSSQL, PostgreSQL, SQLite |
| SDK Versions | 2 Versions |
.NET 8.0 & .NET 9.0 |
| Automation | 100% |
Docker, Git, NuGet, Project References |
⚡ Efficiency Note: ProjectGen CLI generates approximately 15+ files and 500+ lines of infrastructure code in less than 3 seconds, saving you at least 30 minutes of manual setup on every project.
🏗️ Supported Architectures
ProjectGen supports four major architectural patterns used in modern software development:
🧱 Clean Architecture
An onion-based structure consisting of Domain, Application, Infrastructure, and Persistence layers. It focuses on framework independence and high testability.
🏢 N-Tier Architecture
Traditional separation of concerns with Core, DataAccess, Business, and API layers. Ideal for enterprise-level projects.
🔪 Vertical Slice Architecture
Organizes code around features (slices) rather than technical layers. Reduces coupling and improves maintainability for fast-growing systems.
📦 Layered Architecture
A compact version of layered architecture within a single Web API project. Perfect for microservices and small-to-medium prototypes.
🚀 Technical Features and Solutions
⚡ 1. Smart SDK Detection
Automatically detects if your system has .NET 8 or .NET 9 installed.
How it works:
- Automatic Scanning: Scans all installed .NET SDK versions on your system.
- Preference Query: If both SDKs are present, prompts the user to choose.
- Auto Configuration: Configures project files according to the selected SDK.
🌍 2. Multi-Language CLI Support
Full support for English and Turkish command-line experiences.
- ✅ Dynamic language detection and selection menu
- ✅ All prompts and messages available in both languages
💾 3. Database Integration
Ready-to-use configuration and automatic NuGet package installation for MSSQL, PostgreSQL, and SQLite.
Features:
- Automatic connection string configuration
- DbContext and Migration structure setup
- Provider-specific package management
🐳 4. DevOps-Ready Infrastructure
One-click Docker and Git integration.
Provided Files:
Dockerfile- Ready-to-use containerization structuredocker-compose.yml- Multi-service management.gitignore- .NET-specific ignore rules- Automatic Git repository initialization
🛠️ 5. Generic Repository & Service Pattern
Automatically generates base repository and service structures to save development time.
🛠 Installation & Usage
To use ProjectGen as a global tool on your computer:
-
Clone and pack the project:
git clone https://github.com/nusretzinkli/ProjectGen-CLI.git cd ProjectGen-CLI dotnet pack -c Release -
Install as a Global Tool:
dotnet tool install --global --add-source ./nupkg ProjectGen-CLI
-
Run anywhere:
projectgen
-
Follow the CLI prompts and create your project! 🎉
🎯 Usage Scenarios
ProjectGen is optimized for different project needs:
| Scenario | Recommended Architecture | Why? |
|---|---|---|
| Enterprise Applications | N-Tier Architecture | Layer separation and standardization |
| Microservices | Layered Architecture | Lightweight and independent structure |
| Testable Systems | Clean Architecture | Framework independence |
| Fast-Changing Projects | Vertical Slice | Feature-based organization |
📋 System Requirements
- .NET SDK: 8.0 or 9.0
- Operating System: Windows, macOS, Linux
- Docker (Optional): For container support
- Git (Optional): For version control
📞 Contact & Links
📝 License
This project is released under the MIT license.
🤝 Contributing
If you'd like to contribute to the project:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: Add amazing feature') - Push your branch (
git push origin feature/amazing-feature) - Create a Pull Request
⭐ Don't forget to star the project if you like it!
🇹🇷 Türkçe
ProjectGen CLI, profesyonel .NET proje yapılarını saniyeler içinde oluşturarak geliştirme sürecini hızlandıran güçlü bir komut satırı aracıdır.
Vizyon: Bu proje sadece bir jeneratör değildir; farklı proje türlerinde En İyi Uygulamaları (Best Practices), SOLID Prensiplerini ve Standartlaştırılmış Mimarileri uygulayan bir Backend mühendislik aracıdır.
📸 Proje Genel Görünümü
📊 Yetenekler Bir Bakışta
| Özellik | Destek Sayısı | Detaylar |
|---|---|---|
| Mimariler | 4 Desen |
Clean, N-Tier, Vertical Slice, Layered |
| Veritabanları | 3 Sağlayıcı |
MSSQL, PostgreSQL, SQLite |
| SDK Versiyonları | 2 Versiyon |
.NET 8.0 & .NET 9.0 |
| Otomasyon | 100% |
Docker, Git, NuGet, Proje Referansları |
⚡ Verimlilik Notu: ProjectGen CLI, 3 saniyeden kısa sürede yaklaşık 15+ dosya ve 500+ satır altyapı kodu oluşturarak, her projede en az 30 dakikalık manuel kurulum zahmetinden sizi kurtarır.
🏗️ Desteklenen Mimariler
ProjectGen, modern yazılım geliştirmede kullanılan dört ana mimari deseni destekler:
🧱 Clean Architecture
Domain, Application, Infrastructure ve Persistence katmanlarından oluşan soğan (onion) tabanlı yapı. Framework bağımsızlığına ve yüksek test edilebilirliğe odaklanır.
🏢 N-Tier Architecture
Core, DataAccess, Business ve API katmanlarının geleneksel ayrımı. Kurumsal ölçekteki projeler için idealdir.
🔪 Vertical Slice Architecture
Kodu teknik katmanlara göre değil, özelliklere (slice) göre organize eder. Hızla büyüyen sistemlerde bağımlılığı azaltır ve bakım kolaylığı sağlar.
📦 Layered Architecture
Katmanlı mimarinin tek bir Web API projesi içindeki kompakt halidir. Mikroservisler ve küçük/orta ölçekli prototipler için mükemmeldir.
🚀 Teknik Özellikler ve Çözümler
⚡ 1. Akıllı SDK Algılama
Sisteminizde .NET 8 mi yoksa .NET 9 mu yüklü olduğunu otomatik tespit eder.
Çalışma Yöntemi:
- Otomatik Tarama: Sistemdeki tüm .NET SDK versiyonlarını tarar.
- Tercih Sorgulama: Her iki SDK de varsa kullanıcıya seçim sunar.
- Otomatik Konfigürasyon: Seçilen SDK'ya göre proje dosyalarını yapılandırır.
🌍 2. Çoklu Dil Desteği (Multi-Language CLI)
Projenin CLI deneyimi tamamen İngilizce ve Türkçe olarak kullanılabilir.
- ✅ Dinamik dil algılama ve seçim menüsü
- ✅ Tüm prompt ve mesajlar her iki dilde desteklenir
💾 3. Veritabanı Entegrasyonu
MSSQL, PostgreSQL ve SQLite için hazır konfigürasyon ve otomatik NuGet paket yüklemesi sağlar.
Özellikler:
- Otomatik connection string yapılandırması
- DbContext ve Migration yapısı kurulumu
- Provider-specific paket yönetimi
🐳 4. DevOps Hazır Altyapı
Tek komutla Docker ve Git entegrasyonu sunar.
Sağlanan Dosyalar:
Dockerfile- Containerization için hazır yapıdocker-compose.yml- Çoklu servis yönetimi.gitignore- .NET projelerine özel ignore kuralları- Git repository otomatik başlatma
🛠️ 5. Generic Repository & Service Pattern
Geliştirme süresinden tasarruf sağlamak için temel repository ve servis yapılarını otomatik oluşturur.
🛠 Kurulum ve Çalıştırma
ProjectGen'i kendi bilgisayarınızda global araç olarak kullanmak için:
-
Projeyi klonlayın ve paketleyin:
git clone https://github.com/nusretzinkli/ProjectGen-CLI.git cd ProjectGen-CLI dotnet pack -c Release -
Global Araç olarak kurun:
dotnet tool install --global --add-source ./nupkg ProjectGen-CLI
-
İstediğiniz klasörde çalıştırın:
projectgen
-
CLI yönlendirmelerini takip edin ve projenizi oluşturun! 🎉
🎯 Kullanım Senaryoları
ProjectGen farklı proje ihtiyaçlarına göre optimize edilmiştir:
| Senaryo | Önerilen Mimari | Neden? |
|---|---|---|
| Kurumsal Uygulamalar | N-Tier Architecture | Katman ayrımı ve standardizasyon |
| Mikroservisler | Layered Architecture | Hafif ve bağımsız yapı |
| Test Edilebilir Sistemler | Clean Architecture | Framework bağımsızlığı |
| Hızlı Değişen Projeler | Vertical Slice | Feature-based organizasyon |
📋 Sistem Gereksinimleri
- .NET SDK: 8.0 veya 9.0
- İşletim Sistemi: Windows, macOS, Linux
- Docker (Opsiyonel): Container desteği için
- Git (Opsiyonel): Versiyon kontrol için
📞 İletişim & Bağlantılar
📝 Lisans
Bu proje MIT lisansı altında yayınlanmıştır.
🤝 Katkıda Bulunma
Projeye katkıda bulunmak isterseniz:
- Repository'yi fork edin
- Yeni bir branch oluşturun (
git checkout -b feature/amazing-feature) - Değişikliklerinizi commit edin (
git commit -m 'feat: Add amazing feature') - Branch'inizi push edin (
git push origin feature/amazing-feature) - Pull Request oluşturun
⭐ Projeyi beğendiyseniz yıldız vermeyi unutmayın!





