Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelmsilva2v/booksapi
RESTful API for book management
https://github.com/samuelmsilva2v/booksapi
docker jpa postgresql spring-boot tdd
Last synced: 5 days ago
JSON representation
RESTful API for book management
- Host: GitHub
- URL: https://github.com/samuelmsilva2v/booksapi
- Owner: samuelmsilva2v
- Created: 2024-12-16T17:11:09.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-01-29T14:31:36.000Z (16 days ago)
- Last Synced: 2025-01-29T15:30:54.567Z (16 days ago)
- Topics: docker, jpa, postgresql, spring-boot, tdd
- Language: Java
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Books API
[🇧🇷 Leia em Português](#api-books)
API RESTful developed in Spring Boot that provides a CRUD for book management.
Technologies:
- **Java 21**
- **Spring Boot**
- **Spring Data JPA**
- **Hibernate**
- **PostgreSQL**
- **Swagger**
- **Lombok**
- **Model Mapper**
- **Bean Validation (javax.validation)**
- **Docker**| Método | Endpoint | Descrição |
|--------|-------------------|------------------------|
| POST | `/api/books` | Registers a new book |
| GET | `/api/books` | Retrieves all books |
| GET | `/api/books/{id}` | Retrieves a book by ID |
| PUT | `/api/books/{id}` | Updates a book |
| DELETE | `/api/books/{id}` | Deletes a book |## Installation:
##### Building the Docker image:
#### 1. Open the terminal and navigate to the project folder.
#### 2. Run the following command to create the Docker image:
```bash
docker build -t booksapi .
```
##### Running the container
```bash
docker-compose up -d
```#### 3. Access the Swagger documentation: http://localhost:8080/swagger-ui/index.html#
[Frontend repository](https://github.com/samuelmsilva2v/webBooks)
---
# API Books
[🇺🇸 Read in English](#books-api)
API RESTful desenvolvida em Spring Boot que oferece um CRUD para o gerenciamento de livros.
## Tecnologias:
- **Java 21**
- **Spring Boot**
- **Spring Data JPA**
- **Hibernate**
- **PostgreSQL**
- **Swagger**
- **Lombok**
- **Model Mapper**
- **Bean Validation (javax.validation)**
- **Docker**## Endpoints
| Método | Endpoint | Descrição |
|--------|-------------------|------------------------------|
| POST | `/api/books` | Registra uma nova categoria |
| GET | `/api/books` | Consulta todas as categorias |
| GET | `/api/books/{id}` | Detalha uma categoria por ID |
| PUT | `/api/books/{id}` | Atualiza uma categoria |
| DELETE | `/api/books/{id}` | Remove uma categoria |## Instalação:
##### Construindo a imagem no Docker:
#### 1. No terminal, navegue até a pasta do projeto.
#### 2. Execute o comando abaixo para criar a imagem Docker:
```bash
docker build -t booksapi .
```
##### Executando o container
```bash
docker-compose up -d
```#### 3. Acesse a documentação no Swagger: http://localhost:8080/swagger-ui/index.html#
[Repositório do front-end](https://github.com/samuelmsilva2v/webBooks)