REST API for managing a movie catalog and streaming services, built with Spring Boot and a modern architecture.
Flix is a platform that allows users to discover movies available across different streaming services. The project was developed with a focus on:
- Content Organization: Efficient categorization of movies
- Multiple Services: Integration with various streaming providers
- Security: JWT authentication to protect endpoints
- Performance: Optimized queries and caching for better performance
- Scalability: Architecture designed for growth
The project follows a layered architecture:
src/main/java/com/movieflix/
├── config/ # Spring and Security configurations
├── controller/ # REST Controllers
├── entity/ # JPA Entities
├── repository/ # Spring Data Repositories
├── service/ # Business logic
├── exception/ # Custom exceptions
└── mapper/ # DTO <-> Entity conversions
- Java 17: LTS version with modern language features
- Spring Boot 3: Framework for rapid development
- Spring Security: Security and authentication
- Spring Data JPA: Data persistence
- JWT: Stateless authentication tokens
- Lombok: Reduces boilerplate code
- Bean Validation: Data validation
- PostgreSQL 15: Robust relational database
- Flyway: Schema versioning and migrations
- Maven: Dependency management and build tool
- JUnit 5: Unit testing
- Mockito: Mocking for tests
- Swagger/OpenAPI: API documentation
- User registration and login system
- JWT-based authentication
- Role-based route protection
- Full CRUD for movie categories
- Data validation
- Dependency handling
- Register and manage providers
- Associate movies with providers
- Integrity validations
- Detailed movie registration
- Search by multiple criteria
- Association with categories and services
- Rating system
- Java 17+
- PostgreSQL 15+
- Maven 3.8+
- Clone the repository
git clone [repository-url]- Configure PostgreSQL in the
application.yamlfile:
spring:
datasource:
url: jdbc:postgresql://localhost:5432/flix
username: your_username
password: your_password- Run the application:
# Manual build
mvn clean package
# Manual run
mvn spring-boot:runThe API will be available at http://localhost:8080
All routes are fully documented with Swagger/OpenAPI and can be accessed at:
http://localhost:8080/swagger-ui.html
- POST
/api/auth/register- Register new user - POST
/api/auth/login- User login
- POST
/api/categories- Create category - GET
/api/categories- List categories - GET
/api/categories/{id}- Get category by ID - DELETE
/api/categories/{id}- Delete category
- POST
/api/streaming- Create streaming service - GET
/api/streaming- List streaming services - GET
/api/streaming/{id}- Get streaming service by ID - DELETE
/api/streaming/{id}- Delete streaming service
- POST
/api/movies- Create movie - GET
/api/movies- List movies - GET
/api/movies/{id}- Get movie by ID - PUT
/api/movies/{id}- Update movie - DELETE
/api/movies/{id}- Delete movie - GET
/api/movies/search?category={id}- Search movies by category
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Vinicius Ferreira
This project is under development.