Skip to content

Paras14/bookmanagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShelfSense: Intelligent Book Management System

Overview

ShelfSense is a full-stack web application for organizing and tracking your personal book collection. It features user authentication, a responsive book‑like UI, an admin panel, and AI‑driven book discussions.

Technologies Used

Backend: Java 21, Spring Boot 3.3.4, Spring Security & JWT, Spring Data JPA, MySQL, Spring AI (Ollama llama3.2)

Frontend: Next.js 14 (App Router) + TypeScript, Tailwind CSS, ShadCN/ui, Fetch API

Features

  • User Authentication (Register & Login)
  • Book Management (Add, Remove, Toggle Read Status)
  • Responsive, book-like UI
  • Admin Panel for global book oversight
  • AI-Powered Chat about books

Screenshots

Login & Register

Login Page Register Page

Secure login interface for users to access their accounts and User-friendly registration form for new users to create an account.

User Dashboard

User Dashboard Image Main dashboard showing the user's book collection with options to add, remove, and update books.

Admin Dashboard

Admin Dashboard Image Admin view showing all books in the system with an option to delete.

Add New Book Form

Book Form Image Modal Form for adding a new book to the user's collection, showcasing all input fields.

AI Chat Interface

AI Chat Interface Image The AI-powered chat interface where users can ask questions about a specific book.


AI Chat Interface Result Image Response generated from llama3.2 3B running locally in docker container with ollama.

Docker Containers

Docker containers Image Docker containers running MySQL database and Ollama with llama3.2 3B locally.

Project Structure

bookmanagement/
├─ backend/               # Spring Boot service
│  └─ ...                 # Models, Controllers, Services, Repos
├─ frontend-cra/         # Legacy CRA frontend (to be removed)
└─ frontend/              # Next.js app
   ├─ app/                # Page routes
   ├─ components/         # UI components
   ├─ public/             # Static assets (Screenshots folder here)
   ├─ styles/             # Global CSS
   └─ ...                 # Config (tailwind.config.js, next.config.js)

Setup & Installation

Prerequisites

Node.js ≥18, npm Java 21 MySQL o Docker (for MySQL & Ollama)

Backend

cd backend
git pull
# configure src/main/resources/application.properties with MySQL creds
mvn spring-boot:run

Frontend

cd frontend
npm install
npm run dev
# open http://localhost:3000

Docker Compose

cd backend
docker-compose up -d
docker-compose ps //confirm ollama container running
docker exec -it ollama ollama pull llama3.2

API Endpoints

  • POST /api/auth/register — Register new user
  • POST /api/auth/login — Login; returns JWT
  • GET /api/books — List user’s books
  • POST /api/books — Add new book
  • PUT /api/books/{id} — Update read status
  • DELETE /api/books/{id} — Remove a book
  • GET /api/books/admin/all — (ADMIN) List all books
  • DELETE /api/books/admin/{id} — (ADMIN) Delete book
  • POST /api/books/chat/{id} — Chat about a book

Security

JWT-based authentication with USER & ADMIN roles.

Contributing

Contributions welcome! Fork & submit a PR.

License

MIT © 2025 PARAS

Releases

No releases published

Packages