Skip to content

calebhenry/MovieManager

Repository files navigation

Movie Manager - Stackoverflow-ers

Welcome to Movie Manager, a powerful application for managing movies, reviews, users, carts, and tickets. This project allows users to browse movies, purchase tickets, and leave reviews.

Features

  • Movie Management: Add, edit, and remove movies from the database.
  • User System: Users can register, update profiles, and securely log in.
  • Ticketing: Add tickets to your cart, remove them, and make payments.
  • Review System: Users can leave reviews, add comments, and like/dislike them.
  • Payment Processing: Secure payment system for ticket purchases.
  • Cart Functionality: Users can add and remove items from their cart.

Technologies Used

  • C# (Back-End Language)
  • ASP.NET Core (Web API)
  • Entity Framework Core (Database Management)
  • SQL Server (Database)
  • Swagger (API Documentation)
  • Postman (API Testing)
  • Azure Data Studio/SQL Server Management Studio (Database Development)

Installation and set up

  1. Install SQL Server Managment Studio
  2. Install Node.js (npm version 10.8.2 and Node version v20.18.0 is known to work, other versions do not)
  3. Install Visual Studio and the ASAP.NET and .NET 8 Runtime (Long Term Support) components (must be .NET 8, not 9).
  4. Install Dotnet
  5. Install SQL Server Express. In the installer, select the basic install. You can connect to the server in SQL Server Managment Studio by selecting the server in the "server name" dropdown, selecting "optional" for encryption, and checking the "trust server certificate" box.
  6. In SQL Server Managment Studio, right click on the databases folder icon and create a new database called "Movies".
  7. Right click on the Movies db icon and run the following query (don't need to add your password if you followed these directions). Add ";TrustServerCertificate=True" to the end of the result and save it as your connection string.

    select 'data source=' + @@servername + ';initial catalog=' + db_name() + case type_desc when 'WINDOWS_LOGIN' then ';trusted_connection=true' else ';user id=' + suser_name() + ';password=' end as ConnectionString from sys.server_principals where name = suser_name()
  8. Clone the repo somewhere.
  9. Open MovieManager.sln in the root of the repo in Visual Studio. Click the prompt to install the required components.
  10. Open MovieRepository.cs in MovieManager.Server/Repositories, find and replace "System.Environment.GetEnvironmentVariable("movieDb")" with "@"your connection string here"" (outer quotations in each is not included and actually add your connection string)
  11. dotnet tool install --global dotnet-ef
  12. dotnet add package Microsoft.EntityFrameworkCore.Design
  13. Inside MovieManager.Server, delete the .bin directory and run: dotnet add package Microsoft.EntityFrameworkCore.SqlServer
  14. Then run: dotnet ef database update
  15. You can then optionally undo the find and replace you did MovieRepository.cs. If you do revert it, make sure to set an environment variable containing your connection string called "movieDb" in your runtime configuration in VS.
  16. In visual studio, right click on moviemanager.client and click "Reload with dependencies" if it says application is not installed. Then build and run the project.
  17. Click trust/yes on all the certificate warnings.
  18. The database comes preseeded with some values. In order to view the movie manager screen, you must login as an admin account. By default, one will be included with the seeding. It will have the username 'admin' and the password 'admin'. All other functionality can be accessed by a normal account you create through signup.

Endpoint Changes

In order to accommodate for changes made during development, some of the endpoints had to have slight changes made. They mostly consist of changes involving tickets (each of our ticket objects represents a showtime), using an object id in an endpoint instead of the object, and using DTOs because they are good practice with controllers. All of these are documented below, and all required endpoints are present.

  • ProcessPayment: This endpoint has had additional parameters for address added to match one of the shown use cases.
  • AddTicketsToMovie: Our ticket object already contains the movie id and quantity, as well as additional information like the showing date. This means that the endpoint takes in a ticket object instead to ensure the correct information is included.
  • RemoveTicketsFromMovie: Because our front end may not necessarily have access to the full movie object at all times, this endpoint uses movie id instead.
  • EditTickets: This takes in a movie id for the same reason, as well as a ticket DTO to avoid unnecessary information.
  • AddReview: Our review object already contains the movie, so it does not need that as a parameter. In addition, it returns an integer id so the front end can track the new object.
  • EditReview: This takes in a DTO containing the original id and the new object to avoid attaching unneeded user data.
  • GetReviews: This takes in a movie id instead of an object for the reasons outlined above.
  • EditMovie: Similar to edit review, it uses a movie DTO.

Developers

  • Tessa Neal - Technical Design Analyst
  • Jacob Schatzle - Developer Analyst
  • Carolina Turner - Developer Analyst
  • Dylan Johnson - Developer Analyst
  • Caleb Henry - Test Analyst
  • Kayly Tran - Scrum Analyst

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors