Bumps the minor-and-patch group with 12 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@bitbaum/ai-kit](https://github.com/bitbaum/ai-kit) | `1.18.0` | `1.20.1` | | [@supabase/supabase-js](https://github.com/supabase/supabase-js/tree/HEAD/packages/core/supabase-js) | `2.116.0` | `2.117.2` | | [bip-kit](https://github.com/bitbaum/bip-kit) | `0.5.1` | `0.5.2` | | [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.88.0` | `7.89.0` | | [shiki](https://github.com/shikijs/shiki/tree/HEAD/packages/shiki) | `4.4.3` | `4.5.0` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.6.2` | `26.6.4` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.70.0` | `8.71.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.70.0` | `8.71.0` | | [eslint](https://github.com/eslint/eslint) | `10.11.0` | `10.12.0` | | [lint-staged](https://github.com/lint-staged/lint-staged) | `17.5.1` | `17.6.0` | | [prettier](https://github.com/prettier/prettier) | `3.9.8` | `3.9.9` | | [tsx](https://github.com/privatenumber/tsx) | `4.23.13` | `4.23.15` | Updates `@bitbaum/ai-kit` from 1.18.0 to 1.20.1 - [Commits](https://github.com/bitbaum/ai-kit/compare/v1.18.0...v1.20.1) Updates `@supabase/supabase-js` from 2.116.0 to 2.117.2 - [Release notes](https://github.com/supabase/supabase-js/releases) - [Changelog](https://github.com/supabase/supabase-js/blob/master/packages/core/supabase-js/CHANGELOG.md) - [Commits](https://github.com/supabase/supabase-js/commits/v2.117.2/packages/core/supabase-js) Updates `bip-kit` from 0.5.1 to 0.5.2 - [Changelog](https://github.com/bitbaum/bip-kit/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitbaum/bip-kit/compare/v0.5.1...v0.5.2) Updates `react-hook-form` from 7.88.0 to 7.89.0 - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.88.0...v7.89.0) Updates `shiki` from 4.4.3 to 4.5.0 - [Release notes](https://github.com/shikijs/shiki/releases) - [Commits](https://github.com/shikijs/shiki/commits/v4.5.0/packages/shiki) Updates `@types/node` from 26.6.2 to 26.6.4 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 8.70.0 to 8.71.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.70.0 to 8.71.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.71.0/packages/parser) Updates `eslint` from 10.11.0 to 10.12.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v10.11.0...v10.12.0) Updates `lint-staged` from 17.5.1 to 17.6.0 - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md) - [Commits](https://github.com/lint-staged/lint-staged/compare/v17.5.1...v17.6.0) Updates `prettier` from 3.9.8 to 3.9.9 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.9.8...3.9.9) Updates `tsx` from 4.23.13 to 4.23.15 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.23.13...v4.23.15) --- updated-dependencies: - dependency-name: "@bitbaum/ai-kit" dependency-version: 1.20.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@supabase/supabase-js" dependency-version: 2.117.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: bip-kit dependency-version: 0.5.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: react-hook-form dependency-version: 7.89.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: shiki dependency-version: 4.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-version: 26.6.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.71.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-version: 8.71.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: eslint dependency-version: 10.12.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: lint-staged dependency-version: 17.6.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: prettier dependency-version: 3.9.9 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: tsx dependency-version: 4.23.15 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Botsmann
Domain-specialized AI professionals, not another generic chatbot wrapper.
The Professionals
Six built-in specialists. Each with scoped knowledge, calibrated personality, and domain-specific system prompts.
| Professional | Domain | Specialty |
|---|---|---|
| Lex | Legal | Contract review, case analysis, regulatory compliance |
| Imhotep | Health | Evidence-based insights, research assistance |
| Nerd | Research | Systematization, web scraping, discovery |
| Heidi | Language | German/Swiss German, translation, culture |
| Muse | Art | Style analysis, composition, art history |
| Trident | Business | Project management, technical guidance |
SSOT: data/bots.ts. Each bot defines system_prompt, expertise[], interests[], communicationStyle (formality/verbosity/empathy), navConfig, and display metadata. Document access is scoped per professional -- Lex sees legal, business, and general docs only.
Architecture
Multi-LLM Routing
Three-tier provider strategy with graceful fallback:
| Priority | Provider | Model | Cost |
|---|---|---|---|
| 1 | Ollama (local) | llama3.2:latest | Free, self-hosted |
| 2 | Groq (cloud) | llama-3.1-8b-instant | Free tier |
| 3 | OpenRouter (cloud) | Claude 3.5 Sonnet, GPT-4, Gemini, Grok, Llama, Mistral | Paid |
Local first, free cloud second, paid cloud last. Users can override via settings. If a provider key is invalid, the system falls back silently to the next tier.
Entry point: lib/llm-client.ts -- generateWithBestProvider() handles selection, timeout (30s), and fallback logic.
RAG Knowledge Retrieval
Zero-cost client-side embeddings with server-side semantic search.
- Embeddings: Xenova/all-MiniLM-L6-v2 (384-dimensional) via Transformers.js -- runs entirely in the browser, no API calls
- Chunking: 500-token chunks, 50-token overlap, sentence-aligned boundaries
- Search:
supabase.rpc('match_documents')using pgvector cosine similarity - Context limits: 8000 chars for RAG chat, 4000 for professional chat
- Sources: Returned with document name, preview snippet, and similarity score
- Timeout: 8s for embedding generation
Privacy Model
Every table enforces Row Level Security. No exceptions.
- User documents isolated by
user_id-- no cross-user data leakage - API keys stored encrypted per-user
- Four-layer prompt injection defense:
sanitizeSystemPrompt()-- prevents instruction overridesanitizeUserMessage()-- removes malicious payloadssanitizeConversationHistory()-- validates message formatwrapUserContext()-- XML-like delimiters separate data from instructions
Custom Bot Creation
Users build their own specialists:
- Templates: Memorial, historical, functional, magical, helper
- Personality: Big Five trait sliders with full editor
- Knowledge: Upload text, audio, video, images as a custom knowledge base
- System prompts: Fully user-defined
- Entity levels: Spark, Aware, Learned, Wise, Evolved, Transcendent
API Design
Standardized response format (SSOT: lib/api/responses.ts):
// Success
{ success: true, data: {...}, meta?: { total, page } }
// Error
{ success: false, error: "Message", details?: [...] }
Rate limits: 20 req/60s for chat, 15 req/60s for professional chat.
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript 6, Tailwind CSS 4 |
| LLM | Groq, OpenRouter (100+ models), Ollama (local) |
| Database | Supabase PostgreSQL 15 + pgvector |
| Embeddings | Transformers.js (all-MiniLM-L6-v2, 384d) |
| Auth | Supabase Auth + Row Level Security |
| AWS SES | |
| Deployment | Self-hosted on Hetzner (behind Caddy); GitHub Actions CI |
Quick Start
Prerequisites
- Node.js 24 (see
.nvmrc) - A Supabase project with pgvector enabled
- At least one LLM provider key (Groq is free)
Setup
git clone https://github.com/bitbaum/botsmann.git
cd botsmann
pnpm install
Environment
cp .env.example .env.local
Required variables:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
GROQ_API_KEY=your-groq-key
Optional (for multi-model support):
OPENROUTER_API_KEY=your-openrouter-key
OLLAMA_BASE_URL=http://localhost:11434
Optional (visitor feedback FAB — must be set at next build, not only at runtime):
LOKI_FEEDBACK_TOKEN=fcw_…
Run
pnpm run dev
Open http://localhost:3000.
Project Structure
botsmann/
app/ # Next.js 16 app router
api/ # API routes (thin HTTP layer)
(routes)/ # Page routes
components/ # UI components (no business logic)
data/
bots.ts # SSOT: professional definitions
hooks/ # Data fetching, state management
lib/
api/
responses.ts # SSOT: API response format
llm-client.ts # Multi-provider LLM routing
embeddings/ # Transformers.js integration
security/ # Prompt injection defense layers
public/ # Static assets
supabase/
migrations/ # Database schema + pgvector setup
License
MIT