Skip to content

ever1509/Ravn-Challenge-Backend-Ever-Orellana

Repository files navigation

Ravn-Challenge-Backend-Ever-Orellana

This project is an API to manage Movies Catalog.

Solution

Architecture and Design Implemented:

-Mediator
-Clean Architecture
-Dependency Injection

Frameworks, Package and Tools:

-.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.

Environment Deployed in Azure

You can see all of the functionality of the API deployed here https://moviescatalog-api.azurewebsites.net/swagger/

Setup Locally

(First Way) Using dotnet commands:

  1. Clone the repository
  2. 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
  3. 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
  4. Now you can see the API in this URL: https://localhost:5001/swagger/

(Another way) You can run the API with Docker:

  1. 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 .

  2. Then you have run the container built with docker locally with the following command:

    docker run -it -p 80:80 -d moviesapi

  3. When all the compilation is completed you can see the docker container in a local way using this URL: http://localhost:80/swagger/

Users added in the API

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:
alt text

Get all movies catalog without authentication:
alt text Login to the API with using the Admin user:
alt text

Authenticate in the API with the Admin user token provided:
alt text

Rate movie with authenticated user:
alt text

Rates by user who only admin has access:
alt text

Created movie who only admin has access:
alt text

Updated movie who only admin has access:
alt text

Deleted movie who only admin has access:
alt text

Uploaded image movie who only admin has access:
alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published