Skip to content

semihshn/RentaCar-Back-End

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


ReCapProject

Car Rental project with N-Layer Architecture.



In this project, we created a website for car rental using Asp.net Web API + Angular, in fact, we created a platform for the car rental industry, car rental companies will be able to register on our site and reach more customers, customers will be able to rent a car at a cheaper price.

Techs
  1. Back-End
    • Restful Web Api Vers. .Net Core 3.1
    • Multi-Layer Architecture
    • Interceptor
    • Cache Aspect
    • Transaction Aspect
    • Performance Aspect
    • Validation Aspect(Fluent Validation)
    • Authorization
    • Authentication
    • Autofac
    • Json Web Token Managment
    • Async Programing
    • Cross Cutting Concerns
    • SOLID
  2. Front-End
    • Angular 11
    • Bootstrap 5.0
    • HttpClient Interceptor
    • Guards
    • Pipes
    • Directives

About The Project

Built With

C-Sharp Asp-net MSSQL Entity-Framework Autofac Fluent-Validation
TypeScript Angular Bootstrap

Models

Cars

Name Data Type Allow Nulls Default
Id int False
Name nvarchar(50) False
BrandId int False
ColorId int False
ModelId int False
DailyPrice decimal(18,0) False
ModelYear smallint False
Description nvarchar(50) True

Car Images

Name Data Type Allow Nulls Default
Id int False
CarId int False
ImagePath nvarchar(MAX) False
Date datetime False

Brands

Name Data Type Allow Nulls Default
Id int False
Name nvarchar(25) False

Models

Name Data Type Allow Nulls Default
Id int False
Name nvarchar(25) False

Color

Name Data Type Allow Nulls Default
Id int False
Name nvarchar(25) False

Customer

Name Data Type Allow Nulls Default
Id int False
UserId int False
CompanyName nchar(50) True

Rental

Name Data Type Allow Nulls Default
Id int False
CarId int False
CustomerId int False
RentDate datetime True
ReturnDate datetime True

Users

Name Data Type Allow Nulls Default
Id int False
FirstName nvarchar(50) False
LastName nvarchar(50) False
Email nvarchar(50) False
PasswordHash varbinary(500) False
PasswordSalt varbinary(500) False
Status bit False

OperationClaims

Name Data Type Allow Nulls Default
Id int False
Name varchar(250) False

UserOperationClaims

Name Data Type Allow Nulls Default
Id int False
UserId int False
OperationClaimId int False

Layers

Business

We write our workloads on this layer. This layer is the layer that will process the data that has been pulled into the project by Data Access. We do not use the Data Access layer directly in our applications. By putting the Business layer together, we make Business do it for us. The data from the user first goes to the Business layer, and then is processed and transferred to the Data Access layer. In the business tier, we also specify who will access this data. For example, there is R&D and HR section. We want the R&D department to add to the database, but if we want the HR department to only pull the data, we do this in the Business Layer.

Core

In this layer, we have base classes that all projects can use in common.

DataAccess

Only database operations are performed in this layer. The task of this layer is to add, delete, update and extract data from the database. No other action is taken in this layer other than these operations.

Entities

In this layer, we determine our main classes that we will use throughout the project, so this is where we determine our real objects. Here, we match the objects we have determined with the objects registered in the database.

WebAPI

Web API Layer that opens the business layer to the internet.

Türkçe Açıklama

Proje SOLID, Kurumsal Yazılım Mimari, AOP ve Yazılım Geliştirme Prensiplerine uygun geliştirildi.

  • .Net Core 3.1 platformu ile geliştirildi.

  • Cross Cutting Concerns "kesişen ilgililer" *interceptor Autofac kütüphanesi kullanılarak geliştirildi.

    • Performance
    • Transaction
    • Validation
    • Caching
  • Entity Framework ORM kullanılarak geliştirildi.

  • AOP ile Cross Cutting Concerns "kesişen ilgililer" projede modülarite yapıda geliştirildi.

  • Exception Middleware ile Merkezi hata mekanizması geliştrildi.

  • Claim Mekanizması ile rol bazlı yetkilendirmenin sınırları esnetildi.

  • JWT (JSON Web Token) kimlik doğrulaması entegre edildi.

  • Fluent Validation ile validasyon(doğrulama) işlemleri geliştirildi.

  • IoC(Inversion Of Control) ile (loose coupling) olan nesneler oluşturuldu.

  • REST VE RESTFUL WEB SERVİS ile sunucu-istemci iletişimi sağlandı.

C# Backend Katmanlar

  • Core: Toolların diğer projelerde kullanılmasını sağlayan genel bir katmandır.
  • Entities: Veritabanındaki tabloları nesneye dönüştürdüğümüz katman.
  • DataAccess: Veritabanı işlemlerini yaptığımız katman.
  • Business:İş kurallarımızı geliştirdiğimiz katman.
  • WebAPI: Restful (Representational State Transfer) HTTP protokolü ile sunucu-istemci iletişimi sağladığımız katman.

Contact

Semih Şahan - semihshn.rf.gd

Linkedin - Linkedin

Project Link: https://github.com/semihshn/RentaCar-Back-end

Acknowledgements

  • engindemirog

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published