RenteX

Bernardo Generoso License

This project already exist, but this time has been created with Web Api ASP.Net Core using C#

Link for the other project RentX;

Content created by Rocketseat;

Start project

Setup appsettings.Development.json or appsettings.json

  1. Setting Environment variables -> /API/appsettings.json
    {
       ...other code,
       "ConnectionStrings": {
          "DefaultConnection": "Server=localhost; Port=5432; User Id=postgres; Password=pass; Database=RentX"
       },
       "Mail": {
          "Host": "smtp.gmail.com",
          "Email": "example@gmail.com",
          "Port": 587,
          "User": "example@gmail.com",
          "Password": "pass"
       },
       "TokenKey": "super secret key"
    }
  2. API routes
    1. Users
      • [GET] user -> /account
        • [Authorize] -> Bearer token
      • [GET] resend email confirmation link -> /account/resendEmailConfirmationLink
        • Params -> email
      • [POST] login -> /account/login
        • Body -> email, password
      • [POST] register -> /account/register
        • Body -> displayName, username, email, password
      • [POST] upload avatar -> /account/image
        • [Authorize] -> Bearer token
        • Body(form-data) -> File
      • [POST] verify email -> /account/verifyEmail
        • Params -> token, email
      • [POST] refresh token -> /account/refreshToken
        • [Authorize] -> Bearer token
        • Headers -> Cookie -> refreshToken=...
    2. Cars
      1. Car /car
        • [GET] cars -> / - Params -> search1
        • [POST] create car -> / - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Body -> plate, brand, model, color, year, fuel, transmission, doors, seats, pricePerDay, detail - maxSpeed, topSpeed, acceleration, weight, hp
        • [PUT] update car -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Body -> brand, model, color, year, fuel, transmission, doors, seats, pricePerDay
        • [DELETE] delete car -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin
        • [GET] user favorite car -> /favorite - [Authorize] -> Bearer token
      2. Car details -> /details
        • [GET] details -> /{plate}
      3. Car images -> /image
        • [POST] upload image -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Body(form-data) -> File
        • [POST] set main image -> /{plate}/setMain - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Params -> imageName
        • [DELETE] delete image -> /{plate} - [Authorize] -> Bearer token - [Admin] -> User with permissions of admin - Params -> imageName
      4. Car appointments -> /appointments
        • [POST] create appointment -> /{plate} - [Authorize] -> Bearer token - Body -> startDate, endDate
        • [GET] user scheduled -> /scheduled - [Authorize] -> Bearer token
        • [GET] between dates -> /between-dates - Params -> startDate, endDate, startPricePerDay, endPricePerDay, fuel, transmission
        • [DELETE] delete appointment -> /{plate} - [Authorize] -> Bearer token

💻 Authors

Bernardo Generoso
Bernardo Generoso

@bernardogeneroso
💻
Rocketseat
Rocketseat

@Rocketseat
🚀

📕 License

This project is under a license MIT.

Footnotes

  1. This search work with brand and model ↩