LinkForge is a minimalist URL shortening engine with smart redirection and live tracking. Designed for developers and product teams who value clean APIs, speed, and extensibility.
Take long URLs and compress them into shareable, trackable links with a single API call. Built with Spring Boot for rapid deployment and easy maintenance.
- Generate custom short links
- Redirect seamlessly to original URLs
- Monitor usage with access counters
- Lightweight, zero-dependency storage options (e.g., H2, MySQL)
- Plug-and-play architecture
📦 com.projectx.urlshortener
┣ 📂controller → REST API interfaces
┣ 📂entity → JPA-mapped domain objects
┣ 📂repository → Data access with Spring Data JPA
┣ 📂advice → Exception management
┗ 📂dto → Transfer models for requests/responses
POST /shorten
Body:
{
"sourceAddress": "https://example.com/very/long/path"
}Returns: compressedLink with short redirect URL
GET /r/{shortCode}
Automatically redirects users to the full URL.
GET /analytics/{shortCode}
Returns number of times the short link has been accessed.
- Clone the repo
- Run with Maven:
./mvnw spring-boot:run
- Or build and run:
mvn package java -jar target/*.jar
- Social media link compression
- Campaign tracking for marketing
- Email-safe URLs
- Lightweight URL monitor
- Java 17+
- Spring Boot
- H2 (default) / MySQL / PostgreSQL support
- Maven build tool