MCPSERV.CLUB
Kutt

Kutt

Self-Hosted

Self‑hosted URL shortener with custom domains

Stale(60)
10.2kstars
0views
Updated Apr 24, 2025
Kutt screenshot 1
1 / 3

Overview

Discover what makes Kutt powerful

Kutt is a lightweight, self‑hosted URL shortener written in **Node.js** that prioritizes developer ergonomics. It exposes a RESTful API, supports custom domains, and offers granular control over link attributes (password protection, expiration, description). The core goal is to provide a zero‑configuration experience while still allowing full customization through environment variables and a rich set of configuration files.

Custom Domains

Link Metadata

Analytics

Admin API

Overview

Kutt is a lightweight, self‑hosted URL shortener written in Node.js that prioritizes developer ergonomics. It exposes a RESTful API, supports custom domains, and offers granular control over link attributes (password protection, expiration, description). The core goal is to provide a zero‑configuration experience while still allowing full customization through environment variables and a rich set of configuration files.

Key Features & Technical Capabilities

  • Custom Domains – Resolve *.kutt.it to user‑defined domains via DNS CNAME or A records, with automatic SSL provisioning through Let’s Encrypt.
  • Link Metadata – Store per‑link metadata such as password, expiration timestamp, and description in the database; enforce access control at redirect time.
  • Analytics – Increment counters for hits, store referrer and user‑agent data; expose aggregated stats via /api/stats endpoints.
  • Admin API – CRUD operations for users, links, and domains; role‑based access control (admin vs. regular user).
  • Webhook Support – Trigger external HTTP callbacks on link creation, update, or deletion.
  • Extensibility – Themes and UI customizations via CSS/HTML templates; plugin hooks for adding new authentication providers or storage backends.

Architecture & Stack

LayerTechnology
RuntimeNode.js v20+, Express (or Koa) framework, TypeScript for type safety
PersistenceSQLite (default), PostgreSQL, MySQL/MariaDB; optional Redis for caching
APIRESTful endpoints (/api/*), JSON‑based payloads, JWT authentication
FrontendReact/Vue (SPA) served from /public, hot‑reload in dev mode
ContainerizationOfficial Docker images; docker‑compose manifests for multi‑service setups (DB + Redis)
DeploymentRuns on any platform with Node.js support; Docker Swarm/K8s ready via standard images

The codebase follows a modular structure: controllers, services, and repositories separate business logic from persistence, enabling straightforward unit testing and future refactors.

Deployment & Infrastructure

  • Zero‑config – Launch with docker compose up and the app will auto‑initialize SQLite; no build steps required.
  • Scalability – Horizontal scaling is achieved by running multiple API replicas behind a load balancer; shared DB/Redis ensures state consistency.
  • Persistence Options – Switching databases only requires updating environment variables; migration scripts are bundled (npm run migrate).
  • Resource Footprint – A single container consumes < 100 MiB RAM on a typical web server, making it suitable for VPS or edge deployments.

Integration & Extensibility

  • API – Exposes endpoints for creating, updating, and deleting links (POST /api/links, GET /api/links/:id), with optional query parameters for filtering and pagination.
  • Webhooks – Configurable via the admin UI; send payloads to external services (e.g., Slack, Datadog).
  • OAuth & SSO – Built‑in support for Google/OAuth2; can be extended to other providers via the plugin system.
  • Custom Themes – Replace CSS/JS files in /themes or provide a theme package; the engine resolves themes at runtime.
  • CLI Tools – A small CLI (kutt-cli) allows bulk import/export of links and users, useful for migrations.

Developer Experience

  • Configuration – Environment variables drive behavior (DB_TYPE, REDIS_ENABLED, KUTT_PORT), with a .env.example for reference.
  • Documentation – Comprehensive README, API docs generated with Swagger/OpenAPI spec, and inline code comments.
  • Community – Active GitHub repository with issue tracking; contributors welcome via pull requests.
  • Testing – Jest tests cover controllers and services, ensuring API stability across releases.

Use Cases

ScenarioWhy Kutt?
Internal ToolingQuickly generate shareable links for docs or build artifacts; secure with passwords and expiration.
Marketing CampaignsShort URLs per campaign, custom domains for brand consistency, and analytics to track engagement.
Developer PortalsEmbed link generation in CI/CD pipelines; expose API to external services for automated URL shortening.
Open‑Source ProjectsSelf‑hosted, MIT‑licensed; no third‑party tracking or data leakage.

Advantages Over Alternatives

AspectKutt
PerformanceLightweight Node.js stack; in‑memory caching via Redis reduces DB load.
FlexibilityFull control over database choice, custom domains, and authentication mechanisms.
LicensingMIT‑licensed, permissive for commercial use; no vendor lock‑in.
Ease of DeploymentOne‑liner Docker compose, zero build steps; ideal for rapid prototyping.
ExtensibilityPlugin hooks and theme support allow tailoring UI/UX without core changes.

Kutt offers a robust, developer‑friendly platform for anyone needing a self‑hosted URL shortener that can grow from simple prototypes to production‑grade services.

Open SourceReady to get started?

Join the community and start self-hosting Kutt today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
apis-services
License
MIT
Stars
10.2k
Technical Specs
Pricing
Open Source
Database
SQLite
Docker
Official
Supported OS
LinuxDocker
Author
thedevs-network
thedevs-network
Last Updated
Apr 24, 2025