The Bookstore Management System is a Java-based web application built with Spring Boot. It provides a RESTful API for managing authors and books in a bookstore.
- Get a list of all authors
- Get an author by ID
- Add a new author
- Get a list of all books
- Get a lift of all books of certain author
- Add a new book
- Delete a book
etc
.
- Java 17
- Spring Boot
- Spring JDBC
- PostgreSQL
- Flyway (for database migrations)
- Docker
- Maven
Before running the application, make sure you have the following installed:
- Java Development Kit (JDK) 17 or higher
- PostgreSQL database
- Docker
- Maven
- Clone the repository:
git clone https://github.com/d3nnyyy/BookstoreManagementSystem.git
-
Open the project in your preffered IDE.
-
Run the Docker:
docker-compose up -d
- Run the application:
mvn spring-boot:run
The application will be accessible at http://localhost:8080
.
The following API endpoints are available:
GET /authors
: Get all authorsGET /authors/{id}
: Get an author by IDPOST /authors
: Add a new authorDELETE /authors/{id}
: Delete an authorPUT /authors/{id}
: Update author information
GET /books
: Get all booksGET /books/{id}
: Get a book by IDGET /books/author/{id}
: Get a book by author IDPOST /books
: Add a new bookDELETE /books/{id}
: Delete a bookPUT /books/{id}
: Update book information
You can test the API endpoints using a tool like Postman. Simply import the provided Postman collection, which contains pre-configured requests for each endpoint. You can modify the requests as needed or create new ones to suit your testing requirements.
To get started:
- Install Postman if you haven't already.
- Import the Postman collection file (
bookstore_postman.json
) included in this repository. - Update the base URL in Postman to match the server where the API is running.
- Send requests to the desired API endpoints and review the responses.
Feel free to explore the different endpoints and experiment with different request payloads to interact with the API.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
For any inquiries or questions, please contact [[email protected]].