A simple URL shortener written in Java. Create shortened links, store them in Redis, and redirect visitors to the original URLs.
Only authenticated admins can create or delete short links.
Note
You need JDK 25+ and Gradle 8.14+ to build this project.
A running Redis instance is required. Start one with:
docker run -p 6379:6379 redis:alpineThen start the application:
./gradlew bootRunOpen http://localhost:8080 and log in as an admin.
The default credentials are defined in application.properties.
In the admin menu you can add new short links. Redirect to the original URL by visiting:
http://localhost:8080/<your-short-link>
We automatically build a Docker image for Shorty.
docker pull ghcr.io/n2o/url-shortener:latestBrowse available versions on the GitHub Container Registry.
Tip
Copy skeleton.env to production.env and adjust the values before starting.
Use Docker Compose for a production setup:
docker compose upThis starts a Redis server with persistent storage and exposes the application on port 8080.
- Write in English
- Open an Issue and assign yourself before working on it
- Create Pull Requests
- Read and follow the Code of Conduct
