Skip to content

Chopper โœ‚๏ธ (URL Shortener) โ€‹

GitHub last commit

Repository: GitHub GitHub

Stack: Golang SQLite Chi Router

Description โ€‹

Chopper is a fast and efficient web application built with Go (Golang) that enables users to shorten long URLs into compact, easy-to-share short URLs. Whether you're sharing links on social media, embedding URLs in emails, or simply trying to manage long and complex URLs, this application provides a convenient solution for creating and expanding short URLs. ๐Ÿ”—

Deployed โ€‹

Access at ch-op.onrender.com

API Endpoints ๐Ÿ“ก โ€‹

Go to API DOCS ๐Ÿ“š

Features ๐ŸŒŸ โ€‹

  • URL Shortening: Convert lengthy URLs into shorter, more manageable versions. โœ‚๏ธ
  • URL Expansion: Restore short URLs back to their original long forms. ๐Ÿ”„
  • Analytics Tracking: Record and track analytics data for every access to a short URL. ๐Ÿ“Š
  • Daily Limiting: Set Daily limits for shortening for anonymous and non-premium users. ๐Ÿ“†
  • Rate Limiting: Prevent abuse by setting limits on the number of resolution requests from an IP address. ๐Ÿšซ
  • Collision Resolution: Handle potential collisions in short URL generation to ensure uniqueness. โš™๏ธ
  • Configuration Flexibility: Customize the application behavior with command-line flags. ๐Ÿ› ๏ธ
  • Lightweight Framework: Utilizes the Chi router for efficient HTTP routing. ๐Ÿš€
  • Reliable Database: Stores URL records and analytics data in an SQLite database. ๐Ÿ—ƒ๏ธ
  • Nano Ids: Uses NanoID of size 6 and 8 encoding for efficient and URL-friendly short URL generation. ๐Ÿ†”
  • Email Notifications: Send email notifications for various actions, including:
    • User sign-up confirmation.
    • Password reset requests. ๐Ÿ“ง

Technologies Used ๐Ÿ’ป โ€‹

  • Programming Language: Go (Golang) ๐Ÿน
  • Web Framework: Chi Router ๐Ÿ›ฃ๏ธ
  • Database: SQLite ๐Ÿ“‚
  • Rate Limiting: Token Bucket Algorithm โณ
  • Encoding: Base(A-Za-z0.9_-) ๐Ÿงฎ

Technical Decisions ๐Ÿง โ€‹

  • Database: SQLite was chosen for its simplicity and portability, suitable for this project's scope. ๐Ÿ“
  • Rate Limiting: Token bucket algorithm offers a balance between simplicity and effectiveness. โณ
  • NanoID: A tiny, secure, URL-friendly, unique string ID generator. ๐Ÿ†”
  • Chi Router: Provides a lightweight and efficient routing framework. ๐Ÿ›ฃ๏ธ
  • Flags: Command-line flags offer configuration flexibility without the need for an external configuration file. ๐Ÿšฉ

License ๐Ÿ“„ โ€‹

This project is licensed under the MIT License.