Hosting a Team Chat for the Whole Company
This guide explains how to set up and deploy Probe's web interface as a centralized code intelligence platform for your entire team or company.
Overview
Probe's web interface provides a user-friendly chat experience that allows team members to interact with your codebase using AI. By hosting this interface for your team, you can:
- Create a central knowledge hub for your codebase
- Enable non-technical team members to explore code
- Standardize code exploration and documentation practices
- Secure access to your codebase while making it more accessible
- Reduce onboarding time for new team members
Use Cases
1. Developer Onboarding
New team members can quickly get up to speed on your codebase:
- "Explain the architecture of this project"
- "How is authentication implemented?"
- "What design patterns are used throughout the codebase?"
- "Show me examples of API endpoints"
2. Cross-Team Collaboration
Enable collaboration between different teams:
- Product managers can explore implementation details
- Designers can understand UI component implementations
- QA engineers can investigate how features are implemented
- Support teams can look up error handling patterns
3. Knowledge Sharing
Create a shared understanding of your codebase:
- Generate architecture diagrams
- Document complex workflows
- Explain historical design decisions
- Create consistent mental models across the team
4. Code Reviews
Enhance your code review process:
- Analyze changes for potential issues
- Compare implementation approaches
- Understand the context of changes
- Generate documentation for new features
Deployment Options
1. Local Network Deployment
For teams working in the same office:
# Start the server on your local network
export ANTHROPIC_API_KEY=your_api_key
export ALLOWED_FOLDERS=/path/to/repos
export AUTH_ENABLED=true
export AUTH_USERNAME=team
export AUTH_PASSWORD=secure_password
npx -y @buger/probe-web
Then share the local IP address with your team (e.g., http://192.168.1.100:8080
).
2. Docker Deployment
For more robust deployment:
# Build the Docker image
docker build -t code-search-chat ./examples/web
# Run the container
docker run -p 8080:8080 \
-e ANTHROPIC_API_KEY=your_anthropic_api_key \
-e ALLOWED_FOLDERS=/app/code \
-e AUTH_ENABLED=true \
-e AUTH_USERNAME=team \
-e AUTH_PASSWORD=secure_password \
-v /path/to/your/repos:/app/code \
code-search-chat
3. Cloud Deployment
For teams working remotely:
- Deploy to a VPS or cloud instance
- Set up HTTPS with a valid SSL certificate
- Configure authentication and access controls
- Mount or sync your code repositories to the server
Example using a cloud VM:
# On your cloud server
git clone https://github.com/buger/probe.git
cd probe/examples/web
npm install
# Configure environment
export ANTHROPIC_API_KEY=your_api_key
export ALLOWED_FOLDERS=/path/to/repos
export AUTH_ENABLED=true
export AUTH_USERNAME=team
export AUTH_PASSWORD=secure_password
export PORT=8080
# Use PM2 to keep the server running
npm install -g pm2
pm2 start npm -- start
Security and Privacy Considerations
When hosting for a team, security and privacy become especially important:
Authentication
Always enable authentication for team deployments:
export AUTH_ENABLED=true
export AUTH_USERNAME=your_username
export AUTH_PASSWORD=your_secure_password
Access Control
Carefully control which repositories are accessible:
# Only allow specific repositories
export ALLOWED_FOLDERS=/path/to/repo1,/path/to/repo2
# Exclude sensitive directories
# (Use .gitignore patterns in the repositories themselves)
Network Security
For cloud deployments:
- Use HTTPS with a valid SSL certificate
- Consider IP whitelisting for company networks
- Set up a VPN for additional security
- Use a reverse proxy like Nginx with rate limiting
Example Nginx configuration:
server {
listen 443 ssl;
server_name code-chat.yourcompany.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# Rate limiting
limit_req zone=one burst=10 nodelay;
}
}
Privacy Considerations
When using AI-powered code chat with your team:
- External AI Services: When using Probe with external AI services (Anthropic, OpenAI, etc.), code snippets are sent to those services
- Sensitive Code: Be cautious about allowing access to repositories with sensitive or proprietary code
- Data Retention: Be aware of the AI provider's data retention policies
- Local Model Options: For maximum privacy, consider using Probe with locally-running AI models
- Clear Communication: Ensure team members understand which parts of the system are local vs. cloud-based
API Key Management
Securely manage your API keys:
- Use environment variables instead of hardcoding keys
- Consider using a secrets manager for cloud deployments
- Regularly rotate API keys
- Set up usage alerts to monitor API costs
Team Workflow Integration
Integration with Development Tools
Connect your team chat with other development tools:
- Link from Issue Trackers: Add links to the team chat in JIRA or GitHub issues
- Documentation References: Reference the chat in your documentation
- Slack Integration: Create a Slack command to query the chat
- CI/CD Integration: Generate code explanations during the build process
Onboarding Process
Incorporate the team chat into your onboarding process:
- Include it in your onboarding documentation
- Create starter prompts for new team members
- Use it during pair programming sessions
- Generate team-specific documentation
Advanced Configuration
Custom Styling
Customize the appearance to match your company branding:
- Edit the CSS in
examples/web/index.html
- Add your company logo
- Adjust colors and typography
- Add custom welcome messages
Multiple Repositories
Configure access to multiple repositories:
# Allow access to multiple repositories
export ALLOWED_FOLDERS=/path/to/frontend,/path/to/backend,/path/to/shared-libs
# Start with a specific repository context
# (Users can still switch between allowed repositories)
export DEFAULT_FOLDER=/path/to/frontend
Model Configuration
Optimize the AI model for your team's needs:
# Use a more powerful model for complex codebases
export MODEL_NAME=claude-3-opus-20240229
# Or use a faster model for quicker responses
export MODEL_NAME=claude-3-haiku-20240307
Monitoring and Maintenance
Usage Monitoring
Keep track of how your team is using the chat:
- Enable debug logging for detailed usage information
- Monitor API usage to control costs
- Collect feedback from team members
- Identify common questions for documentation
Regular Updates
Keep your deployment up to date:
- Regularly update the Probe package
- Keep your code repositories in sync
- Rotate API keys and credentials
- Review and update access controls
Example: Enterprise Deployment
Here's a complete example of an enterprise deployment setup:
Infrastructure:
- Dedicated VM or container in your cloud environment
- HTTPS with valid SSL certificate
- Company VPN access
- Regular backups
Configuration:
bash# API access export ANTHROPIC_API_KEY=your_api_key # Repository access export ALLOWED_FOLDERS=/app/repos/frontend,/app/repos/backend,/app/repos/mobile # Security export AUTH_ENABLED=true export AUTH_USERNAME=company_username export AUTH_PASSWORD=strong_company_password # Performance export MODEL_NAME=claude-3-opus-20240229 export PORT=8080 # Debugging export DEBUG=false
Repository Sync:
- Set up a cron job to regularly sync repositories
- Use read-only access for security
- Exclude sensitive files and directories
Monitoring:
- Set up logging to a central system
- Monitor API usage and costs
- Track system performance
- Set up alerts for errors or downtime
Best Practices
- Create Usage Guidelines: Document how and when to use the team chat
- Develop Common Queries: Share effective prompts and queries
- Integrate with Documentation: Link to the chat from your documentation
- Regular Training: Train team members on effective usage
- Feedback Loop: Collect and incorporate user feedback
- Cost Management: Monitor and optimize API usage
- Security Reviews: Regularly review access and security settings
Troubleshooting
Common Team Deployment Issues
Issue | Solution |
---|---|
High API costs | Implement usage limits, use smaller models for simple queries |
Slow responses | Check network connectivity, consider a more powerful server |
Authentication problems | Verify credentials, check for typos in environment variables |
Repository access issues | Check file permissions, verify paths in ALLOWED_FOLDERS |
Model errors | Verify API key permissions, check model availability |
Privacy concerns with sensitive code | Use local AI models, restrict access to sensitive repositories, or implement custom data filtering |
Support Resources
If you encounter issues with your team deployment:
- Check the Web Interface Reference for detailed configuration options
- Review the AI Integration Reference for model-specific information
- Visit the Probe GitHub repository for the latest updates
- Open an issue if you encounter a bug or have a feature request
Next Steps
- Learn about using Probe with AI Code Editors for individual developer workflows
- Explore building custom tools with the Node.js SDK
- Check out the CLI Reference for advanced command-line usage