A modern, production-ready HTTP echo server that parrots back comprehensive request information. Perfect for debugging webhooks, testing HTTP clients, monitoring network requests, and understanding API interactions.
- β‘ Lightning Fast - Built on Bun runtime and Elysia framework for maximum performance
- π Secure by Default - Distroless container, non-root user, sensitive data redaction
- π Comprehensive Echo - Captures method, headers, query params, body, and server metadata
- π Production Ready - Kubernetes health probes, Helm charts, horizontal pod autoscaling
- π Auto-Generated Docs - Interactive OpenAPI/Swagger documentation
- π§ͺ Fully Tested - Comprehensive unit, integration, and e2e test suite
docker run -p 9999:9999 ghcr.io/kayaman/parrot:latesthelm repo add parrot https://kayaman.github.io/parrot
helm install my-parrot parrot/parrotcurl -X POST http://localhost:9999/api/test \
-H "Content-Type: application/json" \
-d '{"hello": "world"}'- API Documentation - Complete API reference
- Helm Guide - Kubernetes deployment guide
- Interactive Docs - Swagger UI (when running)
- Webhook Debugging - Test and debug webhook integrations
- API Client Testing - Validate HTTP client implementations
- Network Monitoring - Inspect request details in real-time
- Load Testing - Lightweight echo server for performance testing
- Learning & Education - Understand HTTP requests and responses
- Bun v1.0.0 or higher
- Docker (for container builds)
- Kubernetes + Helm (for deployment testing)
# Clone the repository
git clone https://github.com/kayaman/parrot.git
cd parrot
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run tests
bun test
# Run linter
bun run check
# Build for production
bun run buildparrot/
βββ src/
β βββ index.ts # Application entry point
β βββ app.ts # Elysia app configuration
β βββ routes/
β β βββ health.ts # Health check endpoints
β β βββ parrot.ts # Echo handler
β βββ services/
β β βββ metadata.ts # Request metadata extraction
β β βββ response.ts # Response builder
β βββ types/
β β βββ index.ts # TypeScript interfaces
β βββ config/
β βββ server.ts # Server configuration
βββ tests/
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ e2e/ # End-to-end tests
βββ charts/parrot/ # Helm chart
βββ docs/ # GitHub Pages site
Liveness probe for Kubernetes. Returns 200 if the application is running.
Readiness probe for Kubernetes. Returns 200 when ready to accept traffic.
Accepts any HTTP method and path. Returns comprehensive request information.
Example Response:
{
"message": "Request echoed successfully",
"timestamp": "2025-12-19T10:30:00.000Z",
"request": {
"method": "POST",
"path": "/api/test",
"query": { "foo": "bar" },
"headers": { "content-type": "application/json" },
"body": { "hello": "world" },
"clientIp": "192.168.1.1",
"userAgent": "curl/8.0.1"
},
"server": {
"hostname": "parrot-pod-abc123",
"platform": "linux",
"uptime": 3600,
"memory": { "heapUsed": 25165824 }
}
}Sensitive headers are automatically redacted:
authorizationcookiex-api-keyx-auth-token
The container image is built using a multi-stage distroless approach:
- Base:
gcr.io/distroless/base-debian12:nonroot - Size: ~60MB
- User: Non-root (UID 65532)
- Health Check: Built-in container health check
- Architectures: linux/amd64, linux/arm64
# Pull the latest image
docker pull ghcr.io/kayaman/parrot:latest
# Run with custom port
docker run -p 8080:9999 -e PORT=9999 ghcr.io/kayaman/parrot:latesthelm repo add parrot https://kayaman.github.io/parrot
helm install my-parrot parrot/parrothelm install parrot-prod parrot/parrot \
--set replicaCount=3 \
--set resources.limits.cpu=500m \
--set resources.limits.memory=512Mi \
--set autoscaling.enabled=true \
--set autoscaling.minReplicas=3 \
--set autoscaling.maxReplicas=20helm install my-parrot parrot/parrot \
--set ingress.enabled=true \
--set ingress.className=nginx \
--set ingress.hosts[0].host=parrot.example.com \
--set ingress.hosts[0].paths[0].path=/# Run all tests
bun test
# Run specific test suites
bun run test:unit
bun run test:integration
bun run test:e2e
# Run with coverage
bun run test:coverageContributions are welcome! Please see CONTRIBUTING.md for details.
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
Built with:
- Elysia - Fast and ergonomic TypeScript framework
- Bun - Fast all-in-one JavaScript runtime
- Biome - Fast linter and formatter
- GitHub: @kayaman
- Issues: GitHub Issues
- Documentation: https://kayaman.github.io/parrot
Made with β€οΈ by kayaman