nanochat
v0.0.1
Published
A modern chat interface for AI models built with SvelteKit
Maintainers
Readme
nanochat
Repository: https://github.com/dustinwloring1988/nanochat
A modern, feature-rich web interface built with SvelteKit. It supports both llama.cpp (OpenAI-compatible endpoints) and Ollama backends while keeping the same clean interface, streaming UX, file handling, and conversation management.
Features
- Modern Chat Interface - Clean, responsive design with dark/light mode
- File Attachments - Support for images, text files, PDFs, and audio with rich previews and drag-and-drop support
- Conversation Management - Create, edit, branch, and search conversations
- Advanced Markdown - Code highlighting, math formulas (KaTeX), and content blocks
- Reasoning Content - Support for models with thinking blocks
- Keyboard Shortcuts - Keyboard navigation (Shift+Ctrl/Cmd+O for new chat, Shift+Ctrl/Cmdt+E for edit conversation, Shift+Ctrl/Cmdt+D for delete conversation, Ctrl/Cmd+K for search, Ctrl/Cmd+V for paste, Ctrl/Cmd+B for opening/collapsing sidebar)
- Request Tracking - Monitor processing with slots endpoint integration
- UI Testing - Storybook component library with automated tests
Development
Install dependencies:
npm installStart the development server + Storybook:
npm run devThis will start both the SvelteKit dev server and Storybook on port 6006.
Building
Create a production build:
npm run buildThe build outputs static files to ../public directory. You can serve these with a reverse proxy in front of llama.cpp or Ollama.
Using with Ollama (local default):
- Set Provider to
Ollamain Settings - Server URL:
http://localhost:11434(default) - Ensure CORS allows your UI origin if serving remotely
Using with llama.cpp or OpenAI-compatible servers:
- Set Provider to
OpenAI-compatible - Keep relative endpoints (default) or proxy to your server
- If your server requires a key, set API Key in Settings
Testing
Run the test suite:
# E2E tests
npm run test:e2e
# Unit tests
npm run test:unit
# UI tests
npm run test:ui
# All tests
npm run testArchitecture
- Framework: SvelteKit with Svelte 5 runes
- Components: ShadCN UI + bits-ui design system
- Database: IndexedDB with Dexie for local storage
- Build: Static adapter for deployment with llama.cpp server
- Testing: Playwright (E2E) + Vitest (unit) + Storybook (components)
