Building a Movie Recommendation API with Spring Boot 🎬

Published: (March 14, 2026 at 08:30 AM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Cover image for Building a Movie Recommendation API with Spring Boot 🎬

Recently I built a backend API for a movie and TV show recommendation platform using Java and Spring Boot.
The goal of the project was to practice designing a REST API, implementing authentication, and integrating an external API.

Features

  • Search movies and TV shows using the TMDB API
  • User authentication with JWT
  • Save favorite movies and shows
  • Rate content
  • Get trending content
  • RESTful API design
  • API documentation using Swagger / OpenAPI

Tech Stack

Backend

  • Java 21
  • Spring Boot
  • Spring Security
  • JWT Authentication
  • Spring Data JPA

Database

  • PostgreSQL

External API

  • TMDB API (The Movie Database)

Documentation

  • Swagger / OpenAPI

Example API Request

GET /content/trending

Response

{
  "page": 1,
  "results": [
    {
      "title": "War Machine",
      "release_date": "2026-02-12",
      "vote_average": 7.1
    }
  ]
}

Project Architecture

The application follows a layered architecture:

Controller → Service → Repository → Database

This structure helps keep the code organized and maintainable.

API Documentation

The API is documented using Swagger / OpenAPI, which makes it easy to explore and test the endpoints.

What I Learned

  • Designing REST APIs
  • Implementing authentication with Spring Security
  • Using JWT for authorization
  • Integrating external APIs
  • Structuring a backend project using layered architecture

GitHub Repository

You can find the full project here:
https://github.com/alejandrotg-code/tv-and-movie-db

0 views
Back to Blog

Related posts

Read more »

Building Balgs Store

!Cover image for Building Balgs Storehttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s...