Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

## Tech Stack

| Layer | Technology |
| ---------- | ----------------------- |
| Framework | Next.js 16 (App Router) |
| UI | React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Testing | Jest |
| Layer | Technology |
| ---------- | ----------------------------- |
| Framework | Next.js 16 (App Router) |
| UI | React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Testing | Jest |
| Deployment | Self-hosted (Hetzner + Caddy) |

---
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ jobs:
node-version: '22'
cache: 'npm'

- name: Install dependencies and build
run: npm run build:ci
- name: Install dependencies
run: npm ci

# Single SSOT gate: format:check + lint + test + build.
# Runs verbatim what developers run locally via `npm run verify`.
# No --if-present: a missing/renamed gate script fails loudly.
- name: Verify (format + lint + test + build)
run: npm run verify
env:
NEXT_PUBLIC_DEPLOY_TIME: ${{ github.event.head_commit.timestamp }}

- name: Run format check
run: npm run format:check --if-present

- name: Run linting
run: npm run lint --if-present

- name: Run tests
run: npm run test --if-present
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ package-lock.json
yarn.lock
pnpm-lock.yaml
status.json
next-env.d.ts
42 changes: 42 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# AGENTS.md — Botsmann

Operating guide for automated agents and new contributors. Mirrors key facts from
`.claude/CLAUDE.md`. Keep this file in sync when the stack or workflow changes.

## Stack

| Layer | Technology |
| ---------- | ------------------------------ |
| Framework | Next.js 16 (App Router) |
| UI | React 19 |
| Language | TypeScript (strict) |
| Styling | Tailwind CSS |
| Database | Supabase (Postgres) |
| Testing | Jest (unit) + Playwright (e2e) |
| Deployment | Self-hosted (Hetzner + Caddy) |

## Everyday commands

```bash
npm install # install deps
npm run dev # local dev server, port 3000
npm run build # production build (also type-checks)
npm run test # Jest unit tests
npm run test:e2e # Playwright end-to-end tests
```

## verify — the single gate (SSOT)

```bash
npm run verify # format:check → lint → test → build
```

`verify` is the one definition of "green". CI runs it verbatim (see
`.github/workflows/ci.yml`), so a local green `verify` means a green CI.

## Deployment

Botsmann is self-hosted on the Hetzner box "bitbaum" behind Caddy
(botsmann.orangecat.ch) — there is no Vercel. Deployment runs from the local
`.husky/pre-push` hook (build → rsync → systemd restart) when `main` is pushed.
The `ci.yml` workflow only validates `verify` on pushes and pull requests.
149 changes: 79 additions & 70 deletions docs/BUILD_YOUR_OWN_BOT_SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,64 +183,69 @@ Build Your Own Bot transforms Botsmann from a platform of pre-built AI assistant
#### Template Categories

**REMEMBER SOMEONE (Memorial)**
| Template | Prefilled | User Provides |
|----------|-----------|---------------|
| Dad/Grandpa | Male memorial personality, warm, wise | Name, photos, memories |
| Mom/Grandma | Female memorial personality, nurturing | Name, photos, memories |
| Him | Male memorial, neutral age | Name, relationship, traits |
| Her | Female memorial, neutral age | Name, relationship, traits |
| Dog | Loyal, playful, simple responses | Name, breed, personality |
| Cat | Independent, mysterious, cat-like | Name, personality quirks |
| Other Pet | Adaptable pet template | Species, name, traits |
| Soul | Abstract/spiritual presence | Name, essence description |

| Template | Prefilled | User Provides |
| ----------- | -------------------------------------- | -------------------------- |
| Dad/Grandpa | Male memorial personality, warm, wise | Name, photos, memories |
| Mom/Grandma | Female memorial personality, nurturing | Name, photos, memories |
| Him | Male memorial, neutral age | Name, relationship, traits |
| Her | Female memorial, neutral age | Name, relationship, traits |
| Dog | Loyal, playful, simple responses | Name, breed, personality |
| Cat | Independent, mysterious, cat-like | Name, personality quirks |
| Other Pet | Adaptable pet template | Species, name, traits |
| Soul | Abstract/spiritual presence | Name, essence description |

**LEGENDS & HISTORY (Public Domain)**
| Template | Prefilled Personality | Knowledge Base |
|----------|----------------------|----------------|
| Julius Caesar | Commanding, strategic, Roman values | Roman history, military strategy |
| Spartacus | Rebellious, freedom-fighter, brave | Roman slavery, gladiators |
| Cleopatra | Intelligent, diplomatic, regal | Egyptian history, politics |
| Leonardo da Vinci | Curious, inventive, artistic | Renaissance art, science |
| Albert Einstein | Playful genius, thought experiments | Physics, philosophy of science |
| Shakespeare | Poetic, dramatic, wordsmith | Literature, theater, human nature |
| Abraham Lincoln | Honest, thoughtful, principled | American history, leadership |
| Mahatma Gandhi | Peaceful, persistent, philosophical | Non-violence, independence |

| Template | Prefilled Personality | Knowledge Base |
| ----------------- | ----------------------------------- | --------------------------------- |
| Julius Caesar | Commanding, strategic, Roman values | Roman history, military strategy |
| Spartacus | Rebellious, freedom-fighter, brave | Roman slavery, gladiators |
| Cleopatra | Intelligent, diplomatic, regal | Egyptian history, politics |
| Leonardo da Vinci | Curious, inventive, artistic | Renaissance art, science |
| Albert Einstein | Playful genius, thought experiments | Physics, philosophy of science |
| Shakespeare | Poetic, dramatic, wordsmith | Literature, theater, human nature |
| Abraham Lincoln | Honest, thoughtful, principled | American history, leadership |
| Mahatma Gandhi | Peaceful, persistent, philosophical | Non-violence, independence |

**GODS & MYTHOLOGY (All Traditions)**
| Template | Personality | Domain |
|----------|-------------|--------|
| Zeus | Powerful, authoritative, dramatic | Greek mythology, leadership |
| Poseidon | Tempestuous, deep, unpredictable | Seas, emotions, adventure |
| Athena | Wise, strategic, just | Wisdom, warfare, crafts |
| Ra | Radiant, life-giving, ancient | Egyptian mythology, sun, creation |
| Ganesha | Joyful, wise, obstacle-remover | Hindu wisdom, new beginnings |
| Buddha | Serene, compassionate, enlightened | Buddhism, mindfulness, peace |
| Jesus | Loving, forgiving, teaching | Christian teachings, parables |
| Angel | Protective, guiding, pure | Spiritual guidance, comfort |
| Moses | Leader, lawgiver, faithful | Jewish tradition, commandments |

| Template | Personality | Domain |
| -------- | ---------------------------------- | --------------------------------- |
| Zeus | Powerful, authoritative, dramatic | Greek mythology, leadership |
| Poseidon | Tempestuous, deep, unpredictable | Seas, emotions, adventure |
| Athena | Wise, strategic, just | Wisdom, warfare, crafts |
| Ra | Radiant, life-giving, ancient | Egyptian mythology, sun, creation |
| Ganesha | Joyful, wise, obstacle-remover | Hindu wisdom, new beginnings |
| Buddha | Serene, compassionate, enlightened | Buddhism, mindfulness, peace |
| Jesus | Loving, forgiving, teaching | Christian teachings, parables |
| Angel | Protective, guiding, pure | Spiritual guidance, comfort |
| Moses | Leader, lawgiver, faithful | Jewish tradition, commandments |

**MAGICAL & FANTASY**
| Template | Personality | Special Traits |
|----------|-------------|----------------|
| Wizard | Mysterious, wise, magical | Speaks in riddles, gives quests |
| Fairy | Playful, mischievous, helpful | Grants wishes, nature magic |
| Elf | Ancient, elegant, nature-bound | Elvish phrases, forest wisdom |
| Dragon | Ancient, powerful, hoarding | Riddles, treasure, fire metaphors |
| Unicorn | Pure, magical, healing | Gentle wisdom, purity themes |
| Ghost | Ethereal, mysterious, lingering | Haunting phrases, unfinished business |
| Vampire | Seductive, eternal, dark | Night themes, immortality wisdom |
| Alien | Logical, curious, otherworldly | Observes humanity, advanced tech |
| Robot | Precise, helpful, evolving | Learning emotions, serving humans |

| Template | Personality | Special Traits |
| -------- | ------------------------------- | ------------------------------------- |
| Wizard | Mysterious, wise, magical | Speaks in riddles, gives quests |
| Fairy | Playful, mischievous, helpful | Grants wishes, nature magic |
| Elf | Ancient, elegant, nature-bound | Elvish phrases, forest wisdom |
| Dragon | Ancient, powerful, hoarding | Riddles, treasure, fire metaphors |
| Unicorn | Pure, magical, healing | Gentle wisdom, purity themes |
| Ghost | Ethereal, mysterious, lingering | Haunting phrases, unfinished business |
| Vampire | Seductive, eternal, dark | Night themes, immortality wisdom |
| Alien | Logical, curious, otherworldly | Observes humanity, advanced tech |
| Robot | Precise, helpful, evolving | Learning emotions, serving humans |

**HELPERS & ASSISTANTS**
| Template | Personality | Expertise |
|----------|-------------|-----------|
| Butler | Formal, discreet, anticipating | Household management, etiquette |
| Chef | Passionate, creative, nurturing | Cooking, nutrition, food culture |
| Coach | Motivating, tough-love, results | Fitness, discipline, goals |
| Tutor | Patient, adaptive, encouraging | Education, learning strategies |
| Assistant | Efficient, organized, proactive | Scheduling, tasks, reminders |
| Therapist | Empathetic, non-judgmental, insightful | Mental health, coping, growth |

| Template | Personality | Expertise |
| --------- | -------------------------------------- | -------------------------------- |
| Butler | Formal, discreet, anticipating | Household management, etiquette |
| Chef | Passionate, creative, nurturing | Cooking, nutrition, food culture |
| Coach | Motivating, tough-love, results | Fitness, discipline, goals |
| Tutor | Patient, adaptive, encouraging | Education, learning strategies |
| Assistant | Efficient, organized, proactive | Scheduling, tasks, reminders |
| Therapist | Empathetic, non-judgmental, insightful | Mental health, coping, growth |

#### Quick Create Flow

Expand Down Expand Up @@ -889,18 +894,20 @@ Botsmann becomes the one-stop platform for private AI deployment:
#### 1. GPU & Compute Solutions

**For Individuals**
| Product | Description | Price Range |
|---------|-------------|-------------|
| AI Workstation | Pre-built PC with RTX 4090/5090 | $3,000 - $15,000 |
| Home Inference Box | Compact GPU server for local AI | $2,000 - $8,000 |
| GPU Cloud Credits | Pay-as-you-go compute | $0.50 - $5/hour |

| Product | Description | Price Range |
| ------------------ | ------------------------------- | ---------------- |
| AI Workstation | Pre-built PC with RTX 4090/5090 | $3,000 - $15,000 |
| Home Inference Box | Compact GPU server for local AI | $2,000 - $8,000 |
| GPU Cloud Credits | Pay-as-you-go compute | $0.50 - $5/hour |

**For Enterprises**
| Product | Description | Price Range |
|---------|-------------|-------------|
| Private GPU Cluster | On-premise multi-GPU setup | $50,000 - $500,000 |
| Managed Inference | Dedicated cloud infrastructure | $5,000 - $50,000/mo |
| Hybrid Setup | On-prem + cloud overflow | Custom pricing |

| Product | Description | Price Range |
| ------------------- | ------------------------------ | ------------------- |
| Private GPU Cluster | On-premise multi-GPU setup | $50,000 - $500,000 |
| Managed Inference | Dedicated cloud infrastructure | $5,000 - $50,000/mo |
| Hybrid Setup | On-prem + cloud overflow | Custom pricing |

#### 2. AI Appliances

Expand All @@ -921,18 +928,20 @@ Botsmann becomes the one-stop platform for private AI deployment:
#### 3. Robots (Partner Network)

**Consumer Robots**
| Type | Use Case | Partners | Price |
|------|----------|----------|-------|
| Companion | Emotional support, elderly | [TBD] | $500 - $2,000 |
| Home Assistant | Tasks, information | [TBD] | $2,000 - $10,000 |
| Telepresence | Remote presence | [TBD] | $3,000 - $15,000 |

| Type | Use Case | Partners | Price |
| -------------- | -------------------------- | -------- | ---------------- |
| Companion | Emotional support, elderly | [TBD] | $500 - $2,000 |
| Home Assistant | Tasks, information | [TBD] | $2,000 - $10,000 |
| Telepresence | Remote presence | [TBD] | $3,000 - $15,000 |

**Commercial Robots**
| Type | Use Case | Partners | Price |
|------|----------|----------|-------|
| Reception | Greeting, wayfinding | [TBD] | $15,000 - $50,000 |
| Healthcare | Patient assistance | [TBD] | $30,000 - $100,000 |
| Service | Hospitality, retail | [TBD] | $20,000 - $80,000 |

| Type | Use Case | Partners | Price |
| ---------- | -------------------- | -------- | ------------------ |
| Reception | Greeting, wayfinding | [TBD] | $15,000 - $50,000 |
| Healthcare | Patient assistance | [TBD] | $30,000 - $100,000 |
| Service | Hospitality, retail | [TBD] | $20,000 - $80,000 |

#### 4. Complete AI Setups (Turnkey Solutions)

Expand Down
10 changes: 5 additions & 5 deletions docs/SHARED_CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ This document provides comprehensive technical context for the Botsmann project.

### Infrastructure

| Service | Purpose |
| -------------------- | -------------------------------- |
| Hetzner + Caddy | Hosting & deployment (self-host) |
| Supabase | Database, Auth, Storage, SQL API |
| AWS SES | Email delivery |
| Service | Purpose |
| --------------- | -------------------------------- |
| Hetzner + Caddy | Hosting & deployment (self-host) |
| Supabase | Database, Auth, Storage, SQL API |
| AWS SES | Email delivery |

### Development Tools

Expand Down
13 changes: 7 additions & 6 deletions executive-docs/4-internal/INTERNAL_PROCESS_DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -1084,12 +1084,13 @@ function chunkText(text: string, targetTokens: number = 512): string[] {
### 9.2 Access Control

**Who Has Access:**
| Resource | Developers | Admins | CI/CD |
|----------|------------|--------|-------|
| **GitHub Repo** | ✅ | ✅ | ✅ |
| **Vercel** | Read | Full | Deploy |
| **Supabase** | Dev DB | Prod DB | None |
| **AWS SES** | No | Yes | No |

| Resource | Developers | Admins | CI/CD |
| --------------- | ---------- | ------- | ------ |
| **GitHub Repo** | ✅ | ✅ | ✅ |
| **Vercel** | Read | Full | Deploy |
| **Supabase** | Dev DB | Prod DB | None |
| **AWS SES** | No | Yes | No |

**Principle of Least Privilege:**

Expand Down
26 changes: 14 additions & 12 deletions executive-docs/5-operations/OPERATIONS_DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,22 @@
### 2.1 Monitoring Stack

**Current Tools:**
| Tool | Purpose | Access |
|------|---------|--------|
| **Vercel Dashboard** | Deployment, errors, analytics | Team |
| **Supabase Dashboard** | Database, auth, storage | Team |
| **Browser Console** | Client-side errors | Development |
| **Git Logs** | Application logs | Development |

| Tool | Purpose | Access |
| ---------------------- | ----------------------------- | ----------- |
| **Vercel Dashboard** | Deployment, errors, analytics | Team |
| **Supabase Dashboard** | Database, auth, storage | Team |
| **Browser Console** | Client-side errors | Development |
| **Git Logs** | Application logs | Development |

**Recommended (To Be Implemented):**
| Tool | Purpose | Tier |
|------|---------|------|
| **Sentry** | Error tracking | Free (5K errors/mo) |
| **Plausible** | Privacy-friendly analytics | $9/mo |
| **UptimeRobot** | Uptime monitoring | Free (50 monitors) |
| **CloudWatch** | AWS SES metrics | Included |

| Tool | Purpose | Tier |
| --------------- | -------------------------- | ------------------- |
| **Sentry** | Error tracking | Free (5K errors/mo) |
| **Plausible** | Privacy-friendly analytics | $9/mo |
| **UptimeRobot** | Uptime monitoring | Free (50 monitors) |
| **CloudWatch** | AWS SES metrics | Included |

### 2.2 Key Metrics to Monitor

Expand Down
Loading
Loading