Car Rental project with N-Layer Architecture.
Report Bug
·
Request Feature
Specifications
-
Car Operations
- Get all cars
- Get a single car (With filtering option)
- Add a new car
- Edit a car
- Delete a car
-
Car Image Operations
- Get a car image
- Get all image
- Add (Upload) a New Car Image
- Edit a car image
- Delete a car image
-
Brands Operations
- Get all brands
- Get a brand
- Add a brand
- Edit a brand
- Delete a brand
-
Colors Operations
- Get all colors
- Get a color
- Add a color
- Edit a color
- Delete a color
-
Car Image Operations
- Get a car image
- Get all image
- Add (Upload) a New Car Image
- Edit a car image
- Delete a car image
-
Customer Operations
- Get all customer
- Get single customer
- Add a customer
- Edit a customer
- Delete a customer
-
Rental Operations
- Get all rentals
- Get single rental
- Check car is rentable
- Check findeks score sufficiency
- Add a rental
- Edit a rental
- Delete a rental
-
Users Operations
- Get all users
- Get a user
- Get user detail by mail
- Update user detail
- Add a user
- Edit a user
- Delete a user
Authentication
Requests are authenticated using the Authorization header and value Bearer {{token}}. with a valid JWT.
-
Authentication Strategy : JWT
- JWT Expiration : 10 Minutes For Testing Api
-
Registration
- User can register as a "Admin" or simply "User"
- Password Salt
- Password Hash
- Token includes : "id", "email", "name" and "roles"
-
Login
- User can login with "email" and "password"
- Everytime a user login, new Token are sent to to client
-
Operations
- Login
- Register new user
- Check user exist
- Check user is authenticated
-
Operation Claim
- Get a operation claim
- Get all operation claim
- Add a operation claim
- Edit a operation claim
- Delete a operation claim
-
Credit Card Operations (Test)
- Get a credit card
- Get all users (Searching credit card by customer)
- Add a credit card
- Delete a credit card
-
Payment Operation (Test)
- Payment (Fake)
-
Findeks Operations (Test)
- Get all findeks
- Get a findeks
- Searching findeks by customer
- Calculate findeks score (Fake)
Layers
Business Layer created to process or control the incoming information according to the required conditions.
Core layer containing various particles independent of the project.
Data Access Layer created to perform database CRUD operations.
Entities Layer created for database tables.
Web API Layer that opens the business layer to the internet.
Models
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
CarId | Int | False | |
BrandId | int | False | |
ColorId | int | False | |
ModelYear | int | False | |
DailyPrice | int | False | |
Description | nvarchar(MAX) | False | |
MinFindeksScore | smallint | True | ((0)) |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
BrandId | int | False | |
BrandName | nvarchar(MAX) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
ColorId | int | False | |
ColorName | nvarchar(MAX) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
CarImageId | int | False | |
CarId | int | False | |
ImagePath | nvarchar(MAX) | False | |
Date | datetime | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
CreditsCardsId | int | False | |
CustomerId | int | False | |
NameSurname | nvarchar(100) | False | |
CardNumber | nvarchar(25) | False | |
ExpMonth | tinyint | False | |
ExpYear | tinyint | False | |
Cvc | nvarchar(3) | False | |
CardType | nvarchar(20) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
CustomerId | int | False | |
UserId | int | False | |
CompanyName | nvarchar(MAX) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
FindeksId | int | False | |
CustomerId | int | False | |
[NationalIdentity] | nvarchar(50) | False | |
Score | smallint | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
OperationClaimId | int | False | |
Name | nvarchar(MAX) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
UserOperationClaimId | int | False | |
UserId | int | False | |
OperationClaimId | int | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
UserId | int | False | |
FirstName | nvarchar(MAX) | False | |
LastName | nvarchar(MAX) | False | |
nvarchar(MAX) | False | ||
PasswordSalt | varbinary(MAX) | False | |
PasswordHash | varbinary(MAX) | False | |
Status | bit | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
PaymentId | int | False | |
Amount | money | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
RentalId | int | False | |
CarId | int | False | |
CustomerId | int | False | |
RentDate | date | False | |
RentDate | date | True |
Finaly..
It is a cross platform project.
It has 'Business', 'Data Access', 'Core', 'Entities' layers and is designed in accordance with the 'SOLID' principles.
'Autofac' has been injected as 'IoC'.
'Fluent Validation' is in use for 'Validation' controls.
Written 'MiddlewareExceptionExtension' for 'Exception'.
I'm constantly adding new extensions to my project, stay tuned!