= Digital Library
This project implements a basic digital library with searching books via ISBN and inventory management (add/delete book) functions using link:https://spring.io/projects/spring-modulith[Spring Modulith,window=_blank] and ReactJS. This application uses link:https://openlibrary.org/[Open Library,window=_blank] as book info database. The project supports Java SDK 21.
See Medium article: https://medium.com/@selcuk.sert/modular-monoliths-with-spring-modulith-96361f3167c9[Modular Monoliths with Spring Modulith ]
[cols="a,a"] |=== | image:docs/images/ui-1.png[ui-1] | image:docs/images/ui-2.png[ui-2] |===
== Architecture
The project is compatible with docker and comprises of modules and services that underpins a typical Spring Modulith based application:
image:docs/models/arch.png[arch]
=== Traefik
Serves as edge router for docker-compose setup.
=== Neo4J
Serves as event registry for digilib modulith. It includes Neo4J browser for data browsing on graph DB.
=== Kafka
Serves as message broker for event externalization. Kafdrop is used as event browser.
=== PostgreSQL
Serves as relational database to store book inventory. PgAdmin is used as DB viewer.
=== Zipkin
Is used to capture and view micrometer spans originated by digilib modulith for telemetry and tracing.
== Start-up Modes
The project comes with two different modes based on docker-compose:
The link:docker/start.sh[start script] (based on zsh
) has the following options:
Start script for digilib app
The start script also generates (under certificates
folder) and registers a self-signed certificate (public certificate and private key) to enable TLS on Traefik edge router. The digilib.crt
should be imported into trusted CA list for seamless browsing.
See link:docker/.env[environment file] for credentials and parameters used in docker-compose setup.
=== URLs
Some DNS entries should be added with IP of node that hosts Traefik deployment.
For local deployments a typical hosts
file content for digilib would be:
|=== |URL |Mode |Detail
|https://portainer.digilib.local |Production |Portainer UI
|https://neo4j.digilib.local |All modes |Neo4J browser
|https://pgadmin.digilib.local |All modes |PgAdmin UI
|https://kafdrop.digilib.local |All modes |Kafdrop UI
|https://zipkin.digilib.local |All modes |Zipkin UI
|https://ui.digilib.local |Production |digilib UI
|http://localhost:5173/ |Development |digilib UI
|https://api.digilib.local |Production |digilib API host |===
For OpenAPI definitions {API Host}/swagger-ui
should be used.