Skip to content

ByteBookshelf is an online bookstore web API built using Java, Spring Boot, MySQL, and Postman for API testing. Designed to support a niche in tech books with a range of user-friendly features. It provides functionalities such as book browsing and sorting, profile management, shopping cart, book ratings, commenting, and wishlist management. ๐Ÿ“š

Notifications You must be signed in to change notification settings

mariarodr1136/ByteBookshelf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 

Repository files navigation

ByteBookshelf API Service

ByteBookshelf is a backend API service supporting a niche online bookstore specializing in technology books.

This API provides user and credit card management functionalities to enhance the user experience, making it possible to securely create and update user profiles and store credit card information.

Java Spring Boot MySQL Maven

Features

The ByteBookshelf API Service offers the following capabilities:

  1. User Profile Management - Users can create, retrieve, update, and delete their profiles.
  2. Credit Card Management - Users can add credit cards to their profiles for secure checkout.

Table of Contents


Technologies

  • Java
  • Spring Boot
  • MySQL
  • Maven (for dependency management)

Endpoints

The ByteBookshelf API provides RESTful endpoints for user profile and credit card management.

User Management

  1. Create a User

    • Endpoint: /users
    • HTTP Method: POST
    • Description: Adds a new user with username, password, and optional details (name, email, home address).
    • Request Body:
      {
        "username": "string",
        "password": "string",
        "name": "string",
        "email": "string",
        "homeAddress": "string"
      }
    • Response: The created User object.
  2. Retrieve a User by Username

    • Endpoint: /users/{username}
    • HTTP Method: GET
    • Description: Fetches a user by their username.
    • Response:
      {
        "id": "integer",
        "username": "string",
        "password": "string",
        "name": "string",
        "email": "string",
        "homeAddress": "string"
      }
  3. Update a User

    • Endpoint: /users/{username}
    • HTTP Method: PUT
    • Description: Updates all user fields except for email.
    • Request Body:
      {
        "username": "string",
        "password": "string",
        "name": "string",
        "email": "string",
        "homeAddress": "string"
      }
    • Response: The updated User object (except email).
  4. Partial Update a User

    • Endpoint: /users/{username}
    • HTTP Method: PATCH
    • Description: Allows partial updates on user fields.
    • Request Body: Partial User object with fields to update.
      {
        "username": "string",
        "password": "string",
        "name": "string",
        "email": "string",
        "homeAddress": "string"
      }
      • Response: The updated User object (except email).
  5. Delete a User

    • Endpoint: /users/{username}
    • HTTP Method: DELETE
    • Description: Deletes a user profile.

Credit Card Management

  1. Create a Credit Card for a User
    • Endpoint: /creditcards/{username}
    • HTTP Method: POST
    • Description: Adds a credit card to a userโ€™s profile.
    • Request Body:
      {
        "cardNumber": "string",
        "cardHolderName": "string",
        "expirationDate": "string",
        "cvv": "string"
      }
    • Response: The created CreditCard object.

Installation

  1. Clone the repository:

    git clone https://github.com/mariarodr1136/ByteBookshelf.git
  2. Navigate to the project directory:

    cd ByteBookshelf
  3. Install dependencies using Maven:

    mvn clean install
  4. Configure MySQL Database in the application.properties file, setting the appropriate username, password, and database URL

  5. Run the Application:

    mvn spring-boot:run
    

Usage

With the API running, you can make requests to the endpoints as listed above. You can use tools like Postman to interact with the API and test each endpoint.

Contributing

Feel free to submit issues or pull requests for improvements or bug fixes. You can also open issues to discuss potential changes or enhancements. All contributions are welcome to enhance the appโ€™s features or functionality!

To contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feat/your-feature-name
  • Alternatively, for bug fixes:
    git checkout -b fix/your-bug-fix-name
  1. Make your changes and run all tests before committing the changes and make sure all tests are passed.
  2. After all tests are passed, commit your changes with descriptive messages:
    git commit -m 'add your commit message'
  3. Push your changes to your forked repository:
    git push origin feat/your-feature-name.
  4. Submit a pull request to the main repository, explaining your changes and providing any necessary details.

Contact ๐ŸŒ

If you have any questions or feedback, feel free to reach out at mrodr.contact@gmail.com.

About

ByteBookshelf is an online bookstore web API built using Java, Spring Boot, MySQL, and Postman for API testing. Designed to support a niche in tech books with a range of user-friendly features. It provides functionalities such as book browsing and sorting, profile management, shopping cart, book ratings, commenting, and wishlist management. ๐Ÿ“š

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages