Kibutsu is a full-stack web application that provides a modern, real-time interface for managing Docker containers, images, and compose projects. Built with Go and SvelteKit, it offers a responsive and intuitive experience for Docker management.
- Real-time container monitoring and stats
- Start, stop, and restart containers
- Live container logs with terminal emulation
- Container health status and metrics
- List and search Docker images
- Pull new images with progress tracking
- Image history and details
- Clean up unused images
- Manage multiple compose projects
- Real-time project status monitoring
- Service scaling and orchestration
- Dependency-aware service management
- Real-time resource usage metrics
- WebSocket-based live updates
- System-wide Docker statistics
- Disk usage monitoring
- Go 1.23+
- Docker Engine API
- WebSocket support
- Middleware chain for security and logging
- Context-aware request handling
- SvelteKit 2.x
- TypeScript
- TailwindCSS
- XTerm.js for terminal support
- Real-time stores with Svelte
- Clone the repository:
git clone https://github.com/yourusername/kibutsu.git
cd kibutsu
- Build the frontend:
cd frontend
pnpm install
pnpm run build
- Build the backend:
go build -o kibutsuapi
- Run the application:
./kibutsuapi
- Access the UI at
http://localhost:8080
cd frontend
pnpm install
pnpm dev
go run main.go
The frontend will be available at http://localhost:5173
with:
- Hot module replacement
- API proxy to backend
- TypeScript checking
- Tailwind CSS processing
The backend API will be available at http://localhost:8080
with:
- Auto API version negotiation
- Graceful shutdown
- Request ID tracking
- CORS support
- Structured logging
GET /api/containers
- List containersPOST /api/containers/{id}/start
- Start containerPOST /api/containers/{id}/stop
- Stop containerGET /api/containers/{id}/logs
- Stream container logsGET /api/containers/{id}/stats
- Get container statistics
GET /api/images
- List imagesPOST /api/images/pull
- Pull new imageDELETE /api/images/{id}
- Remove imageGET /api/images/{id}/history
- Get image history
GET /api/compose/projects
- List compose projectsPOST /api/compose/projects/{name}/up
- Start projectPOST /api/compose/projects/{name}/down
- Stop project
GET /api/system/info
- Get system informationGET /api/system/version
- Get Docker versionGET /api/system/disk
- Get disk usage
The application uses environment variables for configuration:
DOCKER_HOST=unix:///var/run/docker.sock # Docker daemon socket
PORT=8080 # Server port
CORS_ORIGIN=http://localhost:5173 # Allowed CORS origin
The frontend uses Svelte's stores for state management. Stores are defined in src/stores.ts
and used throughout the application.
The backend handles requests using middleware chains. The main handler is main.go
, which sets up the middleware and routes.
The application uses WebSockets for live updates. The WebSocket server is implemented in websocket.go
, which handles connections and broadcasts updates to connected clients.
- Fork the repository
- Create your 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
This project is licensed under the MIT License.
- Docker Engine API
- SvelteKit team
- XTerm.js contributors
- TailwindCSS community