Skip to content

CutLink is a lightweight and efficient URL shortener API built using Go, Redis, and Docker.

Notifications You must be signed in to change notification settings

andresilvase/cutlink-api

Repository files navigation

ShortCut Link API Server ✂🔗

CutLink is a lightweight and efficient URL shortener application built using Go, Redis, and Docker. This project aims to provide a simple and scalable solution for creating and managing shortened URLs.

Features

  • Fast and Scalable: Powered by Go and Redis for optimal performance
  • Containerized Setup: Easily deployable using Docker and Docker Compose
  • Custom Slugs: Generate and use custom or random slugs for shortened URLs
  • RESTful API: Clear and consistent APIs for URL shortening, retrieval, and analytics
  • Cloud-Ready: Designed for deployment on AWS or other cloud platforms

Technologies

  • Backend: Go
  • Database: Redis (key-value store)
  • Containerization: Docker & Docker Compose

Getting Started

Prerequisites

Ensure the following tools are installed:

Clone the Repository

git clone https://github.com/andresilvase/cutlink.git
cd cutlink

Build and Run the Application

  1. Build and start the services:
make up
  1. Access the application at http://localhost:8080.

API Endpoints

  • POST /cut
    Creates a shortened URL
    Request Body:

    {
      "url": "https://example.com/something-here?maybe=here-too"
    }

    Response:

    {
      "data": {
        "shortened_url": "https://example.com/{slug}"
      }
    }
  • GET /{slug}
    Redirects to the original URL

Deployment

The production deployment was made in AWS EC2.

About

CutLink is a lightweight and efficient URL shortener API built using Go, Redis, and Docker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published