mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-05 15:39:38 +01:00
274c3812ed2b7ba8dacd8bd25820598609bcdda0
Add comprehensive prompt sanitization to prevent LLM prompt injection: - Create lib/prompt-sanitizer.ts with detection and filtering - Detect injection patterns (instruction overrides, role manipulation, jailbreaks) - Escape delimiter sequences that could break prompt structure - Wrap user-provided context in XML-like tags with data-not-instructions note - Apply sanitization to all 4 chat API routes: - /api/quick-chat - /api/professional-chat - /api/demo/chat - /api/demo/document-chat Security measures: - Length limits on all user inputs - Injection pattern detection with filtering - Control character removal - Clear separation between instructions and user data Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Botsmann - Your Private AI Professionals
Expert guidance from AI advisors in law, health, research, language, art, and business. Available 24/7, completely private, at a fraction of traditional costs.
Live at: botsmann.vercel.app
Our AI Professionals
| Professional | Role | Description |
|---|---|---|
| Lex | Legal Advisor | Contract reviews, legal questions, case analysis |
| Imhotep | Health Advisor | Health questions, symptom guidance, wellness support |
| Nerd | Research Assistant | Literature review, data analysis, research synthesis |
| Heidi | Language Coach | German/Swiss German learning, translation, cultural guidance |
| Muse | Artistic Advisor | Art feedback, creative direction, style development |
| Trident | Business Strategist | Business planning, strategy, market analysis |
Technology Stack
- Frontend: React, Next.js 14, TailwindCSS
- Backend: Next.js API routes, OpenAI/Groq API
- Database: Supabase (PostgreSQL + pgvector)
- Deployment: Vercel
Getting Started
Prerequisites
- Node.js 18+
- OpenAI or Groq API key
Installation
# Clone and install
git clone https://github.com/g-but/botsmann.git
cd botsmann
npm install
# Configure environment
cp .env.example .env
# Edit .env with your API keys
# Start development server
npm run dev
Project Structure
botsmann/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ ├── bots/ # Detailed bot pages
│ ├── professionals/ # Minimal professional pages
│ └── ...
├── components/ # Shared UI components
├── data/ # Static data (professionals, bots)
├── lib/ # Utilities and helpers
└── types/ # TypeScript definitions
Development
npm run dev # Start dev server
npm run build # Production build
npm run lint # ESLint check
npm run test # Run tests
Deployment
Push to main branch triggers automatic deployment to Vercel via GitHub Actions.
git add .
git commit -m "Your changes"
git push origin main
Documentation
- Best Practices - Coding standards (DRY, SSOT, SoC)
- Commands - Available npm scripts
- Shared Context - Architecture overview
Enterprise
For law firms, medical practices, and businesses needing private, compliant AI deployment, see our Enterprise page.
License
Languages
TypeScript
89.7%
HTML
3.6%
PLpgSQL
2.2%
JavaScript
1.6%
Python
1.3%
Other
1.6%