Building a Movie Recommendation API with Spring Boot 🎬
Source: Dev.to

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 trending content
GET /content/trendingResponse
{
"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 → DatabaseThis 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