DSList is a RESTful API built using Java and the Spring Framework. This API provides functionalities to manage and interact with a list of items, which in this case is a list of games, but can be of movies, or any other type of data. The project is designed to be scalable, maintainable, and easy to integrate with other systems.
- CRUD Operations: Create, Read, Update, and Delete items in the list.
- RESTful Endpoints: Standardized endpoints for interacting with the API.
- Spring Boot: Leverages the power of Spring Boot for rapid development and deployment.
- Database Integration: Uses a relational database (e.g., MySQL, PostgreSQL) for persistent storage.
- Swagger Documentation: API documentation is automatically generated using Swagger.
- Java: The core programming language used for development.
- Spring Boot: Framework for building the API.
- Spring Data JPA: For database interactions.
- Hibernate: ORM (Object-Relational Mapping) tool.
- Maven: Build automation and dependency management.
- Swagger: API documentation and testing.
- Java Development Kit (JDK) 11 or higher.
- Maven 3.x.
- A relational database (e.g., MySQL, PostgreSQL).
- Git (optional, for cloning the repository).
-
Clone the Repository:
git clone https://github.com/lnpinto/dslist.git cd dslist -
Configure the Database:
- Update the
application.propertiesfile with your database credentials. - Example for MySQL:
spring.datasource.url=jdbc:mysql://localhost:3306/dslist spring.datasource.username=root spring.datasource.password=yourpassword spring.jpa.hibernate.ddl-auto=update
- Update the
-
Build the Project:
mvn clean install
-
Run the Application:
mvn spring-boot:run
-
Access the API:
- The API will be available at
http://localhost:8080. - Swagger UI can be accessed at
http://localhost:8080/swagger-ui.html.
- The API will be available at
- GET /games: Retrieve all items.
- GET /games/{id}: Retrieve a specific item by ID.
- GET /lists: Retrieve a specific list.
- GET /lists/{id}/games: Retrieve games from a specific list by ID.
- POST /games: Create a new item.
- PUT /games/{id}: Update an existing item.
- DELETE /games/{id}: Delete an item.
-
Get All Items:
curl -X GET http://localhost:8080/games
-
Create a New Item:
curl -X POST http://localhost:8080/games -H "Content-Type: application/json" -d '{"name": "New Item", "description": "This is a new item"}'
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeatureName). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeatureName). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or suggestions, please contact the repository owner:
- Name: Lucas Pinto
- GitHub: lnpinto
- Email: [[email protected]]
This is a provisional README file. More details will be added as the project evolves.