Movies is a full-stack application consisting of a Spring Boot backend (Movies API) and a React frontend. The backend provides a simple API related to movies, leveraging Spring Data MongoDB, while the frontend interacts with this API to present movie information and reviews.
- Movie Information: Retrieve details about movies, including title, release date, trailer link, and more.
- Review System: Allow users to add reviews for movies.
- Data Persistence: Store movie information and reviews in a MongoDB database using Spring Data MongoDB.
- RESTful Endpoints: Expose RESTful endpoints for easy integration with other applications.
- Frontend UI: A React-based frontend for a user-friendly interface.
- Java
- Spring Boot
- MongoDB
- Lombok
- JavaScript
- React
- Axios
-
Clone the Repository:
git clone https://github.com/Damples06/movies-api-react-hub.git cd WeatherWebApp
-
Build and Run:
./mvnw clean install ./mvnw spring-boot:run
-
Access the Application:
Open your web browser and go to http://localhost:5454.
Movie Information
To retrieve details for a specific movie, use the following endpoint:
GET /api/v1/movies/{imdbId}
Example:
curl http://localhost:5454/api/v1/movies/tt1234567
Reviews
To create a review for a movie, use the following endpoint:
POST /api/v1/reviews
Example:
curl -X POST -H "Content-Type: application/json" -d '{"reviewBody": "Great movie!", "imdbId": "tt1234567"}' http://localhost:5454/api/v1/reviews
Configure the application properties in application.yml for MongoDB connection.
server:
port: 5454
spring:
data:
mongodb:
database: ${MONGO_DATABASE}
uri: mongodb+srv://${MONGO_USER}:${MONGO_PASSWORD}@${MONGO_CLUSTER}
Contributions are welcome! Feel free to open issues and pull requests.