Skip to content

Backend application where users can authenticate using Jwt tokens, create, update, share and borrow books with return confirmation.

Notifications You must be signed in to change notification settings

matnrocha/Book-Social-Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

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.

Features

  • 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.

Technologies Used

Java Spring Docker Postgres JWT Swagger openapi initiative

Backend

  • Spring Boot 3
  • Spring Security 6
  • JWT Token Authentication
  • Spring Data JPA
  • JSR-303 and Spring Validation
  • OpenAPI and Swagger UI Documentation
  • Docker

Learnings from this project

  • 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

Setup Instructions

To set up the backend of the Book Social Network project, follow these steps:

  1. Clone the repository:
   git clone https://github.com/matnrocha/Book-Social-Network.git
  1. Run the docker-compose file
  docker-compose up -d
  1. Navigate to the book-social-network directory:
  cd book-social-network
  1. Install dependencies (assuming Maven is installed):
  mvn clean install
  1. Run the application
  java -jar target/book-network-0.0.1.jar
  1. Access the API documentation using Swagger UI:

Open a web browser and go to `http://localhost:8088/api/v1/swagger-ui/index.html

  1. Access MailDev to receive emails (token receiving):

Open a web browser and go to `http://localhost:1080/#/

About

Backend application where users can authenticate using Jwt tokens, create, update, share and borrow books with return confirmation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published