A simple local chatbot designed that could use locally hosted models on services like ollama, LM Stu
1.5K
A modern chat application built with React and Spring Boot that uses Ollama for local AI models.
Just Docker required — no repo clone, no build, no manual model setup.
# 1. Download the compose file
curl -fsSL https://raw.githubusercontent.com/manojisnow/boox/main/docker-compose.release.yml \
-o docker-compose.boox.yml
# 2. Run it
docker compose -f docker-compose.boox.yml up
Open http://localhost:8080 — done.
The default AI model (
phi4-mini, ~2.5 GB) is pulled automatically on first run and cached in a Docker volume. Subsequent starts are instant. To use a different model, create a.envfile next to the compose file withOLLAMA_MODEL=<model-name>.
For zero-setup quick start:
For local development:
Builds the image locally from source. Use this if you are making code changes and want to test the full stack end-to-end. Requires cloning the repository.
Ensure Docker Desktop is running.
From the project root, run:
# Build and start everything
docker compose up -d
# View logs
docker compose logs -f
After the containers are up and running, you'll need to download the phi4-mini model:
# Get the Ollama container ID
docker compose ps
# Download the phi4-mini model
docker exec <ollama_container_id> ollama pull phi4-mini
The Ollama model will be cached in a Docker volume and won't need to be downloaded again.
The frontend is compiled and served directly by the Spring Boot backend — there is only one server. Open your browser and go to: http://localhost:8080
If you have enough resources and want to download a different model, you can do so by running the following command:
docker exec <ollama_container_id> ollama pull <model_name>
ollama serve
ollama pull phi4-mini
You can download a different model by replacing phi4-mini with your desired model name. Be considerate of your system resources, as some models can be quite large.
cd backend/chatapp
mvn spring-boot:run
cd frontend
npm install
npm start
If you prefer to run Ollama locally (useful if you use Ollama for other projects) but want to containerize the Boox application:
ollama serve
ollama pull phi4-mini
docker run -d --name boox_app \
-p 8080:8080 \
-v boox_data:/app/data \
-e OLLAMA_API_URL=http://host.docker.internal:11434 \
-e OLLAMA_MODEL=phi4-mini \
boox
The image serves both the frontend and backend from a single origin on
:8080— no separate:3000port.-v boox_data:/app/datapersists conversation history (SQLite) across restarts.
This setup is particularly useful if you:
If you want to run the application locally but use Ollama in Docker:
# Start only Ollama
docker compose up -d ollama
# Then run backend and frontend locally as in Option 2
Create a .env file to customize the setup:
OLLAMA_MODEL=codellama # Use a different model
OLLAMA_API_TEMPERATURE=0.5 # Adjust temperature
When running services separately, you can configure:
docker run -d --name boox_app \
-p 8080:8080 \
-v boox_data:/app/data \
-e OLLAMA_API_URL=http://ollama:11434 \
-e OLLAMA_MODEL=phi4-mini \
-e OLLAMA_API_TEMPERATURE=0.7 \
boox
Available variables:
OLLAMA_API_URL: Ollama server URLOLLAMA_MODEL: AI model to use (default: phi4-mini)OLLAMA_API_TEMPERATURE: Model temperature (default: 0.7)PORT: Backend port (default: 8080)CORS_ALLOWED_ORIGINS: CORS origins (default: http://localhost:3000)BOOX_DB_PATH: SQLite database file path (default: /app/data/boox.db in Docker, ./data/boox.db locally) — conversation history is stored hereOLLAMA_CONTEXT_MAX_TOKENS: token budget for what's sent to the model each turn (default: 3000); older messages are folded into a running summary rather than droppedOLLAMA_CONTEXT_SUMMARY_ENABLED: whether to summarize messages that fall out of the context window (default: true)OLLAMA_CONTEXT_NUM_CTX: if set (>0), passed to Ollama as options.num_ctx to size the model's own context windowboox/
├── backend/ # Spring Boot backend
│ └── chatapp/ # Main application module
├── frontend/ # React frontend
├── scripts/ # Utility scripts
└── docker-compose.yml # Complete development environment
react-markdown + react-syntax-highlighter)sessionStorageOLLAMA_CONTEXT_* (see Manual Configuration)gemma3/gemma4); the attach button only appears when the selected model reports vision support. Images persist with the conversation and are shown again on resumeTool interface and registering as a Spring @Component; no other wiring neededTo enable web search, set in backend/chatapp/src/main/resources/application.properties:
tools.websearch.enabled=true
prefers-color-scheme, no toggle neededaria-label on all interactive elementsAsyncConfig)git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Content type
Image
Digest
sha256:cd770e178…
Size
156 MB
Last updated
about 2 months ago
docker pull dumanoj/boox