Coder Social home page Coder Social logo

zolo-booky-backend's Introduction

literature

ZOLO-BOOKY-BACKEND

Book Sharing API for zolo-booky made using Java SpringBoot.

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

Firebase Apache YAML Org Google
Docker GitHub%20Actions Gradle Spring java


๐Ÿ”— Quick Links


๐Ÿ“ Overview

Zolo's Booky application is an app for the Zolo residents to share books with each other. The backend of the application is developed using Java SpringBoot. The backend allows to manage books, appeals, users, images, and notifications. Books refer to the books that are available for sharing or have been shared by the users. Appeals refer to the requests made by the users to borrow a book from another user. Users refer to the residents of Zolo who are using the application. The images are (expected to be) for the book covers. The backend allows searching for books based on the title or author. The backend also allows sending notifications to the users using Firebase.


๐Ÿ“ฆ Features

  • The application provides endpoints for creating, updating, deleting, and fetching books, appeals, and users.
  • The application also provides endpoints for uploading, fetching, and deleting images.
  • Booky also provides endpoints for sending notifications to the users using Firebase.
  • The application also provides endpoints for searching books based on the title or author.

๐Ÿ“‚ Repository Structure

โ””โ”€โ”€ zolo-booky-backend/
    โ”œโ”€โ”€ .github
    โ”‚   โ””โ”€โ”€ workflows
    โ”‚       โ”œโ”€โ”€ gradle.yml
    โ”‚       โ””โ”€โ”€ greetings.yml
    โ”œโ”€โ”€ Dockerfile
    โ”œโ”€โ”€ README.md
    โ”œโ”€โ”€ SECURITY.md
    โ”œโ”€โ”€ Taskfile.yml
    โ”œโ”€โ”€ build.gradle
    โ”œโ”€โ”€ compose.yaml
    โ”œโ”€โ”€ gradle
    โ”‚   โ””โ”€โ”€ wrapper
    โ”‚       โ”œโ”€โ”€ gradle-wrapper.jar
    โ”‚       โ””โ”€โ”€ gradle-wrapper.properties
    โ”œโ”€โ”€ gradlew
    โ”œโ”€โ”€ gradlew.bat
    โ”œโ”€โ”€ settings.gradle
    โ””โ”€โ”€ src
        โ”œโ”€โ”€ main
        โ”‚   โ”œโ”€โ”€ java
        โ”‚   โ”‚   โ””โ”€โ”€ com
        โ”‚   โ”‚       โ””โ”€โ”€ zolobooky
        โ”‚   โ””โ”€โ”€ resources
        โ”‚       โ”œโ”€โ”€ application.yaml
        โ”‚       โ””โ”€โ”€ static
        โ”‚           โ”œโ”€โ”€ banner.txt
        โ”‚           โ””โ”€โ”€ fire-config.json
        โ””โ”€โ”€ test
            โ””โ”€โ”€ java
                โ””โ”€โ”€ com
                    โ””โ”€โ”€ zolobooky

๐Ÿงฉ Modules

.
File Summary
Dockerfile Dockerfile for the application.
Taskfile.yml Taskfile for the application.
settings.gradle Settings for the application.
compose.yaml Docker Compose file for the application.
build.gradle Gradle build file for the application.
gradlew.bat Gradle wrapper for Windows.
.github.workflows
File Summary
gradle.yml GitHub Actions for Gradle.
greetings.yml GitHub Actions for Greetings.
src.main.resources
File Summary
application.yaml Configuration file for the application.
src.main.java.com.zolobooky.booky
File Summary
OpenApiConfig.java OpenAPI Configuration file for the application.
BookyApplication.java It is the main file that is run to start the project.
src.main.java.com.zolobooky.booky.helpers
File Summary
HelperMethods.java Contains helper methods that are used in the application.
src.main.java.com.zolobooky.booky.notifications
File Summary
FireInit.java Initializes the Firebase App.
FireController.java Fire Controller(/v0/fire), contains endpoints for sending notifications.
FireService.java Services for the fire controller.
src.main.java.com.zolobooky.booky.notifications.FireExceptions
File Summary
FireSendingError.java Exception for fire when error occurs while sending notification.
src.main.java.com.zolobooky.booky.notifications.dto
File Summary
SendFireDTO.java Data Transfer Object for Fire Model that will be shown when sending a notification.
CreateFireDTO.java Data Transfer Object for Fire Model that is required to create a new notification.
src.main.java.com.zolobooky.booky.dashboard
File Summary
DashboardController.java Root Endpoint(/). Returns current time.
src.main.java.com.zolobooky.booky.users
File Summary
UserEntity.java Model of a user being used in the application.
UserService.java Services for the users controller.
UserRepository.java Helper for getting the data from the database.
UserController.java User Controller(/v0/users), contains endpoints related directly to the user.
src.main.java.com.zolobooky.booky.users.dto
File Summary
ListUserDTO.java Data Transfer Object for User Model that will be shown when list of users is being accessed.
CreateUserDTO.java Data Transfer Object for User Model that is required to create a new user.
src.main.java.com.zolobooky.booky.appeals
File Summary
AppealController.java Appeals Controller(/v0/appeals), contains endpoints related directly to the user.
AppealEntity.java Model of an appeal being used in the application.
AppealRepository.java Helper for getting the data from the database.
AppealService.java Services for the appeals controller.
src.main.java.com.zolobooky.booky.appeals.dto
File Summary
CreateAppealDTO.java Data Transfer Object for Appeal Model that is required to create a new appeal.
UpdateAppealDTO.java Data Transfer Object for Appeal Model that is required to update an appeal.
StatusAppealDTO.java Data Transfer Object for Appeal Model that is required to change status of an appeal.
ShortAppealDTO.java TODO src/main/java/com/zolobooky/booky/appeals/dto/ShortAppealDTO.java
AppealDTO.java Data Transfer Object for Appeal Model that all attributes appeal.
src.main.java.com.zolobooky.booky.appeals.AppealExceptions
File Summary
AppealAlreadyExistsException.java Exception for appeal when it already exists.
AppealNotFoundException.java Exception for appeal when it doest not exist.
src.main.java.com.zolobooky.booky.commons
File Summary
ExceptionResponse.java Response class that is returned when an exception occurs.
GlobalExceptionHandler.java Global exception handlers, handles all the exceptions that occur in the application.
CustomStatus.java Statuses for the book and appeals.
src.main.java.com.zolobooky.booky.books
File Summary
BookEntity.java Model of a book being used in the application.
BookController.java Books Controller(/v0/books), contains endpoints related directly to the book.
BookRepository.java Helper for getting the data from the database.
BookService.java Services for the books controller.
src.main.java.com.zolobooky.booky.books.BookExceptions
File Summary
BookAlreadyExistsException.java Exception for book when it already exists.
BookNotFoundException.java Exception for book when it doest not exist.
BadRequestException.java Exception for book when invalid request is made.
src.main.java.com.zolobooky.booky.books.dto
File Summary
ListBookDTO.java Data Transfer Object for Book Model that will be shown when list of books is being accessed.
BookDTO.java Data Transfer Object for Book Model that all attributes book.
UpdateBookDTO.java Data Transfer Object for Book Model that is required to update a book.
CreateBookDTO.java Data Transfer Object for Book Model that is required to create a new book.
src.main.java.com.zolobooky.booky.search
File Summary
SearchService.java Services for the search controller.
SearchController.java Search Controller(/v0/search), contains endpoints related directly to the search.
src.main.java.com.zolobooky.booky.images
File Summary
BlobService.java Services for the images controller.
BlobConfig.java Configuration for the images controller.
BlobController.java Images Controller(/v0/images), contains endpoints to upload, get and delete images.
src.main.java.com.zolobooky.booky.images.ImageExceptions
File Summary
ImageNotFoundExceptions.java Exception for image when it doest not exist.
src.test.java.com.zolobooky.booky
File Summary
BookyApplicationTests.java Test for the main application.
BookServiceTest.java Test for the book service.
BookAPITestAssets.java Assets(helper methods, constants) for the book API tests.

๐Ÿš€ Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • Java: version 17

โš™๏ธ Installation

  1. Clone the zolo-booky-backend repository:
git clone [email protected]:sst-product-team/zolo-booky-backend.git
  1. Change to the project directory:
cd zolo-booky-backend
  1. Install the dependencies:
./gradlew clean build

๐Ÿค– Running zolo-booky-backend

Use the following command to run zolo-booky-backend:

java -jar build/libs/booky-0.0.1-SNAPSHOT.jar

๐Ÿงช Tests

To execute tests, run:

./gradlew test

๐Ÿค Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone [email protected]:sst-product-team/zolo-booky-backend.git
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.


๐Ÿ‘ Acknowledgments

Return


zolo-booky-backend's People

Contributors

2k4sm avatar skushagra avatar attaditya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.