Skip to content

Movie web-service application built using a microservices architecture following Clean Architecture, CQRS and Mediator patterns with communicating over Event Driven Communication.

License

Notifications You must be signed in to change notification settings

ilyam3004/Watchwise

Repository files navigation

Watchwise

This application is built using a microservices architecture following Clean Architecture, CQRS and Mediator patterns with communicating over Event Driven Communication.

Table of Contents

  1. Introduction
  2. Features
  3. Technologies
  4. Architecture
  5. Installation
  6. Usage
  7. API Documentation
  8. Contributing
  9. License

Introduction

The Watchwise is designed to provide users with a seamless experience to search information about movies, manage personalized watchlists, and receive recommendations based on their preferences. The application is structured using a microservices architecture to ensure scalability, maintainability, and flexibility in the development process. The application consists of 4 main components: UserService, WatchlistService, MovieService, and WebClient. The backend microservices (UserService, WatchlistService, and MovieService) are developed using .NET and the frontend (WebClient) is built using Angular 16.

Features

  • Movie Search: Users can search for movies and view detailed information about each movie.
  • Watchlists: Users can create and manage personalized watchlists, adding or removing movies as they desire.
  • Watchlist Recommendations: The application offers movie recommendations based on user preferences.
  • User Authentication: Users can sign up and log in to access personalized features.

Technologies

Architecture

So, let's talk more about architecture of Watchwise. Here is a final architecture of the system:

Watchwise Architecture

  • UserService: This microservice handles user authentication and user-related functionalities. It includes:

    • ASP.NET Core Web API application
    • Connection to containerized PostgreSQL database
    • REST API principles, CRUD operations
    • 3-Layered implementation
    • Repository pattern
    • Dockerfile and docker-compose implementation
    • Configurations for handling messages using MassTransit and RabbitMQ and sending response-messages
  • WatchlistService: The Watchlist microservice is responsible for managing user watchlists. It allows users to create new watchlists, add or remove movies from existing watchlists.

    • ASP.NET Core Web API application
    • Connection to containerized MongoDB database
    • REST API principles, CRUD operations
    • Implementing CQRS and Clean Architecture principles
    • Developing CQRS using MediatR , FluentValidation and AutoMapper packages
    • Repository pattern
    • Dockerfile and docker-compose implementation
    • Configurations for sending, handling messages using MassTransit and RabbitMQ.
  • MovieService: The Movie microservice provides movie-related functionalities, including movie search, retrieving detailed information about movies. It includes:

    • ASP.NET Core Web API application
    • Connection to The Movie Database API (TMDB)
    • REST API principles
    • Dockerfile and docker-compose implementation
    • Configurations for sending messages using MassTransit and RabbitMQ.
  • API Gateway: The API Gateway is a central entry point for this application. It acts as an intermediary between the frontend WebUI and the backend microservices, providing a unified and simplified interface for the client-side applications to interact with the various services. The API Gateway includes:

    • Implementing API Gateway routing with Ocelot
    • Dockerfile and docker-compose implementation
  • WebUI: The WebUI is the frontend component of the application, developed using Angular 16. It provides the user interface for users to interact with the application and consume data from the microservices. Key features of the WebUI include:

    • User Authentication: Allowing users to sign up, log in, and manage their accounts securely.
    • Movie Search: Enabling users to search for movies and view a list of relevant results based on their queries.
    • Movie Details: Displaying detailed information about selected movies, including ratings, budget, movie genres, trailers, similar movies etc.
    • Watchlist Management: Allowing users to create new watchlists and add/remove movies from their existing watchlists.
    • Interaction with Backend Services: Communicating with the API Gateway to access the backend microservices and retrieve data or perform actions.
    • Error Handling: Providing informative error messages and feedback to users in case of issues or failures

The combination of the API Gateway and WebUI allows for a seamless user experience, decoupling the frontend from the microservices complexity, and providing a scalable and maintainable architecture for the entire application.

Installation

This section provides step-by-step instructions for launching Watchwise using Docker Compose for managing containers.

Prerequisites

Install Docker Desktop: Follow the official documentation to install Docker and Docker-Compose for your operating system.

Steps to Install and Run Watchwise

  1. Clone the Repository:
   git clone https://github.com/ilyam3004/Watchwise.git
   cd Watchwise
  1. Set TMDB API key in docker-compose.yml file:
   movie-service:
    environment:
      - TMDB_API_KEY=YOUR_API_KEY
  1. Then run docker-desktop and build docker images:
docker-compose build
  1. Run docker containers:
docker-compose up
  1. Access the application at http://localhost:4200/

  2. To stop the application and remove containers run this:

   docker-compose down

Support

If you are having problems, please let me know by raising a new issue.

Contributing

To start contributing, follow these steps:

  1. Fork the Repository: Click the "Fork" button on the top right corner of this repository to create your copy.

  2. Clone the Repository: Clone the repository to your local machine using git clone.

git clone https://github.com/ilyam3004/Watchwise.git
cd Watchwise
  1. Create a New Branch: Before making any changes, create a new branch for your work.
git checkout -b feature/your-feature-name
  1. Make Changes: Implement your changes or additions to the codebase or documentation.

  2. Commit and Push: Commit your changes and push them to your forked repository.

git add .
git commit -m "Brief description of your changes"
git push origin feature/your-feature-name
  1. Submit a Pull Request: Go to the original repository and click on "New Pull Request." Provide a clear description of your changes and submit the pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Movie web-service application built using a microservices architecture following Clean Architecture, CQRS and Mediator patterns with communicating over Event Driven Communication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published