Modern, kullanıcı dostu ve production-ready bir otomobil yedek parça e-ticaret platformu. ASP.NET Core 9.0 Web API backend ve React 18 frontend ile geliştirilmiştir.
Not: Bu proje, modern web teknolojileri kullanılarak geliştirilmiş, güvenlik önlemleri alınmış ve production ortamına hazır bir e-ticaret platformudur. Tüm modellerde validasyon, global hata yönetimi ve güvenli yapılandırma sağlanmıştır.
- %95 Production Ready: Tüm kritik güvenlik önlemleri ve hata yakalamalar mevcut
- Kapsamlı Validasyon: 8 entity modelinde Data Annotations ile tam validasyon
- Modern Mimari: Clean Architecture prensiplerine uygun yapı
- Güvenli Yapılandırma: Environment variables, JWT secret yönetimi
- Hata Yönetimi: Global Exception Handler + Error Boundary
- API Dokümantasyonu: RESTful API ile tutarlı endpoint yapısı
- Ürün Katalog Sistemi: Kategoriler ve markalar bazında filtreleme
- Gelişmiş Arama: Ürün adı, marka ve parça numarasına göre arama
- Sepet Yönetimi: Gerçek zamanlı sepet güncellemeleri
- Favori Listesi: Beğenilen ürünleri kaydetme ve yönetme (localStorage ile kalıcı)
- Kullanıcı Profili: Profil bilgileri ve sipariş istatistikleri
- Sipariş Geçmişi: Tüm siparişlerin detaylı görüntülenmesi
- Ürün İncelemeleri: Yıldız bazlı değerlendirme ve yorum sistemi
- Bildirim Sistemi: Toast bildirimleri ile kullanıcı geri bildirimi
- Sayfalama: Performanslı ürün listeleme (12 ürün/sayfa)
- 404 Sayfası: Özel hata sayfası
- Error Boundary: React hata yakalama mekanizması
- Dashboard: Profesyonel istatistikler ve genel bakış
- Ürün Yönetimi: CRUD işlemleri (Ekle, Düzenle, Sil)
- Sipariş Yönetimi: Sipariş durumu güncellemeleri
- Kategori Yönetimi: Kategori oluşturma ve düzenleme
- Marka Yönetimi: Araç ve parça markalarını yönetme
- Stok Kontrol: Otomatik stok takibi
- Email Bildirimleri: Sipariş onayları için otomatik email
- JWT Authentication: Güvenli kimlik doğrulama
- Role-Based Authorization: Admin ve kullanıcı rolleri
- Responsive Design: Mobil uyumlu arayüz
- Context API: Global state yönetimi
- RESTful API: Standart API yapısı
- Entity Framework Core: ORM ve veritabanı yönetimi
- Global Exception Handler: Merkezi hata yönetimi
- Model Validations: Tüm modellerde Data Annotations
- Environment Variables: Güvenli konfigürasyon yönetimi
- Entity Framework Core: Code-First yaklaşımı ile veritabanı yönetimi
- Repository Pattern: Veri erişim katmanı soyutlaması
- DTO Pattern: Veri transfer nesneleri ile katman izolasyonu
- Dependency Injection: .NET Core built-in DI container
- Middleware Pipeline: Global hata yakalama ve authentication
- Context API: Global state management (Auth, Cart, Wishlist, Notification)
- Component-Based: Reusable ve modüler component yapısı
- Custom Hooks: useAuth, useCart, useWishlist, useNotification
- Axios Interceptors: Otomatik token ekleme ve hata yönetimi
- Error Boundary: React error catching pattern
- BCrypt: Password hashing (cost factor: 10)
- JWT: Stateless authentication (24 saat expiration)
- Data Annotations: Model seviyesinde input validasyonu
- Environment Variables: Hassas bilgilerin güvenli saklanması
- CORS Policy: Origin kontrolü
- ASP.NET Core 9.0 Web API
- Entity Framework Core 9.0
- SQL Server / SQL Server LocalDB
- JWT Authentication
- AutoMapper
- BCrypt.Net (Şifre hash)
- MailKit (Email servisi)
- React 18
- React Router v6
- Axios
- Context API (Auth, Cart, Wishlist, Notification)
- CSS3 (Custom styling)
- .NET 9.0 SDK
- Node.js (v18 veya üzeri)
- SQL Server veya SQL Server LocalDB
- Git
- Repository'yi klonlayın:
git clone <repository-url>
cd AutoPartsStore/Backend/AutoPartsStore.API- Bağlantı dizesini ayarlayın:
appsettings.jsondosyasında SQL Server bağlantı dizesini güncelleyin:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=AutoPartsDb;Trusted_Connection=true;TrustServerCertificate=true"
}
}- ÖNEMLI: JWT Secret Key'i ayarlayın:
appsettings.Development.jsondosyasında JWT Key'i bulunur (geliştirme için). Production için environment variable kullanın:
export JWT__KEY="YourProductionSecretKey32CharactersLong!"- Veritabanını oluşturun:
dotnet ef database update- Uygulamayı çalıştırın:
dotnet runBackend API http://localhost:5167 adresinde çalışacaktır.
- Frontend klasörüne gidin:
cd ../../Frontend/client- Environment dosyasını oluşturun:
.envdosyası mevcuttur. İçeriği:
VITE_API_BASE_URL=http://localhost:5167/api- Bağımlılıkları yükleyin:
npm install- Geliştirme sunucusunu başlatın:
npm run devFrontend uygulaması http://localhost:5173 adresinde çalışacaktır.
- Users: Kullanıcı bilgileri ve kimlik doğrulama (Email, Password, Role)
- Products: Ürün katalogu (Name, Price, Stock, Images)
- Categories: Ürün kategorileri (Name, Slug, Description)
- Brands: Araç markaları (Name, Slug, LogoUrl)
- PartBrands: Parça markaları (Name, Slug, LogoUrl)
- Orders: Sipariş bilgileri (OrderNumber, TotalAmount, Status)
- OrderItems: Sipariş detayları (Quantity, Price)
- Reviews: Ürün değerlendirmeleri (Rating 1-5, Comment)
Tüm modeller Data Annotations ile validate edilir!
POST /api/Auth/register- Kullanıcı kaydıPOST /api/Auth/login- Kullanıcı girişiGET /api/Auth/me- Kullanıcı bilgisiPUT /api/Auth/update-profile- Profil güncelleme
GET /api/Products- Tüm ürünleri listeleGET /api/Products/{id}- Ürün detayıGET /api/Products/search?query=- Ürün aramaGET /api/Products/category/{slug}- Kategoriye göre ürünlerGET /api/Products/brand/{slug}- Markaya göre ürünler
GET /api/Orders- Kullanıcının siparişleriPOST /api/Orders- Yeni sipariş oluşturGET /api/Orders/{id}- Sipariş detayı
GET /api/Reviews/product/{productId}- Ürün incelemeleriPOST /api/Reviews- Yorum eklePUT /api/Reviews/{id}- Yorum güncelleDELETE /api/Reviews/{id}- Yorum sil
GET /api/Admin/stats- Dashboard istatistikleriGET /api/Admin/products- Tüm ürünler (admin)POST /api/Admin/products- Ürün eklePUT /api/Admin/products/{id}- Ürün güncelleDELETE /api/Admin/products/{id}- Ürün silGET /api/Admin/orders- Tüm siparişlerPUT /api/Admin/orders/{id}- Sipariş durumu güncelle
Sistem ilk çalıştırıldığında otomatik olarak oluşturulur:
- Email:
admin@autoparts.com - Şifre:
Admin123!
- Email:
test@test.com - Şifre:
Test123!
Email bildirimleri için appsettings.json dosyasında SMTP ayarlarını yapılandırın:
{
"EmailSettings": {
"SmtpServer": "smtp.gmail.com",
"SmtpPort": 587,
"SenderEmail": "your-email@gmail.com",
"SenderName": "AutoParts Store",
"Username": "your-email@gmail.com",
"Password": "your-app-password"
}
}Not: Gmail kullanıyorsanız, 2FA etkinleştirip App Password oluşturmanız gerekir.
AutoPartsStore/
├── Backend/
│ └── AutoPartsStore.API/
│ ├── Controllers/ # API Controllers (Auth, Products, Orders, Admin)
│ ├── Data/ # DbContext ve Seed Data
│ ├── Migrations/ # Entity Framework Migrations
│ ├── Models/ # Entity Models (with Data Annotations validations)
│ ├── Services/ # Business Logic (JwtService, EmailService)
│ ├── Properties/ # Launch settings
│ ├── appsettings.json # Production config (no secrets!)
│ ├── appsettings.Development.json # Development config (JWT Key)
│ ├── Program.cs # Application entry point & middleware
│ └── AutoPartsStore.API.csproj
└── Frontend/
└── client/
├── src/
│ ├── components/ # Reusable components
│ │ ├── Header.jsx
│ │ ├── Footer.jsx
│ │ ├── ErrorBoundary.jsx
│ │ ├── NotificationContainer.jsx
│ │ ├── ProductCard.jsx
│ │ ├── Pagination.jsx
│ │ └── VehicleSearchBar.jsx
│ ├── context/ # React Context (Global State)
│ │ ├── AuthContext.jsx
│ │ ├── CartContext.jsx
│ │ ├── WishlistContext.jsx
│ │ └── NotificationContext.jsx
│ ├── pages/ # Page Components (Home, Products, Cart, etc.)
│ ├── services/ # API Services
│ │ └── api.js # Axios instance with interceptors
│ ├── assets/ # Static assets (images, icons)
│ ├── App.jsx # Main app component
│ ├── App.css # Global styles
│ ├── main.jsx # React entry point
│ ├── index.css # Base CSS
│ └── auth-admin-styles.css # Admin panel styles
├── .env # Environment variables (VITE_API_BASE_URL)
├── package.json
├── vite.config.js
└── index.html
- Ana Sayfa: Öne çıkan ürünler ve kategoriler
- Kategori Sayfası: Kategoriye göre filtrelenmiş ürünler
- Ürün Detay: Ürün bilgileri, yorumlar ve sepete ekleme
- Sepet: Sepet yönetimi ve ödeme
- Profil: Kullanıcı bilgileri ve istatistikler
- Sipariş Geçmişi: Geçmiş siparişler ve detayları
- Favoriler: Favori ürün listesi
- 404 Sayfa: Özel bulunamadı sayfası
- Dashboard: Genel istatistikler (sade beyaz kartlar)
- Ürün Yönetimi: Ürün CRUD işlemleri
- Sipariş Yönetimi: Sipariş durumu güncelleme
# Yeni migration oluştur
dotnet ef migrations add MigrationName
# Veritabanını güncelle
dotnet ef database update
# Veritabanını sıfırla
dotnet ef database drop -f# Production build
npm run build
# Preview production build
npm run preview- ✅ Şifreler BCrypt ile hash'lenir
- ✅ JWT token'lar ile güvenli kimlik doğrulama
- ✅ Role-based authorization (Admin/User)
- ✅ CORS yapılandırması (geliştirme: localhost)
- ✅ Input validasyonu (tüm modellerde Data Annotations)
- ✅ SQL injection koruması (EF Core parametreli sorgular)
- ✅ Global Exception Handler
- ✅ Environment variables ile güvenli konfigürasyon
- ✅ AllowedHosts kısıtlaması
- ✅ Console logging temizlendi (production-safe)
- Lazy loading
- Sayfalama (pagination) - 12 ürün/sayfa
- Index kullanımı
- Response caching
- Optimized database queries
- React Context API ile efficient state management
- Fork edin
- Feature branch oluşturun (
git checkout -b feature/AmazingFeature) - Değişikliklerinizi commit edin (
git commit -m 'Add some AmazingFeature') - Branch'inizi push edin (
git push origin feature/AmazingFeature) - Pull Request oluşturun
Bu proje eğitim amaçlı geliştirilmiştir.
Proje Sahibi - Mustafa Ataklı
Proje Link: https://github.com/mustafaatakli/ParcaMuhendisi-AutoPartsSystem
- Akıllı Ürün Öneri Sistemi (AI Recommender System)
- Yorum Analizi (Sentiment Analysis)
- Akıllı Chatbot (AI Customer Assistant)
- Canlı chat desteği
- Sahte Yorum Tespiti
- Ürün karşılaştırma
- Gelişmiş filtreleme seçenekleri
- PDF fatura oluşturma
- Çoklu dil desteği
- Kampanya ve kupon sistemi
- SMS bildirimleri
- Sosyal medya entegrasyonu
- HttpOnly cookie için token storage
- Password complexity artırma
- Rate limiting
Bu projeyi geliştirirken kullanılan açık kaynak kütüphanelere ve topluluk katkılarına teşekkürler.
A modern, user-friendly and production-ready automotive spare parts e-commerce platform. Built with ASP.NET Core 9.0 Web API backend and React 18 frontend.
Note: This project is built using modern web technologies with security measures implemented and ready for production deployment. All models include validation, global error handling, and secure configuration.
- 95% Production Ready: All critical security measures and error handling implemented
- Comprehensive Validation: Full validation with Data Annotations on 8 entity models
- Modern Architecture: Structure following Clean Architecture principles
- Secure Configuration: Environment variables, JWT secret management
- Error Handling: Global Exception Handler + Error Boundary
- API Documentation: Consistent endpoint structure with RESTful API
- Product Catalog System: Filter by categories and brands
- Advanced Search: Search by product name, brand, and part number
- Cart Management: Real-time cart updates
- Wishlist: Save and manage favorite products (persistent with localStorage)
- User Profile: Profile information and order statistics
- Order History: Detailed view of all orders
- Product Reviews: Star-based rating and comment system
- Notification System: User feedback with toast notifications
- Pagination: Efficient product listing (12 products/page)
- 404 Page: Custom error page
- Error Boundary: React error catching mechanism
- Dashboard: Professional statistics and overview
- Product Management: CRUD operations (Create, Update, Delete)
- Order Management: Order status updates
- Category Management: Create and edit categories
- Brand Management: Manage vehicle and part brands
- Stock Control: Automatic inventory tracking
- Email Notifications: Automatic emails for order confirmations
- JWT Authentication: Secure authentication
- Role-Based Authorization: Admin and user roles
- Responsive Design: Mobile-friendly interface
- Context API: Global state management
- RESTful API: Standard API structure
- Entity Framework Core: ORM and database management
- Global Exception Handler: Centralized error handling
- Model Validations: Data Annotations on all models
- Environment Variables: Secure configuration management
- Entity Framework Core: Database management with Code-First approach
- Repository Pattern: Data access layer abstraction
- DTO Pattern: Layer isolation with data transfer objects
- Dependency Injection: .NET Core built-in DI container
- Middleware Pipeline: Global error catching and authentication
- Context API: Global state management (Auth, Cart, Wishlist, Notification)
- Component-Based: Reusable and modular component structure
- Custom Hooks: useAuth, useCart, useWishlist, useNotification
- Axios Interceptors: Automatic token injection and error handling
- Error Boundary: React error catching pattern
- BCrypt: Password hashing (cost factor: 10)
- JWT: Stateless authentication (24 hour expiration)
- Data Annotations: Model-level input validation
- Environment Variables: Secure storage of sensitive information
- CORS Policy: Origin control
- ASP.NET Core 9.0 Web API
- Entity Framework Core 9.0
- SQL Server / SQL Server LocalDB
- JWT Authentication
- AutoMapper
- BCrypt.Net (Password hashing)
- MailKit (Email service)
- React 18
- React Router v6
- Axios
- Context API (Auth, Cart, Wishlist, Notification)
- CSS3 (Custom styling)
- .NET 9.0 SDK
- Node.js (v18 or higher)
- SQL Server or SQL Server LocalDB
- Git
- Clone the repository:
git clone <repository-url>
cd AutoPartsStore/Backend/AutoPartsStore.API- Configure the connection string:
Update the SQL Server connection string in
appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=AutoPartsDb;Trusted_Connection=true;TrustServerCertificate=true"
}
}- IMPORTANT: Set JWT Secret Key:
JWT Key is in
appsettings.Development.json(for development). For production use environment variable:
export JWT__KEY="YourProductionSecretKey32CharactersLong!"- Create the database:
dotnet ef database update- Run the application:
dotnet runThe Backend API will run at http://localhost:5167.
- Navigate to the frontend folder:
cd ../../Frontend/client- Create environment file:
.envfile exists. Content:
VITE_API_BASE_URL=http://localhost:5167/api- Install dependencies:
npm install- Start the development server:
npm run devThe frontend application will run at http://localhost:5173.
- Users: User information and authentication (Email, Password, Role)
- Products: Product catalog (Name, Price, Stock, Images)
- Categories: Product categories (Name, Slug, Description)
- Brands: Vehicle brands (Name, Slug, LogoUrl)
- PartBrands: Part brands (Name, Slug, LogoUrl)
- Orders: Order information (OrderNumber, TotalAmount, Status)
- OrderItems: Order details (Quantity, Price)
- Reviews: Product reviews (Rating 1-5, Comment)
All models are validated with Data Annotations!
POST /api/Auth/register- User registrationPOST /api/Auth/login- User loginGET /api/Auth/me- Get user infoPUT /api/Auth/update-profile- Update profile
GET /api/Products- List all productsGET /api/Products/{id}- Product detailsGET /api/Products/search?query=- Search productsGET /api/Products/category/{slug}- Products by categoryGET /api/Products/brand/{slug}- Products by brand
GET /api/Orders- User's ordersPOST /api/Orders- Create new orderGET /api/Orders/{id}- Order details
GET /api/Reviews/product/{productId}- Product reviewsPOST /api/Reviews- Add reviewPUT /api/Reviews/{id}- Update reviewDELETE /api/Reviews/{id}- Delete review
GET /api/Admin/stats- Dashboard statisticsGET /api/Admin/products- All products (admin)POST /api/Admin/products- Add productPUT /api/Admin/products/{id}- Update productDELETE /api/Admin/products/{id}- Delete productGET /api/Admin/orders- All ordersPUT /api/Admin/orders/{id}- Update order status
Automatically created on first run:
- Email:
admin@autoparts.com - Password:
Admin123!
- Email:
test@test.com - Password:
Test123!
Configure SMTP settings in appsettings.json for email notifications:
{
"EmailSettings": {
"SmtpServer": "smtp.gmail.com",
"SmtpPort": 587,
"SenderEmail": "your-email@gmail.com",
"SenderName": "AutoParts Store",
"Username": "your-email@gmail.com",
"Password": "your-app-password"
}
}Note: If using Gmail, you need to enable 2FA and create an App Password.
AutoPartsStore/
├── Backend/
│ └── AutoPartsStore.API/
│ ├── Controllers/ # API Controllers (Auth, Products, Orders, Admin)
│ ├── Data/ # DbContext and Seed Data
│ ├── Migrations/ # Entity Framework Migrations
│ ├── Models/ # Entity Models (with Data Annotations validations)
│ ├── Services/ # Business Logic (JwtService, EmailService)
│ ├── Properties/ # Launch settings
│ ├── appsettings.json # Production config (no secrets!)
│ ├── appsettings.Development.json # Development config (JWT Key)
│ ├── Program.cs # Application entry point & middleware
│ └── AutoPartsStore.API.csproj
└── Frontend/
└── client/
├── src/
│ ├── components/ # Reusable components
│ │ ├── Header.jsx
│ │ ├── Footer.jsx
│ │ ├── ErrorBoundary.jsx
│ │ ├── NotificationContainer.jsx
│ │ ├── ProductCard.jsx
│ │ ├── Pagination.jsx
│ │ └── VehicleSearchBar.jsx
│ ├── context/ # React Context (Global State)
│ │ ├── AuthContext.jsx
│ │ ├── CartContext.jsx
│ │ ├── WishlistContext.jsx
│ │ └── NotificationContext.jsx
│ ├── pages/ # Page Components (Home, Products, Cart, etc.)
│ ├── services/ # API Services
│ │ └── api.js # Axios instance with interceptors
│ ├── assets/ # Static assets (images, icons)
│ ├── App.jsx # Main app component
│ ├── App.css # Global styles
│ ├── main.jsx # React entry point
│ ├── index.css # Base CSS
│ └── auth-admin-styles.css # Admin panel styles
├── .env # Environment variables (VITE_API_BASE_URL)
├── package.json
├── vite.config.js
└── index.html
- Home Page: Featured products and categories
- Category Page: Filtered products by category
- Product Detail: Product information, reviews, and add to cart
- Cart: Cart management and checkout
- Profile: User information and statistics
- Order History: Past orders and details
- Wishlist: Favorite product list
- 404 Page: Custom not found page
- Dashboard: General statistics (clean white cards)
- Product Management: Product CRUD operations
- Order Management: Update order status
# Create new migration
dotnet ef migrations add MigrationName
# Update database
dotnet ef database update
# Reset database
dotnet ef database drop -f# Production build
npm run build
# Preview production build
npm run preview- ✅ Passwords are hashed with BCrypt
- ✅ Secure authentication with JWT tokens
- ✅ Role-based authorization (Admin/User)
- ✅ CORS configuration (development: localhost)
- ✅ Input validation (Data Annotations on all models)
- ✅ SQL injection protection (EF Core parameterized queries)
- ✅ Global Exception Handler
- ✅ Secure configuration with environment variables
- ✅ AllowedHosts restriction
- ✅ Console logging cleaned (production-safe)
- Lazy loading
- Pagination - 12 products/page
- Index usage
- Response caching
- Optimized database queries
- Efficient state management with React Context API
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Create a Pull Request
This project was developed for educational purposes.
Project Owner - Mustafa Ataklı
Project Link: https://github.com/mustafaatakli/ParcaMuhendisi-AutoPartsSystem
- AI Recommender System
- Sentiment analysis for comments
- AI Customer Assistant
- Live chat support
- Fake Review Detection
- Product comparison
- Advanced filtering options
- PDF invoice generation
- Multi-language support
- Campaign and coupon system
- SMS notifications
- Social media integration
- HttpOnly cookie for token storage
- Enhanced password complexity
- Rate limiting
Thanks to the open-source libraries and community contributions used in developing this project.
If you liked this project, don't forget to give it a star! ⭐















