A local AI chat application powered by Ollama, built with Next.js 16, the Vercel AI SDK, SQLite, Drizzle ORM, and shadcn/ui.
Requires Ollama running locally. Pull any model with
ollama pull <model>before starting.
| Chat | Arena | Voice |
|---|---|---|
![]() |
![]() |
![]() |
- Chat: multi-turn conversations with markdown and syntax-highlighted code rendering, image attachments for vision models, persistent chat history, and per-chat model selection
- Arena: send the same prompt to two models side-by-side and compare responses in real time
- Voice: hands-free voice call interface with low-latency TTS streaming
- Screen share: capture the active screen when speaking to vision-capable models in voice mode
- Dark mode: system preference detection via
next-themes - Model capability detection: vision and thinking support are auto-detected per Ollama model
- SQLite persistence: chat history and the selected model are stored in
data/app.dbthrough Drizzle ORM
- Ollama installed and running (
ollama serve) - At least one model pulled, e.g.
ollama pull qwen3.5orollama run qwen3.5 - Node.js 20+ installed
git clone https://github.com/aleksa-codes/next-ollama-chat
cd next-ollama-chat
bun install
bun run devOpen http://localhost:3000.
The SQLite database is created automatically at data/app.db on first run.
If you change the schema (add/remove fields or tables), generate and apply a new Drizzle migration:
bun run db:generate
bun run db:migrateNote: The server runs
bun run db:migrateautomatically on startup, so you typically only need to run it manually when working on migrations.
| Command | Description |
|---|---|
bun run dev |
Start development server |
bun run build |
Build for production |
bun run start |
Run production server |
bun run lint |
Lint with ESLint |
bun run format |
Format with Prettier |
bun run shadcn |
Add shadcn/ui components |
bun run deps |
Update dependencies interactively |
bun run db:generate |
Generate Drizzle SQL migrations |
bun run db:migrate |
Apply generated Drizzle migrations |
bun run db:studio |
Open Drizzle Studio |
- Next.js 16: App Router
- Vercel AI SDK: streaming chat with
useChat - ai-sdk-ollama: Ollama provider and streaming helpers
- SQLite + Drizzle ORM: local persistence for chats and preferences
- Tailwind CSS v4: utility-first styling
- shadcn/ui: component library
- React 19 with React Compiler
- marked + shiki: markdown and code rendering
- Web Speech API: STT and TTS for voice mode
MIT, see LICENSE for details.


