Project case study · Nibeda
Nibeda: a local AI chatbot with Spring Boot and Ollama
Sourav Kumar Nayak created Nibeda, a locally run AI chatbot that connects a Thymeleaf chat interface to Ollama models and stores conversation messages in PostgreSQL.
Project overview
Nibeda is a personal AI assistant built with Java 25, Spring Boot 3.5, Spring AI 1.1.1, Ollama, PostgreSQL, Hibernate/JPA, and Thymeleaf. The project is designed to run with local language models such as SmolLM2, LLaMA, and Mistral, rather than depending on a hosted LLM API for its core chat flow.
Architecture and system design
Nibeda follows a Controller–Service–Repository structure documented in its source repository. The server-rendered Thymeleaf interface submits a chat interaction to the Spring application; the service coordinates Spring AI with the configured Ollama model, while the repository persists message records through JPA/Hibernate. PostgreSQL stores conversation history.
- Thymeleaf view: Renders the chat interface and submits a user message.
- Controller and service: Handle the web interaction and coordinate the model conversation.
- Spring AI and Ollama: Connect the Spring application to a locally available language model.
- Repository and PostgreSQL: Persist chat messages using Hibernate/JPA and PostgreSQL.
Browser
-> Thymeleaf chat page
-> Spring MVC Controller
-> Chat Service -> Spring AI -> local Ollama model
-> Message Repository -> PostgreSQLThis flow summarizes the repository's documented architecture; it is not source code.
Engineering decisions and challenges
Running inference locally
The Ollama endpoint and selected model need to match the local environment. This keeps inference local but makes model setup part of deployment.
Separating responsibilities
The documented controller, service, and repository layers provide clear places for request handling, AI orchestration, and persistence.
Preserving conversation history
The documented message record includes a UUID, sender role, text, and timestamp so user and bot messages can be represented in history.
Technology stack
This project is part of Sourav Kumar Nayak's portfolio as a Java Developer, Spring Boot Developer, AI Automation Engineer, and Full-Stack Developer. The linked repository provides the source and project-specific setup details.