Skip to content

N-Layer Architecture Car Rental project with NetCore.

License

Notifications You must be signed in to change notification settings

slmctnky/ReCapProject

 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


ReCap Project

ReCapProject

Car Rental project with N-Layer Architecture.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Usage
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgements

About The Project

Built With

C-Sharp Asp-net MSSQL Entity-Framework Autofac Fluent-Validation

Usage

Specifications

Toggle Content

Cars

Public Operations

  • List all cars
    • Searching Cars By Brand, Color
    • Caching
  • Get a single car
    • Caching

Private Operations

  • Ask (Create) a New Car
    • Authenticated users only (Logged In Users)
    • Field validation
  • Edit a Question
    • Authenticated users only (Logged In Users)
    • Field Validation
  • Delete a Question
    • Authenticated users only (Logged In Users)

Car Images

Public Operations

  • List all car images
  • Get a car image
    • Searching Car Image By Car
    • Caching

Private Operations

  • Ask (Create) a New Car Image
    • Authenticated users only (Logged In Users)
  • Edit a Car Image
    • Authenticated users only (Logged In Users)
  • Delete a Car Image
    • Authenticated users only (Logged In Users)

Brands

Public Operations

  • Get All Brands
  • Get Single Brand

Private Operations

  • Add (Create) a New Answer To Question
    • Authenticated users only (Logged In Users)
  • Edit a Answer
    • Authenticated users only (Logged In Users)
  • Delete a Answer
    • Authenticated users only (Logged In Users)

Color

Public Operations

  • Get All Colors
  • Get Single Color

Private Operations

  • Add (Create) a Color
    • Authenticated users only (Logged In Users)
  • Edit a Color
    • Authenticated users only (Logged In Users)
  • Delete a Color
    • Authenticated users only (Logged In Users)

Customer

Public Operations

  • Get All Customers
  • Get Single Customer

Private Operations

  • Add (Create) a Customer
    • Authenticated users only (Logged In Users)
  • Edit a Customer
    • Authenticated users only (Logged In Users)
  • Delete a Customer
    • Authenticated users only (Logged In Users)

Rental

Public Operations

  • Get All Rentals
  • Get Single Rental

Private Operations

  • Add (Create) a Rental
    • Authenticated users only (Logged In Users)
  • Edit a Rental
    • Authenticated users only (Logged In Users)
  • Delete a Rental
    • Authenticated users only (Logged In Users)

Users

Public Operations

  • List all Users
  • Get a User
  • Add (Create) a User

Private Operations

  • Edit a User
    • Authenticated users only (Logged In Users)
  • Delete a User
    • Authenticated users only (Logged In Users)

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

Models

User

Name Data Type Allow Nulls Default
Id int False
Name nvarchar(50) False
BrandId int False
ColorId 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

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

Business Layer created to process or control the incoming information according to the required conditions.

Core

Core layer containing various particles independent of the project.

DataAccess

Data Access Layer created to perform database CRUD operations.

Entities

Entities Layer created for database tables.

WebAPI

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

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Ahmet ÇETİNKAYA - ahmetcetinkaya.info

Project Link: https://github.com/ahmet-cetinkaya/ReCapProject

Acknowledgements

  • engindemirog

About

N-Layer Architecture Car Rental project with NetCore.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 96.6%
  • TSQL 3.4%