dependabot[bot] df2892b567 chore(deps): bump the minor-and-patch group with 11 updates (#304)
Bumps the minor-and-patch group with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@better-auth/passkey](https://github.com/better-auth/better-auth/tree/HEAD/packages/passkey) | `1.7.15` | `1.7.18` |
| [@supabase/supabase-js](https://github.com/supabase/supabase-js/tree/HEAD/packages/core/supabase-js) | `2.118.0` | `2.119.0` |
| [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.3.3` | `4.3.5` |
| [better-auth](https://github.com/better-auth/better-auth/tree/HEAD/packages/better-auth) | `1.7.15` | `1.7.18` |
| [next](https://github.com/vercel/next.js) | `16.4.3` | `16.4.5` |
| [shiki](https://github.com/shikijs/shiki/tree/HEAD/packages/shiki) | `4.5.0` | `4.6.0` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.3.3` | `4.3.5` |
| [@electric-sql/pglite](https://github.com/electric-sql/pglite/tree/HEAD/packages/pglite) | `0.5.14` | `0.5.15` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.64.1` | `1.65.0` |
| [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `16.4.3` | `16.4.5` |
| [playwright](https://github.com/microsoft/playwright) | `1.64.1` | `1.65.0` |


Updates `@better-auth/passkey` from 1.7.15 to 1.7.18
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/passkey/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.18/packages/passkey)

Updates `@supabase/supabase-js` from 2.118.0 to 2.119.0
- [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.119.0/packages/core/supabase-js)

Updates `@tailwindcss/postcss` from 4.3.3 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/@tailwindcss-postcss)

Updates `better-auth` from 1.7.15 to 1.7.18
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/better-auth/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/v1.7.18/packages/better-auth)

Updates `next` from 16.4.3 to 16.4.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](https://github.com/vercel/next.js/compare/v16.4.3...v16.4.5)

Updates `shiki` from 4.5.0 to 4.6.0
- [Release notes](https://github.com/shikijs/shiki/releases)
- [Commits](https://github.com/shikijs/shiki/commits/v4.6.0/packages/shiki)

Updates `tailwindcss` from 4.3.3 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/tailwindcss)

Updates `@electric-sql/pglite` from 0.5.14 to 0.5.15
- [Release notes](https://github.com/electric-sql/pglite/releases)
- [Changelog](https://github.com/electric-sql/pglite/blob/main/packages/pglite/CHANGELOG.md)
- [Commits](https://github.com/electric-sql/pglite/commits/@electric-sql/pglite@0.5.15/packages/pglite)

Updates `@playwright/test` from 1.64.1 to 1.65.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

Updates `eslint-config-next` from 16.4.3 to 16.4.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](https://github.com/vercel/next.js/commits/v16.4.5/packages/eslint-config-next)

Updates `playwright` from 1.64.1 to 1.65.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

---
updated-dependencies:
- dependency-name: "@better-auth/passkey"
  dependency-version: 1.7.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: "@supabase/supabase-js"
  dependency-version: 2.119.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: better-auth
  dependency-version: 1.7.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: next
  dependency-version: 16.4.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: shiki
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: tailwindcss
  dependency-version: 4.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: "@electric-sql/pglite"
  dependency-version: 0.5.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: "@playwright/test"
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: eslint-config-next
  dependency-version: 16.4.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: playwright
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  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>
2026-11-11 06:02:33 +01:00
2026-02-26 19:29:55 +01:00
2026-08-31 14:10:50 +00:00

Botsmann

Domain-specialized AI professionals, not another generic chatbot wrapper.

License: MIT TypeScript Next.js Live


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:
    1. sanitizeSystemPrompt() -- prevents instruction override
    2. sanitizeUserMessage() -- removes malicious payloads
    3. sanitizeConversationHistory() -- validates message format
    4. wrapUserContext() -- 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 @bitbaum/accountkit (accounts database beside the schema)
Email 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

Languages
TypeScript 89.7%
HTML 3.6%
PLpgSQL 2.2%
JavaScript 1.6%
Python 1.3%
Other 1.6%