Wollama is a modern, cross-platform AI chat application designed to run locally with Ollama. It supports text and voice interactions (Speech-to-Text & Text-to-Speech) and is built for Web, Desktop (Windows/Linux/macOS), and Mobile (Android/iOS).
- Local AI: Powered by Ollama, ensuring privacy and offline capabilities.
- Cross-Platform: Runs on Web, Desktop (Electron), and Mobile (Capacitor).
- Voice Interaction:
- STT: Whisper integration for voice input.
- TTS: Text-to-Speech support for AI responses.
- Rich Chat UI: Markdown support, code highlighting, image attachments.
- Customizable: Theming (DaisyUI), multiple languages (i18n), and configurable AI personalities (Companions).
- Sync: Offline-first architecture using RxDB (Client) and PouchDB (Server).
- Skills & Hooks: Extensible system with slash commands (/translate, /summarize) and pre/post message processing.
- Agents: Built-in WebSearch and PageFetch agents for external data retrieval.
- Testing: 237+ unit and E2E tests for reliability.
- Skills System: Add custom slash commands for quick actions
- Hooks System: Intercept and modify messages before/after sending
- Agents: Web search and page fetching capabilities
- Enhanced UX: Loading skeletons, error boundaries, improved chat input
- Better Testing: Comprehensive test coverage for backend and frontend
- Frontend: Svelte 5 (Runes), Vite, Tailwind CSS v4, DaisyUI.
- Backend: Node.js (Express), PouchDB (LevelDB).
- Desktop Wrapper: Electron.
- Mobile Wrapper: Capacitor.
- Database: RxDB (Client) <-> PouchDB (Server) sync.
The application employs a specific strategy for integrating Speech-to-Text (Whisper) and Text-to-Speech (Piper) across different platforms to ensure optimal performance and offline capabilities:
-
Web (Browser):
- Execution: Delegated to Server.
- Strategy: Audio is recorded/played by the browser but processed by the Node.js backend (Whisper/Piper) to avoid heavy client-side load.
-
Desktop (Electron):
- Execution: Native Node.js Child Processes.
- Strategy: Bypasses the browser layer to use optimized precompiled C++ binaries (
whisper.cpp,piper) for maximum performance (AVX/CUDA).
-
Mobile (Capacitor):
- Strategy: Custom Capacitor Plugin (Native Bridge).
- Implementation: Bridges to native libraries (JNI/Swift) to leverage device NPU/GPU, avoiding the performance overhead of running WASM inside a WebView.
Before you begin, ensure you have the following installed:
- Node.js (v20 or higher) & npm.
- Ollama: Installed and running (
ollama serve).- Pull a model:
ollama pull mistral(or your preferred model).
- Pull a model:
- Android Studio (for Android development).
- Visual Studio Build Tools (for Windows native modules compilation, if needed).
-
Clone the repository
git clone https://github.com/medyll/wollama.git cd wollama -
Install Dependencies This project uses a monorepo-like structure. Install dependencies at the root:
npm install
-
Setup Audio Models (Optional but recommended) Downloads necessary ONNX models for local TTS/STT.
npm run setup:audio
You can run the different parts of the application using the following scripts:
Runs the Node.js server and the Vite frontend in parallel.
# Terminal 1: Start the Backend Server
npm run server:dev
# Terminal 2: Start the Frontend
npm run dev- Frontend:
http://localhost:5173 - Server:
http://localhost:3000
Runs the application in an Electron window.
npm run electron:devSyncs the web build to the Android project and opens Android Studio or runs on a connected device.
# Build the frontend first
npm run build
# Sync with Capacitor
npx cap sync
# Run on device/emulator
npx cap run android# Client tests (Vitest + jsdom)
npm run test:client -- --run
# Server tests (Vitest + Node.js)
npm run test:server -- --run# Install Playwright browsers
npx playwright install
# Run E2E tests
cd client && npx playwright test
# Run with UI
cd client && npx playwright test --ui
# Run specific test file
cd client && npx playwright test e2e/tests/smoke.spec.ts- Client: 166 tests (components, services, utils)
- Server: 71 tests (services, agents, routes)
- E2E: 4 smoke tests (critical user flows)
- Microphone Access:
- Web/Electron: Uses standard
navigator.mediaDevices. Ensure your OS allows microphone access to the terminal/app. - Mobile: Requires
RECORD_AUDIOpermission (handled by Capacitor).
- Web/Electron: Uses standard
- Audio Formats: The app automatically detects supported MIME types (
audio/webmvsaudio/mp4) for cross-platform compatibility (iOS vs Android/Desktop).
- The app uses an Offline-First approach.
- Client: RxDB stores data in IndexedDB.
- Server: PouchDB stores data in
db_data/(LevelDB). - Sync: Data is automatically replicated between Client and Server when connected. If you clear browser data, it will re-sync from the server.
- The application expects Ollama to be running on
http://127.0.0.1:11434. - Ensure CORS is configured in Ollama if you run into connection issues (set
OLLAMA_ORIGINS="*"). - Docker Users: If running Ollama in Docker, ensure the port is exposed and accessible from the host.
- Deep Linking: Custom URL schemes are handled in
client/src/routes/+layout.svelteto support opening the app via links. - Assets: If you add new assets, run
npx cap copyto update the native platforms.
- Server: The server can be compiled to a single executable using
pkg. - Electron: Use
electron-builder(configuration inpackage.json) to generate installers.
wollama/
βββ client/ # Frontend (SvelteKit)
β βββ electron/ # Electron main process
β βββ src/
β β βββ components/ # UI Components
β β βββ lib/
β β β βββ db.ts # RxDB Client Setup
β β β βββ services/ # Audio, Chat, STT Services
β β β βββ state/ # Global State (Svelte 5 Runes)
β β βββ routes/ # App Pages
βββ server/ # Backend (Express)
β βββ services/ # STT, TTS, Ollama Logic
β βββ server.ts # Entry Point
βββ android/ # Native Android Project
βββ bin/ # Binary resources (Piper, Whisper models)
βββ db_data/ # Server-side Database storage