A robust and scalable RESTful API for managing intercity bus reservations, built with .NET 8 and Clean Architecture principles. This project demonstrates advanced backend concepts such as concurrency handling, background jobs, and complex business validation rules.
- Project Overview
- Architecture
- Technologies & Tools
- Key Features
- Getting Started
- Database Structure
- Team & Workflow
This system is designed to handle the core operations of a bus ticketing platform. It solves real-world problems like:
- preventing double-booking (Race Condition),
- managing gender-based seating restrictions,
- and automating reservation cancellations for unpaid tickets.
The solution follows the Clean Architecture (Onion Architecture) pattern to ensure separation of concerns and testability.
BusBookingSystem.sln ├── 1. Core (Domain) # Entities, Enums, Interfaces (No dependencies) ├── 2. Infrastructure # EF Core, Database Context, Migrations ├── 3. Application # Business Logic, DTOs, Services, Validators └── 4. API (Presentation) # Controllers, Middleware, Entry Point
main: Canlı (Production) kod. Buraya doğrudanpushYASAKTIR.develop: Ana geliştirme ve entegrasyon dalıdır. Tüm PR'lar bu dalı hedefler.feature/[görev-adı]: Bireysel görev ve özellik geliştirme dallarıdır.
Yeni bir göreve başlarken ve bitirirken şu adımları izleyin:
- Güncel Kodu Çek: Her zaman
developdalından başlayın ve güncelleyin:git checkout develop git pull origin develop
- Yeni Dal Aç: Görevinize özel bir dal açın:
git checkout -b feature/otobus-ekleme
- Kaydet (Commit): Çalışmalarınızı düzenli olarak kaydedin:
git add . git commit -m "feat: [Yapılan işin özeti]"
- Paylaş (Push): Kodu kendi dalınıza yükleyin:
git push -u origin feature/otobus-ekleme
- Birleştirme (PR): İşiniz bittiğinde GitHub üzerinden
developdalına Pull Request açın.
Veritabanı şeması değişikliklerinde (Migration), çakışmayı önlemek için disiplin şarttır:
- Migration Oluşturma:
dotnet ef migrations add [İsim]komutu YALNIZCA DB Master tarafından çalıştırılır. - Senkronizasyon: DB Master
develop'a birleştirme yaptıktan sonra, tüm ekip üyeleri çalışmaya devam etmeden önce mutlakagit pullyapmalıdır.