Book Network is a backend application developed with Spring Boot 3 and Spring Security 6. It allows users to manage their book collections and interact with a community of book enthusiasts. It provides functionalities such as user registration, email validation, book management (creation, updating, sharing, and archiving), book borrowing with availability checks, and book return functionality. The application ensures security using JWT tokens.
- User Registration: Users can register for a new account.
- Email Validation: Accounts are activated using secure email validation codes.
- User Authentication: Existing users can log in securely.
- Book Management: Users can create, update, share, and archive their books.
- Book Borrowing: Necessary checks to determine if a book can be borrowed.
- Book Returning: Users can return borrowed books.
- Book Return Approval: Functionality to approve book returns.
- Spring Boot 3
- Spring Security 6
- JWT Token Authentication
- Spring Data JPA
- JSR-303 and Spring Validation
- OpenAPI and Swagger UI Documentation
- Docker
- Designing a class diagram from business requirements
- Using JWT tokens with Spring Security to secure the application
- Registering users and validating accounts via email
- Utilizing inheritance with Spring Data JPA
- Implementing the service layer and handling application exceptions
- Object validation using JSR-303 and Spring Validation
- Handling custom exceptions
- Implementing pagination and REST API best practices
- Using Spring Profiles for environment-specific configurations
- Documenting APIs using OpenAPI and Swagger UI
- Dockerizing the infrastructure
To set up the backend of the Book Social Network project, follow these steps:
- Clone the repository:
git clone https://github.com/matnrocha/Book-Social-Network.git
- Run the docker-compose file
docker-compose up -d
- Navigate to the book-social-network directory:
cd book-social-network
- Install dependencies (assuming Maven is installed):
mvn clean install
- Run the application
java -jar target/book-network-0.0.1.jar
- Access the API documentation using Swagger UI:
Open a web browser and go to `http://localhost:8088/api/v1/swagger-ui/index.html
- Access MailDev to receive emails (token receiving):
Open a web browser and go to `http://localhost:1080/#/