A Spring Boot + React application for cataloging and managing a personal or classroom book library. This guide covers running the deployment build, which uses an embedded SQLite database instead of PostgreSQL, so no external database server is required.
| Tool | Version | Notes |
|---|---|---|
| Java (JDK) | 21+ | Required to build and run the Spring Boot backend |
| Node.js | 18+ | Required to build the React frontend |
| npm | Comes with Node.js | Used to install frontend dependencies |
Maven does not need to be installed separately — the project includes the Maven Wrapper (mvnw / mvnw.cmd).
git clone https://github.com/twagner9/java-book-management-springboot.git
cd java-book-management-springbootThe React frontend is compiled to static assets and copied into the Spring Boot app's static resources folder, so the backend can serve the UI directly.
cd frontend
npm install
npm run build-and-copyOn Windows, use
npm run build-and-copy-wininstead.
This compiles the React app with Vite and copies the output into src/main/resources/static.
From the project root:
cd ..
./mvnw clean packageOn Windows, use
mvnw.cmd clean packageinstead.
This produces an executable JAR at target/BookManagementApp-0.0.1-SNAPSHOT.jar.
The deployment profile configures the app to use an embedded SQLite database (bookmanager.db), which is created automatically in the working directory on first run — no database setup needed.
Option A — run the packaged JAR:
java -jar target/BookManagementApp-0.0.1-SNAPSHOT.jar --spring.profiles.active=deploymentOption B — run via the Maven wrapper:
./mvnw spring-boot:run -Dspring-boot.run.profiles=deploymentOnce running, open an additional terminal and execute the frontend:
cd frontend
npm run start
- Data storage: In deployment mode, all book data is stored locally in a
bookmanager.dbSQLite file created next to where you run the app. Deleting this file resets the catalog. - Other profiles: A
devprofile also exists, which connects to a local PostgreSQL database instead of SQLite. This is intended for local development only and requires a running PostgreSQL instance (seenotes_for_myself.txtin the repo for setup commands). - Rebuilding after frontend changes: If you update the frontend, re-run
npm run build-and-copy(step 2) and rebuild the backend (step 3) so the changes are included in the packaged app.