Skip to content

Modern, scalable CRM platform built with .NET 8 Clean Architecture and Next.js 14. Features comprehensive customer management, lead tracking, sales opportunities, order processing, and activity management with role-based access control and JWT authentication

Notifications You must be signed in to change notification settings

emreetumer/crm-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CRM Application

CRM Application .NET 8 Next.js TypeScript

Modern, ölçeklenebilir ve kullanıcı dostu bir müşteri ilişkileri yönetimi sistemi

ÖzelliklerKurulumAPI DokümantasyonuKatkıda Bulunma


📋 İçindekiler


📖 Hakkında

CRM Application, modern iş ihtiyaçlarını karşılamak üzere tasarlanmış kapsamlı bir müşteri ilişkileri yönetimi sistemidir. Clean Architecture prensipleri ve en iyi pratikler kullanılarak geliştirilmiştir.

🎯 Proje Hedefleri

  • Müşteri Yönetimi: Müşteri bilgilerini merkezi bir sistemde toplama
  • Lead Takibi: Potansiyel müşterileri yönetme ve dönüşüm takibi
  • Satış Fırsatları: Satış süreçlerini izleme ve raporlama
  • Aktivite Yönetimi: Müşteri etkileşimlerini kaydetme
  • Ürün & Sipariş: Ürün kataloğu ve sipariş yönetimi
  • Rol Tabanlı Erişim: Güvenli kullanıcı yetkilendirmesi

✨ Özellikler

🔐 Kimlik Doğrulama & Yetkilendirme

  • JWT tabanlı güvenli authentication
  • Rol tabanlı yetkilendirme (RBAC)
  • Permission bazlı erişim kontrolü
  • Güvenli şifre hashleme

👥 Kullanıcı Yönetimi

  • Kullanıcı profilleri
  • Departman yönetimi
  • Rol ve izin atamaları
  • Kullanıcı aktivite takibi

🎯 Lead Yönetimi

  • Lead kaydı ve takibi
  • Lead skorlama sistemi
  • Kaynak bazlı filtreleme
  • Durum bazlı yönetim
  • Otomatik etiketleme

👤 Müşteri Yönetimi

  • Detaylı müşteri profilleri
  • İletişim bilgileri
  • Müşteri geçmişi
  • Segment yönetimi
  • Notlar ve dökümanlar

💼 Satış Fırsatları

  • Fırsat oluşturma ve takibi
  • Pipeline yönetimi
  • Tahmini gelir hesaplama
  • Kapanış tarihi takibi
  • Ürün bazlı fırsat yönetimi

📅 Aktivite Yönetimi

  • Toplantı, arama, email takibi
  • Görev yönetimi
  • Aktivite raporları
  • Hatırlatıcılar
  • Geçmiş aktivite görüntüleme

🏷️ Etiket Sistemi

  • Özelleştirilebilir etiketler
  • Renkli kategorizasyon
  • Çoklu etiket desteği
  • Lead ve müşteri etiketleme

📦 Ürün & Sipariş

  • Ürün kataloğu
  • Stok yönetimi
  • Sipariş oluşturma
  • Sipariş takibi
  • Fatura entegrasyonu

📊 Raporlama & Analitik

  • Dashboard'lar
  • İstatistiksel raporlar
  • Performans metrikleri
  • Veri görselleştirme

🛠️ Teknoloji Stack

Backend

Teknoloji Versiyon Açıklama
.NET 8.0 Ana framework
Entity Framework Core 8.0 ORM
SQL Server 2019+ Veritabanı
MediatR 12.x CQRS Pattern
FluentValidation 11.x Validation
Swagger/OpenAPI 6.x API dokümantasyonu

Frontend

Teknoloji Versiyon Açıklama
Next.js 16.0 React framework
React 19.2 UI library
TypeScript 5.x Type safety
Tailwind CSS 4.x Styling
Context API - State management

🏗️ Mimari

Proje Clean Architecture prensiplerine göre katmanlı mimari ile tasarlanmıştır:

┌─────────────────────────────────────────────┐
│                                             │
│              Presentation Layer             │
│           (API + Frontend)                  │
│                                             │
├─────────────────────────────────────────────┤
│                                             │
│            Application Layer                │
│     (Business Logic + CQRS + DTOs)          │
│                                             │
├─────────────────────────────────────────────┤
│                                             │
│              Domain Layer                   │
│         (Entities + Enums)                  │
│                                             │
├─────────────────────────────────────────────┤
│                                             │
│          Infrastructure Layer               │
│    (Database + Repositories + Services)     │
│                                             │
└─────────────────────────────────────────────┘

Backend Katmanları

🎨 CRMApplication.API

  • RESTful API endpoints
  • Controllers
  • Middleware
  • Swagger konfigürasyonu

💼 CRMApplication.Application

  • CQRS (Commands & Queries)
  • Business logic
  • DTOs (Data Transfer Objects)
  • Validators
  • Interfaces

🏛️ CRMApplication.Domain

  • Entity models
  • Enums
  • Domain logic
  • Value objects

🔧 CRMApplication.Infrastructure

  • Database context
  • Repository implementations
  • Data migrations
  • External services

Design Patterns

  • Repository Pattern: Veri erişim soyutlaması
  • Unit of Work: Transaction yönetimi
  • CQRS: Command ve Query ayrımı
  • Result Pattern: Tutarlı response yönetimi
  • Dependency Injection: Loose coupling

🚀 Kurulum

Gereksinimler

  • .NET 8 SDK - İndir
  • Node.js 18+ - İndir
  • SQL Server 2019+ veya LocalDB
  • Git

Adım 1: Projeyi Klonlayın

git clone https://github.com/yourusername/crm-application.git
cd crm-application

Adım 2: Backend Kurulumu

# Backend klasörüne gidin
cd Backend/CRMAppllication

# Bağımlılıkları yükleyin
dotnet restore

# Connection string'i güncelleyin (appsettings.Development.json)
# "DefaultConnection": "Server=.;Database=CRMDb;Trusted_Connection=True;TrustServerCertificate=True;"

# Veritabanını oluşturun
dotnet ef database update --project CRMAppllication.Infrastructure --startup-project CRMAppllication.API

# Uygulamayı başlatın
dotnet run --project CRMAppllication.API

Backend çalışıyor: http://localhost:5000
Swagger UI: http://localhost:5000/swagger

Adım 3: Frontend Kurulumu

# Frontend klasörüne gidin (yeni terminal)
cd Frontend/crm-project

# Bağımlılıkları yükleyin
npm install

# Development server'ı başlatın
npm run dev

Frontend çalışıyor: http://localhost:3000

Adım 4: İlk Kullanıcıyı Oluşturun

  1. Browser'da http://localhost:3000 adresine gidin
  2. Register sayfasına gidin
  3. Yeni kullanıcı oluşturun
  4. Otomatik olarak dashboard'a yönlendirileceksiniz

📚 API Dokümantasyonu

API dokümantasyonuna Swagger UI üzerinden erişebilirsiniz: http://localhost:5000/swagger

API Modülleri

🔐 Authentication

POST   /api/auth/register    - Yeni kullanıcı kaydı
POST   /api/auth/login       - Kullanıcı girişi

👥 Users

GET    /api/users            - Tüm kullanıcılar
GET    /api/users/{id}       - Kullanıcı detayı
POST   /api/users            - Yeni kullanıcı
PUT    /api/users/{id}       - Kullanıcı güncelle
DELETE /api/users/{id}       - Kullanıcı sil

🎯 Leads

GET    /api/leads            - Tüm lead'ler
GET    /api/leads/{id}       - Lead detayı
POST   /api/leads            - Yeni lead
PUT    /api/leads/{id}       - Lead güncelle
DELETE /api/leads/{id}       - Lead sil
GET    /api/leads/by-source  - Kaynağa göre filtrele

👤 Customers

GET    /api/customers        - Tüm müşteriler
GET    /api/customers/{id}   - Müşteri detayı
POST   /api/customers        - Yeni müşteri
PUT    /api/customers/{id}   - Müşteri güncelle
DELETE /api/customers/{id}   - Müşteri sil

💼 Opportunities

GET    /api/opportunities         - Tüm fırsatlar
GET    /api/opportunities/{id}    - Fırsat detayı
POST   /api/opportunities         - Yeni fırsat
PUT    /api/opportunities/{id}    - Fırsat güncelle
DELETE /api/opportunities/{id}    - Fırsat sil

📅 Activities

GET    /api/activities            - Tüm aktiviteler
GET    /api/activities/{id}       - Aktivite detayı
POST   /api/activities            - Yeni aktivite
PUT    /api/activities/{id}       - Aktivite güncelle
DELETE /api/activities/{id}       - Aktivite sil

📦 Products

GET    /api/products              - Tüm ürünler
GET    /api/products/{id}         - Ürün detayı
POST   /api/products              - Yeni ürün
PUT    /api/products/{id}         - Ürün güncelle
DELETE /api/products/{id}         - Ürün sil

🛒 Orders

GET    /api/orders                - Tüm siparişler
GET    /api/orders/{id}           - Sipariş detayı
POST   /api/orders                - Yeni sipariş
PUT    /api/orders/{id}           - Sipariş güncelle
DELETE /api/orders/{id}           - Sipariş sil

🏷️ Tags

GET    /api/tags                  - Tüm etiketler
GET    /api/tags/{id}             - Etiket detayı
POST   /api/tags                  - Yeni etiket
PUT    /api/tags/{id}             - Etiket güncelle
DELETE /api/tags/{id}             - Etiket sil

🏢 Departments

GET    /api/departments           - Tüm departmanlar
GET    /api/departments/{id}      - Departman detayı
POST   /api/departments           - Yeni departman
PUT    /api/departments/{id}      - Departman güncelle
DELETE /api/departments/{id}      - Departman sil

👮 Roles

GET    /api/roles                 - Tüm roller
GET    /api/roles/{id}            - Rol detayı
POST   /api/roles                 - Yeni rol
PUT    /api/roles/{id}            - Rol güncelle
DELETE /api/roles/{id}            - Rol sil

Detaylı API dokümantasyonu için: /Backend/CRMAppllication/README.md


📸 Ekran Görüntüleri

Login Sayfası

Modern ve kullanıcı dostu giriş ekranı

Dashboard

Genel bakış ve istatistikler

Lead Yönetimi

Lead listesi ve detaylı görünüm

Müşteri Profili

Kapsamlı müşteri bilgileri


🗄️ Veritabanı Şeması

Ana Tablolar

erDiagram
    Users ||--o{ Leads : manages
    Users ||--o{ Customers : manages
    Users ||--o{ Opportunities : manages
    Users }o--|| Roles : has
    Users }o--o| Departments : belongs_to
    
    Leads ||--o{ LeadTags : has
    Customers ||--o{ CustomerTags : has
    Customers ||--o{ Contacts : has
    Customers ||--o{ Orders : places
    
    Opportunities ||--o{ OpportunityProducts : contains
    Opportunities }o--|| Customers : belongs_to
    
    Products ||--o{ OpportunityProducts : included_in
    Products ||--o{ OrderItems : included_in
    
    Orders ||--o{ OrderItems : contains
    
    Roles ||--o{ RolePermissions : has
    Permissions ||--o{ RolePermissions : assigned_to
Loading

Tablolar (19 Adet)

Tablo Açıklama İlişkiler
Users Kullanıcı bilgileri Roles, Departments
Roles Rol tanımları Users, Permissions
Permissions Sistem izinleri Roles
RolePermissions Rol-izin ilişkisi -
Departments Departman bilgileri Users
Leads Potansiyel müşteriler Users, Tags
Customers Müşteri bilgileri Users, Contacts, Orders
Contacts İletişim bilgileri Customers
Opportunities Satış fırsatları Customers, Products
Activities Aktiviteler Leads, Customers
TodoTasks Görevler Users
Products Ürünler Opportunities, Orders
OpportunityProducts Fırsat-ürün ilişkisi -
Orders Siparişler Customers
OrderItems Sipariş kalemleri Orders, Products
Tags Etiketler Leads, Customers
LeadTags Lead-etiket ilişkisi -
CustomerTags Müşteri-etiket ilişkisi -
Notes Notlar Leads, Customers

Detaylı şema için: /Backend/CRMAppllication/DATABASE_SCHEMA.md


📦 Proje Yapısı

CRMProject/
│
├── Backend/
│   └── CRMAppllication/
│       ├── CRMAppllication.API/              # Web API katmanı
│       │   ├── Controllers/                  # API Controllers
│       │   ├── Program.cs                    # Uygulama başlangıcı
│       │   └── appsettings.json              # Konfigürasyon
│       │
│       ├── CRMAppllication.Application/      # Business Logic
│       │   ├── Features/                     # CQRS (Commands & Queries)
│       │   ├── DTOs/                         # Data Transfer Objects
│       │   ├── Interfaces/                   # Interface tanımları
│       │   └── Common/                       # Paylaşılan sınıflar
│       │
│       ├── CRMAppllication.Domain/           # Domain katmanı
│       │   ├── Entities/                     # Entity modeller
│       │   └── Enums/                        # Enum tanımları
│       │
│       └── CRMAppllication.Infrastructure/   # Infrastructure
│           ├── Data/                         # DbContext
│           ├── Repositories/                 # Repository implementations
│           ├── Migrations/                   # EF Migrations
│           └── Services/                     # External services
│
└── Frontend/
    └── crm-project/
        ├── app/                              # Next.js App Router
        │   ├── login/                        # Login sayfası
        │   ├── register/                     # Register sayfası
        │   ├── dashboard/                    # Dashboard
        │   ├── users/                        # Kullanıcı yönetimi
        │   ├── leads/                        # Lead yönetimi
        │   ├── customers/                    # Müşteri yönetimi
        │   └── ...                           # Diğer modüller
        │
        ├── components/                       # React bileşenleri
        │   ├── ui/                           # UI components
        │   ├── layout/                       # Layout components
        │   └── ...                           # Modül components
        │
        ├── contexts/                         # React Context
        │   └── AuthContext.tsx               # Authentication context
        │
        └── lib/                              # Utilities
            └── api/                          # API servis fonksiyonları

🔧 Geliştirme

Backend Development

# Migration oluşturma
dotnet ef migrations add MigrationName --project CRMAppllication.Infrastructure --startup-project CRMAppllication.API

# Migration uygulama
dotnet ef database update --project CRMAppllication.Infrastructure --startup-project CRMAppllication.API

# Test çalıştırma
dotnet test

Frontend Development

# Development server
npm run dev

# Production build
npm run build

# Production server
npm start

# Linting
npm run lint

🧪 Test

# Backend testleri
cd Backend/CRMAppllication
dotnet test

# Frontend testleri
cd Frontend/crm-project
npm test

🚀 Deployment

Backend (API)

# Production build
dotnet publish -c Release

# Docker ile deployment
docker build -t crm-api .
docker run -p 5000:80 crm-api

Frontend

# Production build
npm run build

# Docker ile deployment
docker build -t crm-frontend .
docker run -p 3000:3000 crm-frontend

🤝 Katkıda Bulunma

Katkılarınızı bekliyoruz! Lütfen aşağıdaki adımları izleyin:

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

Kod Standartları

  • Clean Code prensipleri
  • SOLID prensipleri
  • DRY (Don't Repeat Yourself)
  • Anlamlı commit mesajları
  • Kod dokümantasyonu

About

Modern, scalable CRM platform built with .NET 8 Clean Architecture and Next.js 14. Features comprehensive customer management, lead tracking, sales opportunities, order processing, and activity management with role-based access control and JWT authentication

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages