A FREE URL shortener app built with Go. Turn your long URLs into short, memorable links.
The ShortenMe Chrome extension allows you to shorten URLs directly from your browser. You can find it in the Chrome Web Store.
- 🚀 Fast and lightweight
- 🔒 Secure with rate limiting
- 📊 Click tracking for shortened URLs
- 🌐 RESTful API
- 🎨 Clean and simple web interface
- 🐳 Docker support
- ⚡ Redis-powered storage
- 🔗 Chrome extension support
Credits to GitDiagram for the architecture diagram.
Credits to GitDiagram for the architecture diagram.
- Go 1.23 or higher
- Redis 7.0 or higher
- Docker (optional)
- Clone the repository:
git clone https://github.com/yingtu35/ShortenMe.git
cd ShortenMe- Install dependencies:
go mod download- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration- Start Redis:
docker run -d -p 6379:6379 redis:7- Run the application:
go run cmd/app/main.goThe application will be available at http://localhost:8080
- Build and run using Docker:
docker build -t shortenme -f .dockerfile .
docker run -p 8080:8080 shortenme- Visit
http://localhost:8080in your browser - Enter a long URL in the input field
- Click "Shorten" to generate a short URL
- Use the short URL to access your original link
- Track clicks by appending
/click-countsto your short URL
POST /shorten
Content-Type: application/x-www-form-urlencoded
url=https://example.com/very/long/urlPOST /click-counts
Content-Type: application/x-www-form-urlencoded
shortURL=http://localhost:8080/abc123go test -v ./...golangci-lint run- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Chi Router
- Redis
- DigitalOcean for hosting

