Skip to content

Digital book library app based on Spring Modulith

License

Notifications You must be signed in to change notification settings

selcuksert/digilib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digital Library

This project implements a basic digital library with searching books via ISBN and inventory management (add/delete book) functions using Spring Modulith and ReactJS. This application uses Open Library as book info database. The project supports Java SDK 21.

ui-1

ui-2

Architecture

The project is compatible with docker and comprises of modules and services that underpins a typical Spring Modulith based application:

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:

  • One for development to activate mandatory external services for development with opening required ports for IDE,

  • The other one for production complementing previous one with serving full-stack application inside docker-compose setup.

The start script (based on zsh) has the following options:

start.sh -h
Start script for digilib app

Syntax: start.sh [-h|p|d]
options:
h     Prints this Help.
p     Start in production mode.
d     Start in developer mode.
u     Uninstall setup.

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 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:

127.0.0.1 portainer.digilib.local
127.0.0.1 neo4j.digilib.local
127.0.0.1 pgadmin.digilib.local
127.0.0.1 ui.digilib.local
127.0.0.1 api.digilib.local
127.0.0.1 kafdrop.digilib.local
127.0.0.1 zipkin.digilib.local
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.