Chopper โ๏ธ (URL Shortener) โ
Repository: 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.