The technology behind the Intelligent Library System

How the website, the admin panel and the local AI models work together, explained without the jargon.

System architecture

One Laravel application serves both the public website and the admin panel. It keeps its data in MySQL, runs its AI on local models, and connects to the library's existing systems instead of replacing them.

One application

The website, the admin panel and the AI engine share one codebase, so a page edited by staff is live for users at once.

AI stays local

The AI models run on the library's own server. Their network has no internet access.

Existing systems stay

The catalogue, the databases and the repositories remain the source of truth. The website routes users to them.

Local AI models and what each one does

Two open models run in Ollama on the library server. Both were chosen through the team's own evaluation on library questions.

Chat model

Qwen3 4B Instruct

4-bit quantised, about 3.2 GB in memory

  • Writes answers from the retrieved passages
  • Helps interpret unclear spoken answers in request forms
  • Chooses which admin tool fits a staff request
Embedding model

BGE-M3

Multilingual, about 1.2 GB in memory

  • Turns questions and knowledge passages into vectors
  • Finds the closest passages in English and Arabic
  • Recognises when a question is about a request service
Speech

Voice in the browser

No AI model on the server is needed

  • Speech input uses the browser's speech recognition
  • Replies are read aloud with a voice installed on the user's device
  • A local speech-to-text service (whisper.cpp) is supported for deployment

Both models are kept loaded in memory and run on the server's processor. No graphics card is required.

The Admin Agent prepares, a person decides

Staff can ask the agent to find information or prepare a change, such as adding a database or editing a page. The model can never save anything itself.

  1. Staff request

    A signed-in staff member describes what they need in their own words.

    A person
  2. Read

    The agent looks up website data through a database account that can only read.

    Local AI model
  3. Prepare

    It shows the exact change: current and proposed values, English and Arabic side by side.

    Application code
  4. Save click

    Only the staff member's own click on Save applies the change, once, within 30 minutes.

    A person
  5. Re-check and record

    Laravel checks permissions again, writes the change as a new version and logs it.

    Application code

Text written by website visitors can never trigger a change. Deleting is limited to content that goes to a Recycle Bin and can be restored.

Technology stack

Established, well-documented tools that the University's IT team can run and extend.

Backend and admin

PHP 8.4Application language
Laravel 13Web framework and routing
Filament 5Admin panel
LivewireInteractive admin screens

Frontend

Tailwind CSS 4Styling and responsive layout
Alpine.jsInteractive page parts
ViteFront-end build tool
Three.js3D virtual tour

Data, AI and environment

MySQL 8Database, sessions and cache
OllamaRuns the local AI models
DockerDevelopment environment
nginxWeb server in development

Blade templates render every page on the server. Reports can be downloaded as PDF or Excel. The project also documents deployment on Windows Server with IIS.

Security and administration

Protection is built into the structure of the system, not added on top.

Platform and administration

  • Roles and permissionsSuper Admin, Content Editor and Request Officer roles decide what each staff member can do.
  • Tamper-evident activity logAdministrative actions are logged, and each entry is cryptographically chained to the one before it.
  • Security CenterRule-based checks review accounts, permissions and sign-ins, and raise alerts after failed or blocked sign-ins.
  • Versions and Recycle BinContent changes are versioned, and deleted content can be restored.
  • Protected formsRequests are validated on the server, with request-forgery protection and rate limits.

AI safety

  • The model is treated as untrustedEvery reply is checked by code before anyone sees it.
  • Least privilegeThe public agent can only answer and help open or fill a request form. It cannot submit a form by itself.
  • Privacy before the modelEmails, phone numbers and ID-like numbers are replaced with placeholders first.
  • Approved links and contacts onlyAnything not on the approved list is removed from a reply.
  • Isolated AI networkThe model server has no published port and no internet access.

Integration with library systems

The website is the front door. The library's existing systems remain the source of truth behind it.

External systems and how the website connects to each
SystemUsed forHow it connects
EBSCO search“All Resources” searchThe search is sent to the library's EBSCO search page
Medad portal“Printed Books” searchThe search is sent to the library's Medad catalogue portal
UOB Digital RepositoryRepository searchThe search is sent to the repository's own search
UOB Scholar (DSpace)“Latest Research” on the homepagePublic REST API, cached for an hour, with the last good list shown if the service is down
Academic databasesDatabases by collegeThe system's own directory, linking to each provider's website

See the technology at work

The demo tours the website, the Library AI Agent and the admin panel.