Installation
Multiple ways to install and run Duckling depending on your needs.Docker (Recommended)
The easiest way to run Duckling for production or testing.Prerequisites
- Docker Engine 20.10+
- Docker Compose 2.0+
- pnpm 10.0.0+
Installation Steps
Install Dependencies and Build
@chittihq/duckling-shared- Shared types@chittihq/duckling-sdk- WebSocket SDK@chittihq/duckling-server- DuckDB server@chittihq/duckling-frontend- Nuxt 4 dashboard
Start Services
- Server API:
http://localhost:3001 - Dashboard:
http://localhost:3000 - MySQL Protocol:
localhost:3307
Docker Commands
Port Configuration
Default ports defined indocker-compose.yml:
| Service | Container Port | Host Port | Purpose |
|---|---|---|---|
| Server (HTTP) | 3000 | 3001 | REST API |
| Server (MySQL) | 3307 | 3307 | MySQL wire protocol |
| Frontend | 3000 | 3000 | Nuxt 4 dashboard |
Change host ports by editing
docker-compose.yml if you have conflicts:Manual Installation
Run Duckling directly on your system without Docker.Prerequisites
- Node.js 20+
- pnpm 10.0.0+
- MySQL database (source)
Steps
Build All Packages
shared- Type definitionssdk- WebSocket clientserver- DuckDB serverfrontend- Dashboard
Available Scripts
Development Setup
For active development with hot reload.Prerequisites
- Node.js 20+
- pnpm 10.0.0+
- Docker and Docker Compose (recommended)
Development with Docker (Recommended)
Start Development Environment
Make Code Changes
Edit files in:
packages/server/src/- Server TypeScript filespackages/frontend/app/- Frontend Vue components/pagespackages/shared/src/- Shared typespackages/sdk/src/- SDK source
Development without Docker
Hot Reload Details
| Service | Watcher | Triggers On | Restart Needed |
|---|---|---|---|
| Server | nodemon | .ts files in packages/server/src/ | Automatic |
| Frontend | Nuxt HMR | .vue, .ts files in packages/frontend/ | No (hot module replacement) |
| Shared | tsc watch | .ts files in packages/shared/src/ | Dependent services restart |
When to rebuild containers:
- Adding/removing npm packages
- Changing Dockerfiles
- Updating system dependencies
- Code changes (hot reload handles it)
.envchanges (restart service only)
Monorepo Structure
Duckling uses pnpm workspaces for package management:Package Dependencies
- server → depends on
shared - frontend → depends on
shared,sdk - sdk → depends on
shared - shared → no dependencies (foundation)
Next Steps
Quick Start
Follow the quick start guide to configure and use Duckling
Configuration
Learn about environment variables and tuning
API Reference
Explore REST endpoints and WebSocket SDK
Deployment
Production deployment guide