Bu proje, Elasticsearch ile ASP.NET Core MVC kullanarak enterprise-level CV arama ve aday filtreleme sisteminin nasıl çalıştığını gösteren kapsamlı bir uygulamadır. Clean Architecture prensiplerine uygun N-tier mimari yapısında geliştirilmiş profesyonel bir çözümdür.
- 🎯 Proje Özeti
- 🛠 Teknolojiler
- 🏗 Mimari
- 🚀 Kurulum
- 📖 Kullanım
- 📁 Proje Yapısı
- ✨ Özellikler
- 🎯 Nasıl Çalışır
- 🎨 Ekran Görüntüleri
- 🔧 Konfigürasyon
- 🧪 Test
- 🐛 Sorun Giderme
- 📞 İletişim
ElasticCVScanner, modern enterprise mimarisinde kullanılan Elasticsearch search engine'ini ASP.NET Core ekosistemi ile entegre eden profesyonel bir web uygulamasıdır. Repository Pattern, Unit of Work Pattern ve SOLID prensiplerine uygun olarak geliştirilmiştir.
- 🎯 Enterprise-Level Architecture: Clean Architecture ve SOLID prensipleri
- 🔍 Advanced Search Engine: Elasticsearch ile güçlü tam metin arama
- 🔒 5-Layer Security System: DoS koruması ile güvenli dosya yükleme
- 🎨 Modern UI/UX: Bootstrap 5 ile responsive tasarım
- 📊 Real-time Analytics: Dashboard ile canlı istatistikler
- 🧪 Production Ready: Kapsamlı validasyon ve hata yönetimi
- 📚 Turkish Language Support: Türkçe analyzer ile optimize edilmiş arama
- 🚀 Performance Optimized: Asenkron işlemler ve caching
- 🔧 Framework: ASP.NET Core 8.0 MVC
- 💾 Database: Microsoft SQL Server Express
- 🔍 Search Engine: Elasticsearch 7.x
- 🗃 ORM: Entity Framework Core 8.0
- 📋 Logging: Microsoft.Extensions.Logging
- 🧪 Testing: xUnit, Moq (Test Infrastructure)
- 🎨 CSS Framework: Bootstrap 5.3
- 📱 Responsive Design: HTML5, CSS3, Modern JavaScript
- 🎯 Icons: FontAwesome + Bootstrap Icons
- 📊 Interactive: SweetAlert2, Modern JavaScript
- 🐳 Containerization: Docker support ready
- 📋 API Documentation: Swagger/OpenAPI 3.0
- 🔐 Security: Data Protection, Input Validation
- 🏥 Monitoring: Health checks ve performance metrics
- 🏗 N-Tier Architecture: Core, Repository, Service, Web layers
- 📦 Repository Pattern: Generic Repository implementation
- 🔄 Unit of Work Pattern: Transaction management
- 🎯 Result Pattern: Typed error handling
- 🧩 Dependency Injection: Built-in DI container
- NEST: Elasticsearch .NET client
- iTextSharp: PDF text extraction
- DocumentFormat.OpenXml: DOCX text extraction
- Swashbuckle.AspNetCore: API documentation
- Microsoft.EntityFrameworkCore: ORM framework
Proje Clean Architecture prensiplerine uygun N-tier (çok katmanlı) mimari yapısında geliştirilmiştir:
📁 ElasticCVScanner/
├── 📁 ElasticCVScanner.Core/ # 🎯 Domain Layer
│ ├── 📁 Entities/ # Domain Models
│ ├── 📁 DTOs/ # Data Transfer Objects
│ ├── 📁 Enums/ # Domain Enums
│ ├── 📁 Attributes/ # Validation Attributes
│ └── 📁 Interfaces/ # Contracts
├── 📁 ElasticCVScanner.Repository/ # 🗃 Data Access Layer
│ ├── 📁 Data/ # DbContext & Configurations
│ ├── 📁 Repositories/ # Repository Implementations
│ ├── 📁 Search/ # Elasticsearch Operations
│ └── 📁 Migrations/ # EF Core Migrations
├── 📁 ElasticCVScanner.Service/ # 🔧 Business Logic Layer
│ └── 📁 Services/ # Business Services
└── 📁 ElasticCVScanner.Web/ # 🌐 Presentation Layer
├── 📁 Controllers/ # MVC Controllers
├── 📁 Views/ # Razor Views
├── 📁 ViewModels/ # View Models
└── 📁 wwwroot/ # Static Assets
- 🎯 Core (Domain): Entities, DTOs, Enums ve tüm interface tanımları
- 🗃 Repository: Veri erişim katmanı, Entity Framework ve Elasticsearch implementasyonları
- 🔧 Service: İş mantığı, validation servisleri ve domain operations
- 🌐 Web: MVC Controllers, Views ve kullanıcı arayüzü
- 📨 Advanced Search: Elasticsearch'ün gücü ile CV içeriklerinde gelişmiş arama
- 🎯 Score-based Ranking: En uygun adayları relevance skoruna göre sıralama
- 🔄 Real-time Filtering: Deneyim, yetenek, pozisyon ve konuma göre filtreleme
- 📊 Search Analytics: Arama istatistikleri ve popüler terimler
- 🇹🇷 Turkish Language: Türkçe analyzer ile optimize edilmiş arama
- 💡 Smart Suggestions: Arama önerileri ve auto-complete
- 🔒 5-Layer File Validation: Kapsamlı dosya güvenlik sistemi
- 📄 Multiple Format Support: PDF, DOCX, DOC, TXT formatları
- 🛡 DoS Protection: Dosya boyutu ve işlem limitleri
- 🔍 Magic Number Validation: Gerçek dosya türü tespiti
- ⚡ Stream Management: Güvenli ve performanslı dosya işleme
- 🚨 Error Handling: Kapsamlı hata yönetimi ve kullanıcı bildirimleri
- ⚡ Entity Framework Core: Code-first approach
- 🔄 Repository Pattern: Generic ve specific repository implementations
- 💼 Unit of Work: Transaction management
- 🏭 Result Pattern: Typed result objects ile hata yönetimi
- 🔧 Migrations: Otomatik veritabanı şema yönetimi
- 📝 Seed Data: Kapsamlı test verileri
- 📱 Mobile-First Design: Bootstrap 5 ile responsive tasarım
- 🎨 Modern UI Components: Card-based layout, icons, badges
- ⚡ Real-time Updates: Dynamic content updates
- ✅ Advanced Validation: Client & server-side validation
- 🚨 Alert System: Success, error, warning, info messages
- 🔍 Search & Filter: Gelişmiş filtreleme ve pagination
- 🏥 Health Checks: Application health monitoring
- 📚 API Documentation: Comprehensive endpoint documentation
- 📋 Structured Logging: Microsoft.Extensions.Logging
- ⚡ Performance Metrics: Processing time measurements
- 🔐 Security Best Practices: Input validation, SQL injection protection
- 🧪 Unit Testing: xUnit test infrastructure
- ✅ .NET 8.0 SDK
- ✅ Microsoft SQL Server Express (veya LocalDB)
- ✅ Elasticsearch 7.x
- ✅ Visual Studio 2022 / VS Code / JetBrains Rider
git clone https://github.com/hamzacanturk/ElasticCVScanner.git
cd ElasticCVScanner# Docker ile Elasticsearch kurulumu
docker run -d \
--name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
elasticsearch:7.17.9# NuGet packages restore
dotnet restore
# Migration çalıştır
cd ElasticCVScanner.Web
dotnet ef database update
# Seed data otomatik olarak oluşturulacakElasticCVScanner.Web/appsettings.json dosyasını düzenleyin:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=ElasticCVScannerDB;Trusted_Connection=true;MultipleActiveResultSets=true"
},
"Elasticsearch": {
"Url": "http://localhost:9200",
"CandidateIndexName": "candidates-index"
}
}# Development SSL certificate
dotnet dev-certs https --trust# Web application başlat
cd ElasticCVScanner.Web
dotnet run
# Alternatif portlar:
# dotnet run --urls="http://localhost:5118"
# dotnet run --urls="https://localhost:7237"🌐 Uygulama Erişim URL'leri:
- Ana Uygulama:
https://localhost:7237 - HTTP:
http://localhost:5118 - Dashboard:
https://localhost:7237/Candidates - API Documentation: Geliştirilme aşamasında
- Health Check: Geliştirilme aşamasında
- Real-time Metrics: Anlık aday istatistikleri
- System Overview: Toplam, bu ay, bu hafta aday sayıları
- Recent Activity: Son eklenen adaylar
- Performance Indicators: Arama süreleri ve sistem durumu
- "Yeni Aday" sayfasına gidin
- Form alanlarını doldurun (Ad, Soyad, Email, Telefon)
- CV dosyasını yükleyin (PDF/DOCX/DOC/TXT)
- Yetenekleri virgülle ayırarak girin
- Kaydet butonuna tıklayın
- CV otomatik olarak Elasticsearch'e indekslenir
- 🟢 Active: Aktif aday
- 🔵 Indexed: Elasticsearch'e indekslenmiş
- 🟡 Processing: İşleniyor
- 🔴 Error: İşlemde hata oluştu
- 📋 Gelişmiş Arama: Elasticsearch ile güçlü tam metin arama
- ✅ Skill-based: Yeteneklere göre filtreleme
- ⏳ Experience-based: Deneyim yılına göre sıralama
- 🔍 Detay Görünümü: Aday detayları ve CV içeriği
- 📊 Search Statistics: Arama sonuçları ve performans metrikleri
GET /api/Candidates # Tüm adayları getir
POST /api/Candidates # Yeni aday oluştur
GET /api/Candidates/{id} # Aday detayı
POST /api/Candidates/Search # Elasticsearch ile arama
GET /health # System health check🔍 Detaylı Klasör Yapısı
📁 ElasticCVScanner/
├── 📄 ElasticCVScanner.sln # Solution File
├── 📄 README.md # Project Documentation
│
├── 📁 ElasticCVScanner.Core/ # 🎯 Domain Layer
│ ├── 📁 Entities/
│ │ ├── 📄 BaseEntity.cs # Base entity with common properties
│ │ └── 📄 Candidate.cs # Candidate domain entity
│ ├── 📁 DTOs/
│ │ ├── 📄 CandidateDto.cs # Output DTO with XML docs
│ │ └── 📄 CandidateCreateDto.cs # Input DTO with validation
│ ├── 📁 Enums/
│ │ └── 📄 CandidateStatus.cs # Candidate status enumeration
│ ├── 📁 Attributes/
│ │ ├── 📄 AllowedFileExtensionsAttribute.cs # File validation
│ │ ├── 📄 ValidMimeTypeAttribute.cs # MIME validation
│ │ └── 📄 ValidFileContentAttribute.cs # Magic number validation
│ └── 📁 Interfaces/
│ ├── 📄 IGenericRepository.cs # Generic repository contract
│ ├── 📄 ICandidateRepository.cs # Candidate specific repository
│ ├── 📄 ICandidateSearchService.cs # Search service contract
│ ├── 📄 ICandidateService.cs # Business logic contract
│ └── 📄 IUnitOfWork.cs # Unit of Work pattern
│
├── 📁 ElasticCVScanner.Repository/ # 🗃 Data Access Layer
│ ├── 📁 Data/
│ │ ├── 📄 ApplicationDbContext.cs # EF DbContext
│ │ └── 📄 CandidateRepository.cs # Candidate data operations
│ ├── 📁 Search/
│ │ └── 📄 CandidateSearchService.cs # Elasticsearch operations
│ └── 📁 Migrations/ # EF Core migrations
│
├── 📁 ElasticCVScanner.Service/ # 🔧 Business Logic Layer
│ └── 📁 Services/
│ ├── 📄 CandidateService.cs # Business operations
│ ├── 📄 CandidateValidationService.cs # Validation logic
│ └── 📄 CvParsingService.cs # File processing
│
└── 📁 ElasticCVScanner.Web/ # 🌐 Presentation Layer
├── 📁 Controllers/
│ ├── 📄 HomeController.cs # Home & Search
│ └── 📄 CandidatesController.cs # Candidate operations
├── 📁 ViewModels/
│ ├── 📄 CandidateViewModel.cs # Candidate view models
│ └── 📄 SearchResultViewModel.cs # Search result models
├── 📁 Views/
│ ├── 📁 Shared/
│ │ ├── 📄 _Layout.cshtml # Master layout
│ │ └── 📄 Error.cshtml # Error page
│ ├── 📁 Home/
│ │ ├── 📄 Index.cshtml # Landing page
│ │ ├── 📄 About.cshtml # About page
│ │ ├── 📄 Contact.cshtml # Contact page
│ │ └── 📄 Privacy.cshtml # Privacy policy
│ └── 📁 Candidates/
│ ├── 📄 Index.cshtml # Candidate listing
│ ├── 📄 Details.cshtml # Candidate details
│ ├── 📄 Create.cshtml # Candidate creation
│ ├── 📄 Edit.cshtml # Candidate editing
│ ├── 📄 Delete.cshtml # Candidate deletion
│ └── 📄 SearchResults.cshtml # Search results
├── 📁 wwwroot/ # Static assets
│ ├── 📁 css/
│ │ ├── 📄 site.css # Main styles
│ │ └── 📄 responsive.css # Responsive design
│ ├── 📁 js/
│ │ └── 📄 site.js # Custom JavaScript
│ └── 📁 uploads/ # CV file storage
├── 📄 appsettings.json # Configuration
├── 📄 appsettings.Development.json # Dev configuration
└── 📄 Program.cs # Application entry point
graph TD
A[👤 User] -->|1. Upload CV| B[🌐 Web UI]
B -->|2. HTTP POST| C[🎮 CandidatesController]
C -->|3. Validate File| D[🛡 5-Layer Security]
D -->|4. Extract Text| E[📄 CV Parsing Service]
E -->|5. Save to DB| F[🗃 Database]
F -->|6. Index to ES| G[🔍 Elasticsearch]
G -->|7. Ready for Search| H[✅ Searchable Candidate]
graph TD
A[👤 User] -->|1. Search Query| B[🌐 Search UI]
B -->|2. HTTP Request| C[🎮 Search Controller]
C -->|3. Query ES| D[🔍 Elasticsearch]
D -->|4. Ranked Results| E[📊 Search Service]
E -->|5. Enrich Data| F[🗃 Database]
F -->|6. Return Results| G[📋 Search Results UI]
- 👤 File Upload: Kullanıcı web arayüzünden CV dosyası yükler
- 🛡 Security Validation: 5-katmanlı güvenlik sistemi devreye girer
- 📄 Text Extraction: PDF/DOCX'den metin çıkarımı yapılır
- 💾 Database Save: Aday bilgileri veritabanına kaydedilir
- 🔍 Elasticsearch Index: CV içeriği Elasticsearch'e indekslenir
- 🎯 Search Ready: Aday arama için hazır hale gelir
- 📊 Real-time Search: Kullanıcılar gelişmiş arama yapabilir
- 🔗 Loose Coupling: Interface-based design
- 📈 Scalability: Horizontal scaling ready
- 🛡 Fault Tolerance: Comprehensive error handling
- 🔄 Async Processing: Non-blocking operations
- 🧪 Testability: Mockable dependencies
- 📊 Observability: Comprehensive logging
Aday istatistikleri, sistem metrikleri ve arama arayüzünün bulunduğu ana dashboard
Yeni aday ekleme formu - 5-katmanlı güvenlik sistemi ile CV yükleme
Sistemdeki tüm adayların listelendiği sayfa - filtreleme ve arama özellikleri
Elasticsearch ile gelişmiş arama sonuçları - skorlama ve filtreleme
Sistemde başarıyla indexlenmiş 14 aday ile dolu aday listesi
Kompakt görünümde aday listesi
Proje hakkında detaylı bilgiler
İletişim bilgileri ve geri bildirim formu
- ✨ Modern Bootstrap 5 UI - Responsive ve mobil uyumlu tasarım
- 📊 Real-time Dashboard - Canlı aday istatistikleri
- 🔍 Advanced Search - Elasticsearch ile güçlü arama (✅ Çalışıyor)
- 📱 Mobile First Design - Tüm ekran boyutlarına uyum
- 🎨 Card-based Layout - Modern kart tasarımı
- 🚨 Alert Notifications - Kullanıcı geri bildirim sistemi
- 📈 Score Normalization - Doğru eşleşme yüzdeleri (✅ Düzeltildi)
- 🗃 SQL Server 2014 Compatibility - EF Core uyumluluğu (✅ Çözüldü)
- 🔍 14 Aday İndeksli - Elasticsearch'te aktif veri (✅ Hazır)
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"ElasticCVScanner": "Debug"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=ElasticCVScannerDB;Trusted_Connection=true;MultipleActiveResultSets=true"
},
"Elasticsearch": {
"Url": "http://localhost:9200",
"CandidateIndexName": "candidates-index"
}
}{
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5118",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7237;http://localhost:5118",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}# Test projesi oluştur
dotnet new xunit -n ElasticCVScanner.Tests
# Test dependencies
dotnet add package Moq
dotnet add package Microsoft.EntityFrameworkCore.InMemory
dotnet add package FluentAssertions
# Testleri çalıştır
dotnet test[Fact]
public async Task CandidateService_CreateCandidate_ShouldSaveToDatabase()
{
// Arrange
var candidateDto = new CandidateCreateDto { /* test data */ };
// Act
var result = await _candidateService.CreateCandidateAsync(candidateDto);
// Assert
result.Should().NotBeNull();
result.IsSuccess.Should().BeTrue();
}# Elasticsearch status
curl http://localhost:9200
# Index verification
curl http://localhost:9200/_cat/indices
# Cluster health
curl http://localhost:9200/_cluster/health# Migration status
dotnet ef migrations list --project ElasticCVScanner.Web
# Database update
dotnet ef database update --project ElasticCVScanner.Web
# Fresh database
dotnet ef database drop --project ElasticCVScanner.Web
dotnet ef database update --project ElasticCVScanner.Web# Clear build artifacts
dotnet clean
dotnet build
# Check listening ports
netstat -an | findstr ":5118"
netstat -an | findstr ":7237"
# SSL certificate issues
dotnet dev-certs https --clean
dotnet dev-certs https --trust| Error | Solution |
|---|---|
Elasticsearch connection failed |
Check if Elasticsearch is running on port 9200 |
SQL Server connection failed |
Update connection string in appsettings.json |
Port already in use |
Change port in launchSettings.json |
SSL Certificate error |
Run dotnet dev-certs https --trust |
File upload error |
Check file size and format restrictions |
- Input Validation: Data Annotations ile kapsamlı form doğrulama
- XSS Protection: Razor engine'in built-in koruması
- File Upload Security: 5-katmanlı dosya güvenlik sistemi
- SQL Injection Protection: Entity Framework parametreli sorgular
- CSRF Protection: Anti-forgery token kullanımı
- AllowedFileExtensionsAttribute: Sadece PDF, DOCX, DOC, TXT uzantılarına izin
- MinFileSizeAttribute: Boş dosyaları engeller (minimum 1 byte)
- MaxFileSizeAttribute: DoS saldırılarını önler (maksimum 5MB)
- ValidMimeTypeAttribute: HTTP Content-Type header doğrulaması
- ValidFileContentAttribute: Magic number (file header) kontrolü ile gerçek dosya türü tespiti
- MIME Type Limitation: Content-Type header kullanıcı tarafından manipüle edilebilir
- Defense in Depth: MIME kontrolü tek başına güvenlik sağlamaz, sadece ilk filtre görevi görür
- Real Security: Asıl güvenlik ValidFileContentAttribute'ün magic number kontrolünde
- Layered Approach: Her katman bir öncekini tamamlar, tek başına yeterli değildir
- Index mapping optimizasyonu
- Türkçe analyzer kullanımı
- Query caching
- Relevance scoring tuning
- Entity Framework optimized queries
- Index optimizasyonu
- Connection pooling
- Async/await pattern
- CDN kullanımı (Bootstrap, jQuery)
- CSS/JS minification
- Image optimization
- Mobile-first responsive design
# Production ortamı için
ASPNETCORE_ENVIRONMENT=Production
ConnectionStrings__DefaultConnection="[Production SQL Server]"
Elasticsearch__Url="[Production Elasticsearch Cluster]"- ✅ Input Validation: All DTO properties validated
- ✅ SQL Injection Prevention: EF Core parameterized queries
- ✅ XSS Protection: Razor view encoding
- ✅ HTTPS Enforcement: SSL/TLS encryption
- ✅ File Upload Security: 5-layer validation system
- 🔄 Horizontal Scaling: Multiple application instances
- 📊 Load Balancing: Multiple web servers
- 💾 Database Optimization: Indexing ve query optimization
- 🔍 Elasticsearch Sharding: Multiple shards and replicas
- 🗄 Caching: Redis implementation for high-traffic scenarios
Bu proje, modern .NET ekosistemi ve Elasticsearch teknolojilerini showcase eden profesyonel bir yazılım projesidir. Enterprise-level software development practices ve clean architecture principles'in pratik uygulamasını göstermektedir.
Hamza Cantürk Baş
Bilgisayar Mühendisi | Full-Stack Developer | AI Entegrasyon Uzmanı
- 📧 Email: info@hamzacanturk.com
- 💼 LinkedIn: linkedin.com/in/hamzacanturk
- 🌐 Website: hamzacanturk.com
- 🐙 GitHub: github.com/HamzaCanturk61
Önerileriniz ve geri bildirimleriniz için:
- 🍴 Fork yapın
- 🌿 Feature branch oluşturun (
git checkout -b feature/amazing-feature) - 💾 Commit yapın (
git commit -m 'Add some amazing feature') - 📤 Push yapın (
git push origin feature/amazing-feature) - 🔀 Pull Request açın
Herhangi bir sorun, öneri veya soru için GitHub Issues kullanabilirsiniz:
- 🐛 Bug Reports: Detaylı açıklama ile
- 💡 Feature Requests: Yeni özellik önerileri
- 📚 Documentation: Dokümantasyon iyileştirmeleri
- ❓ Questions: Teknik sorular
Bu proje MIT lisansı altında sunulmaktadır.
Bu projeyi incelediğiniz için teşekkür ederim. Modern software development practices ve enterprise-level architecture patterns'in nasıl uygulandığını göstermek için özenle geliştirilmiştir.
⭐ Projeyi beğendiyseniz yıldızlamayı unutmayın!
🚀 "Clean code is not written by following a set of rules. You don't become a software craftsman by learning a list of heuristics. Professionalism and craftsmanship come from values that drive disciplines." - Robert C. Martin
ElasticCV Scanner - Elasticsearch'ün gücü ile gelişmiş CV arama deneyimi! 🚀







