This project is an API to manage Movies Catalog.
-Mediator
-Clean Architecture
-Dependency Injection
-.Net Core 3.1
-EF Core
-MediatR
-Automapper
-Fluent API
-XUnit
-Swagger
-Identity
-FluentValidation
-Azure Blob Storage to upload images
-Azure Sql Server
-Azure in the deployment.
-FLuentAssertions in the Integration Tests
-Ef Migrations.
-Redis Cache.
You can see all of the functionality of the API deployed here https://moviescatalog-api.azurewebsites.net/swagger/
- Clone the repository
- Database Migrations:
All the migration database are already added to Azure Sql Server using Database migration and the project is pointed properly in the connection but if you want to verify
you can update or install the database doing the following:
- Move to the root folder ot the project, and execute the following command: - dotnet ef database update --project src\Movies.Infrastructure\ --startup-project src\Movies.API
- To run the API you can move to the project Movies.API with PowerShell with administration privilegies and then execute the following command: dotnet run
- Now you can see the API in this URL: https://localhost:5001/swagger/
-
After you cloned the repository, also, you can run the API using docker. You can do it in a local environment typing the following commands:
docker build -f .\src\Movies.API\Dockerfile -t moviesapi .
-
Then you have run the container built with docker locally with the following command:
docker run -it -p 80:80 -d moviesapi
-
When all the compilation is completed you can see the docker container in a local way using this URL: http://localhost:80/swagger/
Admin
Username: apiadmin@test.com
Password: Tester@01
Regular User
Username: user1@test.com
Password: Tester@01
Here are screenshots with all the functionalities of the API:
First View of the API:
Get all movies catalog without authentication:
Login to the API with using the Admin user:
Authenticate in the API with the Admin user token provided:
Rate movie with authenticated user:
Rates by user who only admin has access:
Created movie who only admin has access:
Updated movie who only admin has access: