A high-performance URL shortening service with authentication, built with Go and PostgreSQL.
- 🚀 RESTful API with JSON support
- 🔐 JWT Authentication
- 🗄️ PostgreSQL storage with soft deletes
- 📦 Bulk URL operations
- ⚡ Gzip compression middleware
- 🧪 Comprehensive unit tests
- ⚙️ Dual configuration (env vars + CLI flags)
- Go 1.18+
- PostgreSQL 13+
git clone https://github.com/allensuvorov/url-shortener.git
cd url-shortener
# Set up environment
export DATABASE_DSN="postgres://user:password@localhost:5432/dbname?sslmode=disable"
export SERVER_ADDRESS=":8080"
# Run
go run cmd/shortener/main.go