https://github.com/camilo6castell/library-provider-backend
[EN][please see README.md] La parte backend de la aplicación maneja las operaciones CRUD (Crear, Leer, Actualizar, Eliminar) para gestionar libros e información de usuarios. La arquitectura ha sido mejorada con los principios de Arquitectura Hexagonal, Fuentes de Eventos y Diseño Dirigido por Dominios (DDD).
https://github.com/camilo6castell/library-provider-backend
ddd event-sourcing gradle hexagona java mysql spring-boot
Last synced: 3 months ago
JSON representation
[EN][please see README.md] La parte backend de la aplicación maneja las operaciones CRUD (Crear, Leer, Actualizar, Eliminar) para gestionar libros e información de usuarios. La arquitectura ha sido mejorada con los principios de Arquitectura Hexagonal, Fuentes de Eventos y Diseño Dirigido por Dominios (DDD).
- Host: GitHub
- URL: https://github.com/camilo6castell/library-provider-backend
- Owner: camilo6castell
- Created: 2024-04-01T22:49:40.000Z (about 1 year ago)
- Default Branch: refactor/hexagonal-architecture
- Last Pushed: 2024-08-16T03:08:45.000Z (9 months ago)
- Last Synced: 2025-01-15T20:34:49.857Z (4 months ago)
- Topics: ddd, event-sourcing, gradle, hexagona, java, mysql, spring-boot
- Language: Java
- Homepage:
- Size: 247 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Library Provider: Backend






## About
This project is developed in **Java** using **Spring Boot** for the backend and **MySQL** as the relational database.
Library Provider is an application designed to manage the operations of a library, including managing users and texts. The backend part of the application handles the **CRUD** (Create, Read, Update, Delete) operations for managing books and user information. The architecture has been enhanced with **Hexagonal Architecture**, **Event Sourcing**, and **Domain-Driven Design (DDD)** principles.
## Features
1. User management (create, read, update, delete).
2. Book management (create, read, update, delete).
3. Integration with MySQL database.
4. RESTful API implementation using Spring Boot.
5. Secure handling of user data.
6. Hexagonal Architecture for better separation of concerns.
7. Event Sourcing for maintaining a history of changes.
8. Domain-Driven Design for a robust domain model.## Installation
To set up the project locally, follow these steps:
1. **Clone the repository:**
```bash
git clone https://github.com/camilo6castell/library-provider-backend.git
cd library-provider-backend
```2. **Set up the database:**
- Make sure you have MySQL installed and running.
- Create a new database for the project.
- Update the `application.properties` file with your database connection details.3. **Build the project:**
```bash
./gradlew build
```4. **Run the application:**
```bash
./gradlew bootRun
```## Testing with Postman
To test the API endpoints using Postman, you can import the provided Postman collection and execute the requests directly. Follow these steps:
1. **Import the Postman collection:**
- Download the [Postman collection](https://drive.google.com/file/d/1-7eZIgGvCbVpv7aqJV1679djr9F5GMnn/view?usp=sharing).
- Open Postman, go to "File" -> "Import", and select the downloaded JSON file.2. **Available Requests:**
- **Create User:**
- **Method:** POST
- **Endpoint:** `http://127.0.0.1:8080/api/v1/createUser`
- **Body (raw JSON):**
```json
{
"email": "[email protected]",
"password": "zzzzDzddddd2%",
"entryDate": "2000-01-01"
}
```- **Save and Quote Text:**
- **Method:** POST
- **Endpoint:** `http://127.0.0.1:8080/api/v1/saveAndQuoteText`
- **Body (raw JSON):**
```json
{
"userID": "",
"title": "test",
"type": "BOOK",
"initialPrice": 100.0
}
```3. **Execute the Requests:**
- Ensure your backend service is running.
- Use the imported requests in Postman to interact with the API endpoints.
- Check the responses and verify the operations.## Contact
[GitHub](https://github.com/camilo6castell?tab=repositories)
[LinkedIn](https://www.linkedin.com/in/camilocastell/)