Spring Boot Application for bookstore inventory management.
Functionality includes:
- Ability to explore bookstore by different input criteria goto
- Registration at the inventory new kind of books goto
- Supplying books that ready to purchase goto
- The option to purchase (or withdraw) the book goto
- Updating the information for customer goto
In context of project, ISBN is numeric commercial book identifier that is intended to be unique. Even in case of full copy of book.
In context of project, since ISBN is unique even for copies of books, we need to have another identificator of the similar books, e.g. checksum. Checksum considered to be generated by author, title, edition fields of book.
- Java 17
- Spring Boot 3
- Project Reactor
- Reactive Grpc
- R2DBC
- Postgres
- Testcontainers
- Gradle
- Docker
For learning curve had chose the hexagonal architecture. The main goal was to provide as flexible as possible project where business logic does not loosely depend on framework, technology stack and et cetera. Specifically it represents four modules:
- java-domain
- proto-domain
- usecase
- infrastructure
Run postgres database with sql script or
docker run -d \
--name postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=bookstore \
-p 5432:5432 \
-v "./2-database/init.sql:/docker-entrypoint-initdb.d/init.sql" \
postgres:14.0
Initial project build
gradle clean build -xtest
On the infrastructure level present main class Starter to launch manually or
gradle run
Or using docker compose
docker compose up -d
Docker compose mainly needed for e2e tests to start environment via testcontainers.