Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UShort - URL Shortening Service

A high-performance URL shortening service built with Go, featuring rate limiting and authentication.

Features

  • URL shortening with base62 encoding
  • JWT-based authentication
  • Rate limiting using token bucket algorithm
  • Redis caching for improved performance
  • PostgreSQL database with optimized indexing
  • Swagger API documentation
  • Docker multi-container setup
  • CI/CD pipeline ready

Tech Stack

  • Backend: Go with Gin framework
  • Database: PostgreSQL
  • Cache: Redis
  • Container: Docker
  • API Documentation: Swagger
  • Testing: Go testing framework

Project Structure

.
├── cmd/            # Application entry points
├── internal/       # Private application code
├── pkg/           # Public library code
├── docker/        # Docker configuration
├── docs/          # Documentation
├── scripts/       # Build and deployment scripts
└── tests/         # Test files

Getting Started

Prerequisites

  • Go 1.24 or higher
  • Docker and Docker Compose
  • PostgreSQL
  • Redis

Installation

  1. Clone the repository
git clone https://github.com/yourusername/ushort.git
cd ushort
  1. Copy environment file and configure
cp .env.example .env
  1. Run with Docker Compose
docker-compose up -d

API Documentation

Once the service is running, access the Swagger documentation at:

http://localhost:8080/swagger/index.html

Development

Running Tests

make test

Building

make build

License

MIT License

About

A simple URL Shortener made in Go.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages