Ditto - Mirror Your Web World
A powerful Rust-based browser automation framework that perfectly replicates and controls web browser actions through a RESTful API and WebSocket interface. Ditto - because your automation should be an exact copy of what you'd do manually.
๐ Features
- Perfect Mirror: Browser automation that mimics human interaction precisely
- RESTful API: Complete HTTP API for all browser operations
- WebSocket Support: Real-time bidirectional communication
- Skill System: Extensible skill-based automation framework
- Agent Management: Multi-agent support with authentication and authorization
- Rate Limiting: Built-in rate limiting and security features
- Cross-Platform: Works on Windows, Linux, and macOS
๐ ๏ธ Tech Stack
- Backend: Rust with Axum web framework
- Browser Control: Headless Chrome and WebDriver integration
- Authentication: JWT-based auth system
- Real-time: WebSocket connections for live updates
- Containerization: Docker support with multi-arch builds
๐ฆ Installation
From Source
Using Docker
From Docker Hub (Recommended)
From GitHub Container Registry
๐โโ๏ธ Quick Start
1. Start Your Mirror
The Ditto server will start on http://localhost:8080
2. Create a Mirror Agent
3. Mirror Browser Actions
# Navigate to a website (just like you would)
# Take a perfect screenshot
๐ API Documentation
Authentication
All API requests require authentication using a Bearer token (your Ditto access key):
Mirror Endpoints
Agents (Your Mirror Controllers)
GET /api/v1/agents- List all mirror agentsPOST /api/v1/agents- Create a new mirror agentGET /api/v1/agents/:id- Get mirror agent detailsPUT /api/v1/agents/:id- Update mirror agent
Mirror Sessions
POST /api/v1/agents/:id/sessions- Create mirror sessionGET /api/v1/agents/:id/sessions- List agent mirror sessionsGET /api/v1/agents/:id/sessions/:session_id- Get mirror session detailsDELETE /api/v1/agents/:id/sessions/:session_id- Close mirror session
Mirror Actions
POST /api/v1/agents/:id/sessions/:session_id/execute- Execute mirror command
Skills (Mirror Capabilities)
GET /api/v1/skills- List available mirror skillsPOST /api/v1/skills- Create a new mirror skillGET /api/v1/skills/:id- Get skill detailsPOST /api/v1/skills/:id/execute- Execute a mirror skill
System Health
GET /api/v1/health- Ditto health checkGET /api/v1/stats- Mirror system statistics
WebSocket (Real-time Mirroring)
Connect to WebSocket for real-time mirror updates:
const ws = ;
ws ;
๐ง Configuration
The Ditto server can be configured through environment variables:
๐งช Development
Running Tests
Code Formatting
Linting
Building for Release
๐ณ Docker Development
Build Image
# Build locally
Run Container
# From Docker Hub
# Or from GHCR
Deploy to Cloud
The image is available on both registries and can be deployed to any container hosting service:
- Docker Hub:
dittoos/ditto:latest - GitHub Container Registry:
ghcr.io/ditto-os/ditto:master
Development with Docker Compose
๐ Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ HTTP Client โ โ WebSocket โ โ Skill Engine โ
โ โ โ Client โ โ โ
โโโโโโโโโโโฌโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
โ Ditto Server โ
โ (Axum + WebSocket) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโดโโโโโโ โโโโโโโโโดโโโโโโโ โโโโโโโโโดโโโโโโโ
โ Agent โ โ Browser โ โ Security โ
โ Manager โ โ Manager โ โ Module โ
โโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request to https://github.com/ditto-os/ditto
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Axum - Web framework
- Headless Chrome - Browser automation
- Serde - Serialization
- Tokio - Async runtime
๐ Support
- ๐ง Email: support@ditto.dev
- ๐ฌ Discord: Join our Discord
- ๐ Documentation: docs.ditto.dev
Ditto - Making browser automation simple and powerful ๐