A practice project exploring Java & Kotlin interoperability with Spring Boot.
This project is a lightweight URL shortening service built to demonstrate backend development skills and explore the hybrid use of Java and Kotlin within a single Spring Boot application.
- Core Logic: Written in Java (Base62 Encoding) to demonstrate algorithmic logic
- Web Layer: Written in Kotlin using Spring Boot for concise REST controllers
- Persistence: PostgreSQL with Spring Data JPA
- Caching: Redis
- Containerization: Deployed using Docker
It serves as a playground for testing concepts and filling out my GitHub portfolio with a working example of modern backend practices.
- Languages: Java 21, Kotlin 2.2
- Framework: Spring Boot 3
- Database: PostgreSQL 17, Redis
- Containerization: Docker & Docker Compose
- Build Tool: Maven
-
Clone the repository.
git clone https://github.com/gluck243/url-shortener.git
-
Create a
.envfile in the root directory with the following variables:POSTGRES_USER=postgres POSTGRES_PASSWORD=password POSTGRES_DB=url_shortener
-
Build the application:
mvn clean package -DskipTests
-
Launch the stack (App + Database):
docker compose up --build
-
Access the API Documentation:
POST /api/shorten- Accepts{"url": "...", "alias": "..."}and returns a short link.GET /api/{shortCode}- Redirects to the original URL.