Files
chat/DEMO_SETUP.md
zeekay 127960720c feat: Add Hanzo IAM SSO integration and rebrand to Hanzo Router
- Added HanzoIAMSSOHandler class for Hanzo IAM authentication
- Integrated Hanzo IAM as an SSO provider alongside Google, Microsoft, and generic SSO
- Updated login UI from 'LiteLLM' to 'Hanzo Router' branding
- Changed error messages to reference Hanzo Router instead of LiteLLM
- Added .env.hanzo-iam.example configuration file
- Updated environment variable from LITELLM_MASTER_KEY to ROUTER_MASTER_KEY (with backward compatibility)
- Added support for HANZO_IAM_CLIENT_ID, HANZO_IAM_CLIENT_SECRET, and HANZO_IAM_SERVER_URL
- Maintained compatibility with existing authentication methods (built-in auth and other SSO providers)
2025-07-15 23:17:03 -05:00

2.4 KiB

Hanzo Chat Demo Setup Guide

Quick Start

Since the chat application starts with no users, you'll need to register your first account.

  1. Navigate to http://localhost:3081
  2. Click "Sign up" or "Register" link
  3. Create an account with:

Option 2: Create Users via MongoDB

If you need to create demo users programmatically:

# Access MongoDB shell
docker exec -it hanzo-mongodb mongosh mongodb://hanzo:hanzo123@localhost:27017/HanzoChat?authSource=admin

# Create demo admin user
db.users.insertOne({
  email: "[email protected]",
  username: "admin",
  name: "Hanzo Admin",
  password: "$2a$10$hashed_password_here", // Use bcrypt to hash "demo1234"
  role: "ADMIN",
  isVerified: true,
  emailVerified: true,
  createdAt: new Date(),
  updatedAt: new Date(),
  refreshToken: [],
  plugins: []
});

Option 3: Environment Configuration

To show demo credentials on the login page when running locally, add to your .env:

# Show demo credentials on login page (development only)
SHOW_DEMO_CREDENTIALS=true
DEMO_EMAIL=[email protected]
DEMO_PASSWORD=demo1234

Features Available After Login

Once logged in, you'll have access to:

  • MCP Tools: File operations, search, code analysis
  • Agent Features: Multi-agent workflows via Hanzo Agent SDK
  • LLM Gateway: Access to 100+ AI providers through unified interface
  • Custom Branding: Hanzo AI themed interface

Troubleshooting

Registration Not Working?

  • Ensure ALLOW_REGISTRATION=true is set in environment
  • Check MongoDB is running: docker ps | grep mongodb
  • Check logs: docker logs hanzo-chat

Login Issues?

  • Clear browser cookies for localhost:3081
  • Verify user exists in database using MongoDB commands above
  • Check JWT secrets are properly set in environment

MCP Tools Not Showing?

  • Verify MCP_ENABLED=true in container environment
  • Check MCP servers configuration at /app/mcp_servers.hanzo.json
  • Restart the chat service: make restart

Security Note

These demo credentials are for local development only. In production:

  • Use strong, unique passwords
  • Disable demo credential display
  • Enable proper authentication (OAuth, LDAP, etc.)
  • Use environment-specific secrets