Project for rental movies in order to handle user who rental movies
-
Only users with admin role are allowed to perform the following actions:
- Add a movie
- Modify a movie
- Remove a movie
- Delete a movie
-
Movies must have a title, description, at least one image, stock, rental price, sale price and availability.
-
Availability is a field of movies, which may only be modified by an admin role.
-
Save a log of the title, rental price and sale price updates for a movie.
-
Users can rent and buy a movie. For renting functionality you must keep track when the user have to return the movie and apply a monetary penalty if there is a delay.
-
Keep a log of all rentals and purchases (who bought, how many, when).
-
Users can like movies.
-
As an admin I’m able to see all movies and filtering by availability/unavailability.
-
As an user I’m able to see only the available movies for renting or buying.
-
The list must be sortable by title (default), and by popularity (likes).
-
The list must have pagination functionality.
-
Search through the movies by name.
- Add login/logout functionality.Preferably JWT.
- Only admins can add/modify/remove movies.
- Only logged in users can rent and buy movies.
- Only logged in users can like movies.
- Everyone (authenticated or not) can get the list of movies.
- Everyone (authenticated or not) can get the detail of a movie.
- Publish your work using heroku andsharethe link with us.
- Recovery and forgot password functionality (send email).
- Confirming account (send email)
- Build a small frontend app and connecting to the API.
- As an user with admin role I want to be able to change the role of any user.
- Unit test, at least 80% of coverage.
- Include a dockerfile for production deployments.
-Mediator
-Clean Architecture
-Dependency Injection
-DDD
-.Net Core 3.1
-EF Core
-MediatR
-Automapper
-Fluent API
-XUnit
-FakeItEasy
-MailKit
-Swashbuckle
-Identity
-FLuentAssertions
-
Clone the repository
-
Database Migrations: If you want to add new changes in the database:
- To use dotnet-ef for your migrations please add the following flags to your command (values assume you are executing from repository root)
- For example, to add a new migration from the root folder: - dotnet ef migrations add "InitMigration" --project src\RentalMovies.Infrastructure --startup-project src\RentalMovies.Presentation --output-dir Data\Migrations
- or you can do the following: Move to the project src\RentalMovies.Infrastructure with PowerShell and then execute the following: 1) dotnet ef migrations add "InitMigration" --startup-project ..\RentalMovies.Presentation\ --output-dir .\Data\Migrations
- If you want to install the database: Move to the root folder ot the project, and execute the following command: - dotnet ef database update --project src\RentalMovies.Infrastructure\ --startup-project src\RentalMovies.Presentation
-
Run the API To run the API you can move to the project RentalMovies.Presentation with PowerShell with administration privilegies and then execute the following command:
- dotnet run
To watch the API you can go to the url https://localhost:5001/swagger Example: