Skip to content

A REST API using NodeJS, Express and Typescript. This project creates a car rental service API.

Notifications You must be signed in to change notification settings

Bujira/ignite-rentalx

Repository files navigation

rentalx

RentalX: Car Rental App

A REST API using NodeJS, TypeScript, Express, TypeORM and Postgres. Other technologies employed are: jsonwebtoken, swagger, tsyringe, uuid, jest and others!

  • RF => Functional Requisites
  • RNF => Non Functional Requisites
  • RN => Business Rules

Registering a Car

RF

  • It should be possible to register a new car in the database.

RN

  • Should not be possible to register more than one car with the same license plate.
  • Every car should be registered as available for rental by default.
  • Only admin users can register a car.

Listing Registered Cars

RF

  • It should be possible to list all available cars.
  • It should be possible to list all available cars by name.
  • It should be possible to list all available cars by category.
  • It should be possible to list all available cars by brand.

RN An user does not need to be logged in to list all available cars.

Registering Car Specifications

RF

  • It should be possible to register a new specification for a car.

RN

  • Should not be able to register a specification for a non existing car.
  • Should not be able to register an existing specification for the same car.
  • Only admin users can register a specification for a car.

Registering Car Images

RF

  • It should be possible to register a new image for a car.

RNF

  • Use multer for uploading files.

RN Should not be able to register an image for a non existing car. It should be possible to register multiple images for the same car.

  • Only admin users can register an image for a car.

Renting a Car

RF

  • It should be possible to register a new car rental.

RN

  • The minimun duration of a rental must be 24 hours.
  • Should not be able to register a new car rental for an user already renting a car.
  • Should not be able to register a new car rental for a non available car.
  • Once a rental is created, the car status should change to unavailable.

Returning a Car

RF

  • It should be possible to return a car.

RN

  • If a car is returned within 24 hrs, a full 24hrs fee must be charged.
  • Once returned, the car must be set as available for rent.
  • Once returned, the user must be listed with no current rental.
  • Once returned, the total amount due must be calculated.
  • If the car is returned after the expected date, a fee must be calculated according to the number of late days.
  • If the car is returned after the expected date, the calculated fee must be added to the total.
  • User must be logged in to return a car.

Listing User Rentals

RF

  • It should be possible lo list an user's rentals.

RN

  • User must be logged in to lis his rentals.

Password Revocery

RF

  • It should be able to recover a misplaced password with an user's email
  • It should be able to send an e-mail to the user with a step-by-step guide to revocer the password
  • It should be able to let the user create a new password

RN

  • User must provide a new password
  • The recovery link must expire after 3 hours

About

A REST API using NodeJS, Express and Typescript. This project creates a car rental service API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published