The Spring Boot MovieAPI Backend is a robust Java 17 application designed to manage movie data efficiently. It incorporates a well-structured database schema backed by MySQL, along with essential REST APIs for CRUD operations, search, filtering, sorting, and pagination. The application also prioritizes security using JWT-based authentication. 🎥🍿
- ☕ Java 17
- 🍃 Spring Boot
- 🌐 Spring MVC
- 🛢️ Spring Data JPA
- 📑 Pagination and Sorting
- 🔐 JWT Authentication
- 🐬 MySQL Database
- Create, Read, Update, and Delete (CRUD) operations for movies.
- Ensures data integrity with efficient database interactions.
- 🔍 Search movies by name.
- 🎭 Filter movies by director, cast, release year, and genre.
- 📅 Sort movies by release date or name.
- 📑 Efficient pagination for large datasets.
- 📊 Sorting support for better data retrieval and organization.
- 🔐 Secure access to APIs using JSON Web Token (JWT) authentication.
- 🛡️ Ensures only authorized users can perform sensitive operations.
- 🏗️ Separation of concerns with presentation, business logic, and data access layers.
- 📂 Enhances maintainability, scalability, and testing.
-
🔗 Add Movie:
POST http://localhost:8080/api/v1/movie/add-movie
-
🔍 Get All Movies:
GET http://localhost:8080/api/v1/movie/all
-
🔍 Get Movie by ID:
GET http://localhost:8080/api/v1/movie/{id}
-
🔄 Update Movie by ID:
PUT http://localhost:8080/api/v1/movie/update/{id}
-
❌ Delete Movie by ID:
DELETE http://localhost:8080/api/v1/movie/delete/{id}
-
🔍 Search Movies by Name:
GET http://localhost:8080/api/v1/movie/search?name={movieName}
-
🎭 Filter by Director, Cast, Year, or Genre:
GET http://localhost:8080/api/v1/movie/search?director={directorName}GET http://localhost:8080/api/v1/movie/search?cast={castName}GET http://localhost:8080/api/v1/movie/search?year={releaseYear}GET http://localhost:8080/api/v1/movie/search?genre={genre}
-
📊 Sort by Release Date or Name:
GET http://localhost:8080/api/v1/movie/allMoviesPageSort?sortBy=releaseDateGET http://localhost:8080/api/v1/movie/allMoviesPageSort?sortBy=name
-
📑 Get Movies with Pagination:
GET http://localhost:8080/api/v1/movie/allMoviesPage?pageNumber=0&pageSize=2
-
📝 User Registration:
POST http://localhost:8080/api/v1/auth/register
-
🔒 User Login:
POST http://localhost:8080/api/v1/auth/login
To get started with the MovieAPI project, follow these steps:
git clone https://github.com/Bhuvantenguria/Movie_Api_Backend.gitcd Movie_Api_Backend- Open
src/main/resources/application.properties. - Modify the database connection details to match your MySQL setup.
- Execute the SQL script provided in
src/main/resources/sql-scriptsto set up the necessary database tables.
mysql -u your_username -p < create_database.sql- Using Maven:
./mvnw clean install
./mvnw spring-boot:run- Once the application is running, explore the MovieAPI by accessing the defined endpoints.
Feel free to contribute, suggest improvements, or report issues via GitHub!
Happy Coding! 🚀🎬