5e0b6038af5cb7d4860f730094f926c5761546d6
client/package.json: ^0.4.0 -> ^0.13.1 (npm latest). 0.13.x moves the PKCE tx (state+verifier) from sessionStorage to localStorage so it survives the OAuth redirect, fixing login. iam.ts: BrowserIamSdk class renamed to IAM. Import bare '@hanzo/iam' (not the '/browser' subpath): the client tsconfig uses moduleResolution=node, which cannot resolve the exports subpath for types; the bare entry (dist/index.d.ts) re-exports IAM and Vite still bundles dist/browser.js via the browser export condition. Constructor config (IAMConfig) is unchanged. OAuthCallback.tsx: IAMToken fields camelCased in 0.13 (access_token -> accessToken); without this the callback never set the auth header. Lockfile: pnpm-lock.yaml regenerated (authoritative per packageManager=pnpm@10.27.0 + Dockerfile 'pnpm install --frozen-lockfile'). package-lock.json/bun.lock left untouched (not consumed by any build or CI).
fix(oauth): scope loginLimiter to initiation routes, not OIDC callbacks (fixes 429 on code exchange) (#42)
…
ci(build): fix prod image build — delegate Docker Release to reusable workflow; .npmrc into Dockerfile.multi (#38)
Hanzo AI Chat
AI-powered chat platform with enterprise features, using Hanzo's cloud API or local deployment.
Quick Start
# Clone and setup
git clone https://github.com/hanzoai/chat.git
cd chat
# Copy environment template
cp .env.example .env
# Edit .env and add your Hanzo API key
# Get your key at: https://hanzo.ai/dashboard
nano .env
# Start the platform
make up
Access the chat at http://localhost:3081
Development
Basic Development (with hot reload)
make dev
Full Development (with local router)
# Set your LLM API keys
export ANTHROPIC_API_KEY=your-key
export OPENAI_API_KEY=your-key
# Start full dev stack
make dev-full
Architecture
┌─────────────────────────┐ ┌─────────────────────────┐
│ Hanzo Chat UI │────▶│ api.hanzo.ai │
│ (Hanzo Chat) │ │ (or local router) │
│ localhost:3081 │ │ │
└─────────────────────────┘ │ • 100+ AI Models │
│ │ • MCP Tools │
│ │ • Code Execution │
▼ └─────────────────────────┘
┌─────────────────────────┐
│ Local Data Storage │
│ • MongoDB (chat history)│
│ • Meilisearch (search) │
└─────────────────────────┘
Configuration
Required Environment Variables
# Your Hanzo API key (required)
OPENAI_API_KEY=sk-hanzo-your-key-here
# API endpoint (default: Hanzo cloud)
OPENAI_BASE_URL=https://api.hanzo.ai/v1
# Features
MCP_ENABLED=true
ALLOW_REGISTRATION=true
Optional Customization
# Branding
APP_TITLE=My AI Assistant
CUSTOM_FOOTER=Powered by Hanzo AI
# Security
JWT_SECRET=your-secret-key
Commands
Basic Usage
make up # Start services
make down # Stop services
make logs # View logs
make status # Check health
make clean # Remove all data
Development
make dev # Dev mode with hot reload
make build # Build containers
make test # Run tests
make lint # Check code quality
make format # Format code
Production
make prod # Deploy with Traefik
make backup # Backup database
Docker Compose Structure
compose.yml- Base configuration for local developmentcompose.dev.yml- Development overrides (hot reload, local router)compose.prod.yml- Production overrides (Traefik, security)
Features
- 🤖 100+ AI Models via Hanzo Router
- 💬 Clean Chat UI with modern design
- 🔍 Full-Text Search with Meilisearch
- 📝 Persistent Chat History
- 🛠️ MCP Tools for enhanced capabilities
- 🚀 Code Execution via secure runtime
- 🔐 Enterprise Security with JWT auth
Troubleshooting
Chat not loading
# Check service status
make status
# View logs
make logs-chat
# Verify API key
echo $OPENAI_API_KEY
Database issues
# Reset database
make db-reset
# Export data
make db-export
# Import data
make db-import FILE=backup.json
Additional Documentation
Support
- Documentation: https://docs.hanzo.ai
- Issues: https://github.com/hanzoai/chat/issues
- Discord: https://discord.gg/hanzoai# CI Test
Languages
TypeScript
68.1%
JavaScript
21.9%
Python
6.8%
HTML
2.2%
CSS
0.4%
Other
0.5%