SLIIT · SE1020 · Group WD130

Every story,
one Nexus.

A full-stack online bookstore where readers discover and buy books, authors publish and manage their catalogue, and admins run the whole store — with local AI built in.

Spring Boot 4Java 17MySQLSpring SecurityThymeleafOllama AI
0User roles
0JPA entities
0Controllers
0Routes & endpoints
0Page templates
0AI features
Three portals, one store

Built for everyone who
touches a book.

Role-based access with Spring Security gives readers, authors and administrators their own tailored workspace.

ROLE_USER

The Reader

Browse a curated catalogue, save favourites, check out in a few clicks and track every order — all from one personal account.

Book catalogue

Search, filter and open detailed pages for every title.

Cart & checkout

Promo codes, card or cash on delivery, and instant receipts.

Wishlist

Save books for later and move them to the cart in one tap.

Reviews

Write, edit and manage reviews — with AI sentiment tags.

Order history

Follow status updates and download receipts anytime.

Support & news

Raise support tickets and read store announcements.

ROLE_AUTHOR

The Author

Authors join by invite token, get a dedicated dashboard, and submit new titles for admin approval — with an AI editor polishing their synopses.

Author dashboard

See your published books and their performance at a glance.

Book requests

Submit new titles that go to an admin approval queue.

AI synopsis editor

Turn a rough blurb into a polished, retail-ready synopsis.

Public profile

Edit biography, photo and settings readers will see.

Invite-only signup

Secure author registration via admin-issued tokens.

VIP spotlight

Award-winning authors featured on the store homepage.

ROLE_ADMIN

The Admin

Full control of the store: inventory, people, orders, promotions and customer support — from a single command centre.

Book management

Add, edit, archive, restore and approve author requests.

Users & authors

Promote, demote, revoke and archive accounts.

Order pipeline

Update statuses — customers are emailed automatically.

Promo codes

Create and toggle percentage-off discount campaigns.

Announcements

Publish store-wide news to every reader.

Support tickets

Resolve customer tickets and moderate reviews.

Local AI, built in

A bookstore that
reads along with you.

Nexus talks to a locally hosted LLM through Ollama — no cloud APIs, no data leaving the server. Click a feature to see it in action.

Catalogue assistant phi3

Readers ask questions in plain English and get answers grounded in the live inventory.

Synopsis enhancer llama3

Authors paste a rough draft; the AI editor rewrites it into a captivating retail blurb.

Review sentiment llama3

Every review is auto-classified POSITIVE, NEUTRAL or NEGATIVE to help admins moderate.

Summaries & apologies llama3

Condenses all reviews of a book into one summary, and drafts apology emails for unhappy readers.

POST /api/ai/chat

Illustrative demo. In the app, requests go to localhost:11434/api/generate via OllamaService.

From cart to doorstep

A complete order lifecycle.

Every purchase flows through a real pipeline — with discounts, polymorphic payments, file-based receipts and email notifications.

1

Add to cart

Pick books from the catalogue or your wishlist.

2

Apply promo

Admin-managed codes knock a percentage off.

3

Pay

Card or cash on delivery via the Payment interface.

4

Receipt

A receipt file is written and emailed as an attachment.

5

Track

Status changes trigger update emails to the reader.

==========================================
         NEXUS BOOKSTORE RECEIPT
==========================================
Order ID       : NX-128
Date           : 2026-08-25 13:12:10
Payment Method : COD
Status         : PROCESSING
------------------------------------------
Recipient      : Sample Customer
Delivery To    : 123, Galle Road, Galle
Contact No     : 07X XXX XXXX
------------------------------------------
TOTAL PAID     : LKR 5800.0
==========================================
         Thank you for shopping!
         Developed by Group WD130
==========================================
  • ✓
    File handlingEach order writes receipt_order_<id>.txt to disk — downloadable from order history.
  • ✓
    Email notificationsEmailService sends order confirmations with the receipt attached, plus status updates.
  • ✓
    Order statesPENDING → PROCESSING → SHIPPED → DELIVERED, or CANCELLED — managed from the admin panel.
  • ✓
    Validated inputDTOs with Bean Validation and a global exception handler keep data clean.
Object-oriented core

The four pillars, in practice.

Built as an OOP coursework project — each principle shows up in real, working code.

01

Encapsulation

Entities like User and Book keep fields private behind getters and setters.

02

Abstraction

The Payment interface hides how a payment is processed from the checkout flow.

03

Inheritance

Repositories extend JpaRepository, inheriting full CRUD behaviour for free.

04

Polymorphism

CardPayment and CashPayment override processPayment() differently.

// Abstraction
public interface Payment {
  String processPayment(Double amount);
}
// Polymorphism
public class CardPayment
    implements Payment {
  @Override
  public String processPayment(Double a) {
    return "CARD";
  }
}
// Inheritance
public interface BookRepository
    extends JpaRepository<Book, Long> {
  // save, findAll, delete…
  // inherited for free
}
Under the hood

Clean, layered architecture.

A classic Spring MVC design keeps each responsibility in its own layer — easy to test, extend and divide across a team.

View

Thymeleaf

Server-rendered pages styled with Bootstrap 5.

36
Web

Controllers

MVC pages plus REST endpoints under /api.

21
Logic

Services

Orders, carts, promos, email and AI integration.

10
Data

Repositories

Spring Data JPA over Hibernate entities.

12
Storage

MySQL

Relational store, auto-migrated schema.

13
Java 17Spring Boot 4Spring SecuritySpring Data JPAHibernateMySQLThymeleafBootstrap 5Jakarta ValidationJavaMailOllama · Llama 3 · Phi-3MavenPostmanGit & GitHub
Group WD130

The people behind Nexus.

Led by a tech lead who built the core of the platform, with each teammate owning a focused module on their own Git branch, merged through pull requests.

K
Team Leader · Tech Lead

Keshara

Core Systems Architecture & AI Integration

Directed the technical architecture and developed the core management modules, implementing advanced features including a reactive checkout, a Strategy Pattern payment gateway and dual-model AI integration. Built the rest of the platform end to end.

System architectureSpring Security & rolesBook catalogue & managementCart & reactive checkoutStrategy Pattern paymentsOrders & receiptsEmail notificationsReviews & moderationAdmin dashboardDual-model AI (Llama 3 + Phi-3)UI design
S

Sithumi

Author Management

Engineered the core data classes, entities and backend architecture for the Author portal.

A

Akindu

Promo Management

Dynamic promo code discount engine, validation logic and cart recalculation.

T

Thenujaya

Featured Admin & Broadcast

Implemented featured authors and handles global announcements and user notifications across the platform.

D

Dulara

Book Wishlist Management

Handles the creation, storage and management of user-specific wishlists.

H

Hamsana

Support Ticket Management

Planning and architecture for the future customer support ticketing module.