A modern, self-hosted URL shortener built with Go, Gin, GORM, and HTMX.
- ✅ Create and manage shortened URLs
- 🚀 Fast redirects using Gin
- 🗃️ Persistent storage with GORM and MySQL
- ⚡ Dynamic frontend updates via HTMX (no page reloads)
- 🔐 Unique shortcodes generation
- 📊 Link Visits
- Go
- Gin - High-performance web framework
- GORM - ORM for Go
- HTMX - Modern frontend interaction without full-page reloads
git clone https://github.com/majdsassi/go-url.git
cd go-urlgo mod tidyDBURL="db_user:db_password@tcp(127.0.0.1:3306)/db_name?charset=utf8mb4&parseTime=True&loc=Local"(if your db does require a password leave it empty and if ur db is remote change the tcp values with db_url:port )
go run migration/migrate.gogo run main.goOR Run it Using CompileDaemon
CompileDaemon -command="./go-url" MIT License. See LICENSEfor details.
Pull requests welcome. If you want to add features like analytics, expiration, or QR code generation—go for it!
