GitHunt
NU

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

Architectures Databases SDKs

[ English | Türkçe ]


🌐 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

ProjectGen CLI Overview

ProjectGen CLI Demo


📊 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.

Clean Architecture

🏢 N-Tier Architecture

Traditional separation of concerns with Core, DataAccess, Business, and API layers. Ideal for enterprise-level projects.

N-Tier Architecture

🔪 Vertical Slice Architecture

Organizes code around features (slices) rather than technical layers. Reduces coupling and improves maintainability for fast-growing systems.

Vertical Slice Architecture

📦 Layered Architecture

A compact version of layered architecture within a single Web API project. Perfect for microservices and small-to-medium prototypes.

Layered Architecture


🚀 Technical Features and Solutions

⚡ 1. Smart SDK Detection

Automatically detects if your system has .NET 8 or .NET 9 installed.

How it works:

  1. Automatic Scanning: Scans all installed .NET SDK versions on your system.
  2. Preference Query: If both SDKs are present, prompts the user to choose.
  3. 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 structure
  • docker-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:

  1. Clone and pack the project:

    git clone https://github.com/nusretzinkli/ProjectGen-CLI.git
    cd ProjectGen-CLI
    dotnet pack -c Release
  2. Install as a Global Tool:

    dotnet tool install --global --add-source ./nupkg ProjectGen-CLI
  3. Run anywhere:

    projectgen
  4. 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


📝 License

This project is released under the MIT license.


🤝 Contributing

If you'd like to contribute to the project:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: Add amazing feature')
  4. Push your branch (git push origin feature/amazing-feature)
  5. Create a Pull Request

⭐ Don't forget to star the project if you like it!



🇹🇷 Türkçe

Architectures Databases SDKs

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ü

ProjectGen CLI Genel Görünüm

ProjectGen CLI Demo


📊 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.

Clean Architecture

🏢 N-Tier Architecture

Core, DataAccess, Business ve API katmanlarının geleneksel ayrımı. Kurumsal ölçekteki projeler için idealdir.

N-Tier Architecture

🔪 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.

Vertical Slice Architecture

📦 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.

Layered Architecture


🚀 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:

  1. Otomatik Tarama: Sistemdeki tüm .NET SDK versiyonlarını tarar.
  2. Tercih Sorgulama: Her iki SDK de varsa kullanıcıya seçim sunar.
  3. 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:

  1. Projeyi klonlayın ve paketleyin:

    git clone https://github.com/nusretzinkli/ProjectGen-CLI.git
    cd ProjectGen-CLI
    dotnet pack -c Release
  2. Global Araç olarak kurun:

    dotnet tool install --global --add-source ./nupkg ProjectGen-CLI
  3. İstediğiniz klasörde çalıştırın:

    projectgen
  4. 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:

  1. Repository'yi fork edin
  2. Yeni bir branch oluşturun (git checkout -b feature/amazing-feature)
  3. Değişikliklerinizi commit edin (git commit -m 'feat: Add amazing feature')
  4. Branch'inizi push edin (git push origin feature/amazing-feature)
  5. Pull Request oluşturun

⭐ Projeyi beğendiyseniz yıldız vermeyi unutmayın!