DevSDK 2.0.4

dotnet add package DevSDK --version 2.0.4
                    
NuGet\Install-Package DevSDK -Version 2.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DevSDK" Version="2.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevSDK" Version="2.0.4" />
                    
Directory.Packages.props
<PackageReference Include="DevSDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DevSDK --version 2.0.4
                    
#r "nuget: DevSDK, 2.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=DevSDK&version=2.0.4
                    
Install as a Cake Addin
#tool nuget:?package=DevSDK&version=2.0.4
                    
Install as a Cake Tool

DevSDK - Yazılım Geliştirme Kiti

DevSDK, .NET 8.0 tabanlı kapsamlı bir yazılım geliştirme kitidir. Bu kütüphane, modern web uygulamaları ve API'ler geliştirmek için gerekli tüm araçları ve servisleri içerir.

📋 İçindekiler

🚀 Özellikler

Core Özellikler

  • Entity Framework Core ile ORM desteği
  • AutoMapper ile nesne eşleme
  • Dapper ile yüksek performanslı SQL işlemleri
  • Redis önbellekleme sistemi
  • RabbitMQ mesaj kuyruğu
  • ElasticSearch arama motoru entegrasyonu
  • JWT tabanlı kimlik doğrulama
  • FluentValidation ile doğrulama
  • Swagger API dokümantasyonu
  • Çok dilli (i18n) destek

Web SDK Özellikleri

  • 🎨 Form Bileşenleri (TextBox, Select, CheckBox, vb.)
  • 📊 Bootstrap Table entegrasyonu
  • 🍞 Breadcrumb navigasyon
  • 🎛️ Toolbar bileşenleri
  • Özel Validatörler (TC Kimlik, IBAN, Telefon, vb.)

API SDK Özellikleri

  • 🔒 Middleware sistemi
  • 🎯 Custom Filters
  • 📡 Header yönetimi
  • 🔐 JWT konfigürasyonu
  • 🌐 CORS ayarları
  • 📖 Swagger konfigürasyonu

Alt Servisler

  • 📧 Mail Gönderimi
  • 🌤️ Hava Durumu servisi
  • 📍 Coğrafi Konum servisi
  • 💰 Döviz Kuru servisi
  • 📰 Haber servisi
  • 🔔 OneSignal push notification
  • 🆔 TC Kimlik doğrulama
  • DateTime yardımcı servisi

📦 Kurulum

NuGet Paketi ile

dotnet add package DevSDK

Manuel Kurulum

git clone https://github.com/velifiliz/DevSDK.git
dotnet build

🏁 Hızlı Başlangıç

1. Servisleri Kaydetme

// Program.cs
using DevSDK;

var builder = WebApplication.CreateBuilder(args);

// DevSDK servislerini kaydet
builder.Services.AddCoreServices(Assembly.GetExecutingAssembly());

var app = builder.Build();

// DevSDK middleware'lerini kullan
app.UseCoreServices(Assembly.GetExecutingAssembly(), "tr-TR");

app.Run();

2. Temel Entity Oluşturma

using DevSDK.Common;

public class User : BaseEntity
{
    public string Name { get; set; }
    public string Email { get; set; }
    public DateTime CreatedDate { get; set; }
}

3. Repository Kullanımı

public class UserService
{
    private readonly IRepositoryAsync<AppDbContext> _repository;
    
    public UserService(IRepositoryAsync<AppDbContext> repository)
    {
        _repository = repository;
    }
    
    public async Task<User> GetUserAsync(int id)
    {
        return await _repository.GetByIdAsync<User>(id);
    }
    
    public async Task<bool> CreateUserAsync(User user)
    {
        return await _repository.AddOrUpdateAsync(user);
    }
}

🧩 Modüller

1. Common (Ortak Bileşenler)

  • BaseEntity: Tüm entity'ler için temel sınıf
  • BaseAuditableEntity: Audit özellikli entity'ler için
  • MappingProfile: AutoMapper profil yönetimi
  • CurrentUserInfo: Mevcut kullanıcı bilgileri
  • ValueObject: Değer nesneleri için temel sınıf

2. DataExtensions (Veri Uzantıları)

  • IRepositoryAsync: Asenkron repository interface'i
  • AppRepositoryAsync: Repository implementasyonu
  • AppDataExtensions: Veri erişim uzantıları
  • ModelBuilderExtensions: Entity Framework uzantıları

3. WebSDK (Web Geliştirme Kiti)

Form Bileşenleri
  • FormTextBox: Metin giriş kutusu
  • FormSelect: Seçim kutusu
  • FormCheckBox: Onay kutusu
  • FormRadio: Radyo düğmesi
  • FormTextArea: Çok satırlı metin alanı
  • FormTextEditor: Zengin metin editörü
Validatörler
  • TCKimlikValidatorAttribute: TC Kimlik numarası doğrulama
  • IBANValidatorAttribute: IBAN numarası doğrulama
  • MailValidatorAttribute: E-posta doğrulama
  • PhoneValidatorAttribute: Telefon numarası doğrulama

4. ApiSDK (API Geliştirme Kiti)

  • JWT Authentication: Token tabanlı kimlik doğrulama
  • Swagger Configuration: API dokümantasyon ayarları
  • CORS Configuration: Cross-origin ayarları
  • Custom Middlewares: Özel middleware'ler
  • API Filters: Özel filtreler

🔧 Servisler

Redis Önbellekleme Servisi

public class ProductService
{
    private readonly IRedisMultiplexerService _redis;
    
    public async Task<Product> GetProductAsync(int id)
    {
        var cacheKey = $"product:{id}";
        var product = _redis.Get<Product>(cacheKey);
        
        if (product == null)
        {
            // Veritabanından getir
            product = await GetProductFromDatabase(id);
            _redis.AddOrUpdate(cacheKey, product, 60); // 60 dakika cache
        }
        
        return product;
    }
}

RabbitMQ Mesaj Servisi

public class NotificationService
{
    private readonly IRabbitMQService _rabbitMQ;
    
    public async Task SendNotificationAsync(string message)
    {
        await _rabbitMQ.PublishAsync("notifications", message);
    }
}

Mail Gönderim Servisi

public class EmailService
{
    private readonly IMailSenderService _mailService;
    
    public async Task SendWelcomeEmailAsync(string email, string name)
    {
        var subject = "Hoş Geldiniz!";
        var body = $"Merhaba {name}, sistemimize hoş geldiniz!";
        
        await _mailService.SendEmailAsync(email, subject, body);
    }
}

🔄 Uzantılar (Extensions)

String Uzantıları

// E-posta maskeleme
"test@example.com".MaskEmailAddress(); // "t***@example.com"

// Türkçe karakter dönüşümü
"Çalışkan Öğrenci".ConvertTurkishCharactersToAscii(); // "Caliskan Ogrenci"

// MD5 hash
"password123".ToMd5Hash(); // "482c811da5d5b4bc6d497ffa98491e38"

// Dosya boyutu formatı
1024L.ToFileSize(); // "1 KB"

DateTime Uzantıları

// Türkçe tarih formatı
DateTime.Now.ToTurkishDateString(); // "15 Ocak 2024"

// Yaş hesaplama
birthDate.CalculateAge(); // 25

// İş günü kontrolü
DateTime.Now.IsWorkingDay(); // true/false

Enum Uzantıları

public enum Status
{
    [Display(Name = "Aktif")]
    Active,
    
    [Display(Name = "Pasif")]
    Inactive
}

Status.Active.GetDisplayName(); // "Aktif"

⚙️ Yapılandırma

appsettings.json

{
  "ConnectionStrings": {
    "DefaultConnectionString": "Server=.;Database=MyApp;Trusted_Connection=true;",
    "HangFireConnectionString": "Server=.;Database=HangFire;Trusted_Connection=true;"
  },
  "RedisSettings": {
    "Host": "localhost",
    "Port": 6379,
    "Password": "",
    "Db": 0,
    "KeyPrefix": "MyApp:"
  },
  "RabbitMQSettings": {
    "Host": "localhost",
    "Port": 5672,
    "Username": "guest",
    "Password": "guest"
  },
  "ElasticSearchSettings": {
    "Url": "http://localhost:9200",
    "DefaultIndex": "myapp"
  },
  "JwtSettings": {
    "SecretKey": "your-secret-key-here",
    "Issuer": "MyApp",
    "Audience": "MyApp-Users",
    "ExpirationMinutes": 60
  }
}

Dil Dosyaları

// wwwroot/languages/tr-TR.json
{
  "Welcome": "Hoş Geldiniz",
  "Login": "Giriş Yap",
  "Register": "Kayıt Ol",
  "User": {
    "Name": "Kullanıcı Adı",
    "Email": "E-posta"
  }
}

📚 Örnekler

Çok Dilli Uygulama

// Controller'da
public class HomeController : Controller
{
    public IActionResult Index()
    {
        ViewBag.WelcomeMessage = Language.Key("Welcome");
        ViewBag.UserName = Language.Key("User.Name");
        return View();
    }
}

Form Validasyonu

public class UserViewModel
{
    [LocalizedRequired]
    [LocalizedDisplayName("User.Name")]
    public string Name { get; set; }
    
    [MailValidator]
    [LocalizedDisplayName("User.Email")]
    public string Email { get; set; }
    
    [TCKimlikValidator]
    public string TCKimlik { get; set; }
    
    [PhoneValidator]
    public string Phone { get; set; }
}

API Controller

[ApiController]
[Route("api/[controller]")]
[RoleAuthorize(UserRole.Admin)]
public class UsersController : ControllerBase
{
    private readonly IRepositoryAsync<AppDbContext> _repository;
    
    [HttpGet]
    public async Task<IActionResult> GetUsers()
    {
        var users = await _repository.GetAllAsync<User>();
        return Ok(users);
    }
    
    [HttpPost]
    public async Task<IActionResult> CreateUser([FromBody] User user)
    {
        var result = await _repository.AddOrUpdateAsync(user);
        return result ? Ok() : BadRequest();
    }
}

🏗️ Proje Yapısı

DevSDK/
├── 📁 ApiSDK/                 # API geliştirme araçları
│   ├── 📁 Attributes/         # API attribute'ları
│   ├── 📁 Filters/           # API filtreleri
│   ├── 📁 Jwt/               # JWT yapılandırması
│   ├── 📁 Middlewares/       # Özel middleware'ler
│   └── 📁 Settings/          # API ayarları
├── 📁 Attributes/            # Genel attribute'lar
├── 📁 Builders/              # Builder pattern sınıfları
├── 📁 Common/                # Ortak bileşenler
├── 📁 Constants/             # Sabit değerler
├── 📁 DataExtensions/        # Veri erişim uzantıları
├── 📁 Extensions/            # Uzantı metodları
├── 📁 Functions/             # Yardımcı fonksiyonlar
├── 📁 Settings/              # Uygulama ayarları
├── 📁 SubServices/           # Alt servisler
│   └── 📁 Contracts/         # Servis interface'leri
├── 📁 WebSDK/                # Web geliştirme araçları
│   ├── 📁 Components/        # Web bileşenleri
│   └── 📁 Validators/        # Web validatörleri
├── 📁 Wrappers/              # Wrapper sınıfları
├── 📄 AppSettings.cs         # Uygulama ayarları
├── 📄 Language.cs            # Dil yönetimi
├── 📄 _global.cs             # Global using'ler
└── 📄 _register.cs           # Servis kayıtları

🛠️ Bağımlılıklar

Ana Bağımlılıklar

  • .NET 8.0 - Temel framework
  • Entity Framework Core - ORM
  • AutoMapper - Nesne eşleme
  • Dapper - Mikro ORM
  • StackExchange.Redis - Redis client
  • RabbitMQ.Client - Message queue
  • NEST - ElasticSearch client
  • FluentValidation - Doğrulama
  • Swashbuckle.AspNetCore - Swagger

Ek Kütüphaneler

  • MiniExcel - Excel işlemleri
  • OneSignalApi - Push notification
  • RestSharp - HTTP client
  • MediatR - CQRS pattern
  • Iyzipay - Ödeme sistemi

🤝 Katkıda Bulunma

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

📄 Lisans

Bu proje MIT lisansı altında lisanslanmıştır. Detaylar için LICENSE dosyasına bakın.

👤 Yazar

Veli Filiz

📞 Destek

Herhangi bir sorunuz veya öneriniz için:

  • GitHub Issues kullanın
  • E-posta gönderin: [e-posta adresi]

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

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.4 84 6/26/2025
2.0.3 83 6/26/2025
2.0.2 125 6/24/2025
2.0.1 127 6/24/2025
2.0.0 140 5/27/2025
1.0.99 140 5/27/2025
1.0.98 221 5/13/2025
1.0.97 68 5/3/2025
1.0.96 145 4/29/2025
1.0.95 148 4/29/2025
1.0.94 148 4/29/2025
1.0.93 140 4/29/2025
1.0.92 148 4/29/2025
1.0.91 143 4/29/2025
1.0.90 149 4/29/2025
1.0.89 154 4/29/2025
1.0.88 144 4/29/2025
1.0.87 143 4/29/2025
1.0.86 149 4/29/2025
1.0.85 155 4/28/2025
1.0.84 90 4/27/2025
1.0.83 89 4/26/2025
1.0.82 91 4/26/2025
1.0.81 94 4/26/2025
1.0.80 87 4/26/2025
1.0.79 87 4/26/2025
1.0.78 95 4/26/2025
1.0.77 160 4/24/2025
1.0.76 143 4/23/2025
1.0.75 158 4/21/2025
1.0.74 152 4/21/2025
1.0.73 148 4/21/2025
1.0.72 151 4/21/2025
1.0.71 150 4/21/2025
1.0.70 155 4/21/2025
1.0.69 156 4/21/2025
1.0.68 83 4/19/2025
1.0.67 111 4/18/2025
1.0.66 110 4/18/2025
1.0.65 103 4/18/2025
1.0.64 113 4/18/2025
1.0.63 191 4/16/2025
1.0.62 190 4/16/2025
1.0.61 185 4/16/2025
1.0.60 195 4/16/2025
1.0.59 203 4/16/2025
1.0.58 191 4/16/2025
1.0.57 197 4/15/2025
1.0.56 181 4/15/2025
1.0.55 180 4/15/2025
1.0.54 189 4/15/2025
1.0.53 180 4/15/2025
1.0.52 201 4/15/2025
1.0.51 189 4/15/2025
1.0.50 184 4/14/2025
1.0.49 130 4/13/2025
1.0.48 150 4/13/2025
1.0.47 134 4/13/2025
1.0.46 126 4/13/2025
1.0.45 162 4/9/2025
1.0.44 162 4/9/2025
1.0.42 153 4/9/2025
1.0.41 153 4/7/2025
1.0.40 158 4/7/2025
1.0.39 91 4/5/2025
1.0.38 86 4/5/2025
1.0.37 99 4/5/2025
1.0.36 95 4/5/2025
1.0.35 91 4/5/2025
1.0.34 88 4/5/2025
1.0.33 83 4/4/2025
1.0.32 88 4/4/2025
1.0.31 131 3/26/2025
1.0.30 456 3/26/2025
1.0.29 126 12/4/2024
1.0.28 109 12/4/2024
1.0.27 110 11/21/2024
1.0.26 104 11/21/2024
1.0.25 96 11/21/2024
1.0.24 103 11/21/2024
1.0.22 94 11/18/2024
1.0.21 102 11/15/2024
1.0.20 106 11/15/2024
1.0.19 104 11/14/2024
1.0.18 131 11/9/2024
1.0.17 110 11/9/2024
1.0.16 104 11/9/2024
1.0.15 112 11/9/2024
1.0.14 113 11/8/2024
1.0.13 101 11/8/2024
1.0.12 103 11/8/2024
1.0.11 104 11/7/2024
1.0.10 95 11/7/2024
1.0.9 104 11/7/2024
1.0.8 95 11/6/2024
1.0.7 97 11/6/2024
1.0.6 105 11/6/2024
1.0.5 102 11/6/2024
1.0.4 98 11/6/2024