This repository contains the complete code bundle for the Digital Library Application Design project.
Original Figma design:
👉 https://www.figma.com/design/IA3py2BHJiDELwxbwc8S29/Digital-Library-Application-Design
From the project root:
npm iFrom the project root, you can launch both the backend (Spring Boot) and the frontend (Vite) simultaneously using:
npm startThis command will run:
mvn spring-boot:run(backend)npm run dev(frontend)
via the concurrently tool.
This allows the entire application to start with a single command.
The dataset is loaded from:
data/mapper.json
data/txt/
data/covers/
-
DatasetLoader.init() reads the dataset from: data/mapper.json (resolved dynamically using ProjectPaths)
-
The JSON is parsed into:
Map<String, Book> books
-
Each
Bookcontains:id, title, cover, contentPath -
Raw files (covers & txt content) are served via:
/api/files/{type}/{filename}Examples:
/api/files/covers/123.jpg/api/files/txt/62.txt
-
Services such as
LSAServiceandPCAServicewill use dataset paths using ProjectPaths, ensuring compatibility across operating systems. to perform:- Text preprocessing
- TF–IDF
- SVD (LSA)
- PCA (cover embeddings)
Accessible at:
http://localhost:8080/api/...
GET /api/books?page=1&size=20
Handled by: listBooks() (BookController)
GET /api/books/{id}
Example:
GET /api/books/45634
Handled by: getBook() (BookController)
GET /api/books/search?title=alice&page=1&size=5
Handled by: searchBooks()(BookController)
POST /api/books/search/cover
Pipeline (planned):
- Convert uploaded cover → grayscale / feature vector
- PCA dimensionality reduction
- Similarity search
Related classes:
searchCover()(BookController)search()(PCAService)
GET /api/books/{id}/recommendations
Pipeline (planned):
- Load book's content using
contentPath - Preprocess text
- TF–IDF
- Apply SVD
- Compute cosine similarity
Related classes:
recommend()(BookController)recommend()(LSAService)
GET /api/files/covers/{filename}
Example:
GET /api/files/covers/38427.jpg
Handled by: getFile() (FileController)
GET /api/files/txt/{filename}
Example:
GET /api/files/txt/62.txt
Handled by: getFile() (FileController)
Used for:
- Debugging dataset
- LSA preprocessing
- Checking text integrity