A Java web application for managing a relational library database through a role-aware Vaadin interface. The project covers catalog records, libraries, users, loans, comments, and administrative database operations in one Spring Boot application.
The application provides separate navigation paths for students and librarians after sign-in. Students can browse catalog data, read and write book comments, and update their profile. Librarians can also manage books, authors, publishers, libraries, students, librarians, and loan records.
- Sign-in, registration, and role-based navigation for students and librarians
- Catalog views for books, authors, publishers, and library branches
- Book, author, publisher, and library record management
- Student and librarian account management
- Loan creation, tracking, and removal
- Book comments linked to students and catalog records
- User profile and password updates
- Librarian SQL workspace for inspecting database data
- Java 21
- Spring Boot 3.2.5
- Vaadin 24.3.12 with the Lumo dark theme
- Maven Wrapper
- MySQL Connector/J 8.4.0
- JDBC for database access
The relational model connects books with authors, publishers, and library branches while keeping authentication, student, librarian, loan, and comment data in separate entities.
The class diagram shows the Spring Boot entry point, shared database connection layer, Vaadin layout, and application views.
Browser
└─ Vaadin server-side views
├─ MainLayout: role-aware navigation
├─ Catalog and account views
├─ Loan and comment workflows
└─ ConnectDatabase: JDBC access
└─ MySQL tables and database views
Key locations:
Application.javastarts Spring Boot and initializes the database connection.MainLayout.javabuilds navigation according to the active user role.ConnectDatabase.javacontains the shared JDBC connection and authentication lookup.src/main/java/.../views/contains the Vaadin screens for each workflow.frontend/themes/contains the application theme assets.
- JDK 21
- MySQL 8 or a compatible MySQL server
- A database matching the entities and views shown in the ER diagram
The repository does not include schema migrations, seed data, or a database dump. Create the required schema before using database-backed screens.
The academic version keeps local JDBC connection settings in ConnectDatabase.java. Replace the URL, username, and password constants with values for your local MySQL instance before running the application. Never commit real credentials.
For any production-oriented continuation, move these values to environment variables or a secret store instead of keeping them in source code.
macOS and Linux:
./mvnw spring-boot:runWindows:
mvnw.cmd spring-boot:runOpen http://localhost:8080 after the application starts.
| Command | Purpose |
|---|---|
./mvnw spring-boot:run |
Start the development server |
./mvnw test |
Run the test suite |
./mvnw clean package |
Build the application JAR |
./mvnw clean package -Pproduction |
Build optimized Vaadin frontend assets and the production JAR |
java -jar target/librarydatabasemanage-1.0-SNAPSHOT.jar |
Run the packaged application |
This repository is an academic database application and a demonstration of Java, Spring Boot, Vaadin, Maven, JDBC, and relational modeling. It is not production-hardened.
Before exposing it to real users, replace string-built SQL with parameterized queries, hash passwords, enforce authorization on the server, remove the unrestricted SQL workspace, externalize credentials, and add versioned database migrations.
Licensed under the terms in LICENSE.md.

