Skip to content

Go-Url is a modern, full-stack URL shortener built using Go. It leverages the Gin framework for routing, GORM for ORM/database management, and HTMX for dynamic, responsive frontend behavior. Ideal for developers seeking a practical example of a Go web app with a modern frontend.

Notifications You must be signed in to change notification settings

majdsassi/go-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Url

A modern, self-hosted URL shortener built with Go, Gin, GORM, and HTMX.

💻Demo

image

✨ Features

  • ✅ 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

🏗️ Tech Stack

  • Go
  • Gin - High-performance web framework
  • GORM - ORM for Go
  • HTMX - Modern frontend interaction without full-page reloads

🧪 Getting Started

1. Clone the Repository

git clone https://github.com/majdsassi/go-url.git
cd go-url

2 . Install Dependencies

go mod tidy

3. Create your local variables

DBURL="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 )

5. Migrate Your Database

go run migration/migrate.go

6. Run Your App

go run main.go

OR Run it Using CompileDaemon

CompileDaemon -command="./go-url" 

📄 License

MIT License. See LICENSEfor details.

🤝 Contributing

Pull requests welcome. If you want to add features like analytics, expiration, or QR code generation—go for it!

About

Go-Url is a modern, full-stack URL shortener built using Go. It leverages the Gin framework for routing, GORM for ORM/database management, and HTMX for dynamic, responsive frontend behavior. Ideal for developers seeking a practical example of a Go web app with a modern frontend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages