How jonasjore/url-shortener works
The active Quarkus application provides URL creation, listing, reveal-by-ID, and redirect endpoints; redirects also increment a visit count. A separate Kotlin implementation remains under legacy/ and supports additional lookup, update, and delete operations. The current controller, service, and repository wiring is visible in sampled source; legacy redirect wiring and some configuration details were not sampled, so they are omitted.
Main entry points: ShortenedUrlController.java URL controller · ShortenedUrlService.java URL service · ShortUrlPanacheRepository.java Panache repository · UrlShortenerRepository.kt Legacy SQL repository
Components 17
HTTP API
- URL controller
src/main/java/no/jore/adapter/in/web/ShortenedUrlController.java - URL input port
src/main/java/no/jore/port/in/ShortenedUrlPort.java
Application Logic
- URL service
src/main/java/no/jore/application/service/ShortenedUrlService.java - URL use cases
src/main/java/no/jore/application/port/in - Short URL model
src/main/java/no/jore/domain/model/ShortUrl.java - API DTOs
src/main/java/no/jore/domain/dto - DTO mapper
src/main/java/no/jore/application/mapper/ShortUrlDTOMapper.java
Persistence
- Panache repository
src/main/java/no/jore/infrastructure/repository/ShortUrlPanacheRepository.java - Entity mapper
src/main/java/no/jore/application/mapper/ShortenedUrlEntityMapper.java - URL entity
src/main/java/no/jore/infrastructure/persistance/ShortUrlEntity.java - PostgreSQL database
Legacy Application
- Legacy REST resource
legacy/src/main/kotlin/endpoints/ShortenedUrlResource.kt - Legacy URL service
legacy/src/main/kotlin/service/UrlShortenerService.kt - Legacy SQL repository
legacy/src/main/kotlin/UrlShortenerRepository.kt - Legacy URL model
legacy/src/main/kotlin/domain/ShortenedUrl.kt - MySQL database
Other components
- HTTP client
Connections 16
- HTTP client → URL controller: sends requests
- URL controller → URL input port: implements
- URL controller → URL service: invokes
- URL controller → DTO mapper: maps input
- URL controller → API DTOs: returns DTO
- URL service → URL use cases: implements
- URL service → Panache repository: calls
- URL service → Short URL model: handles
- Panache repository → Entity mapper: maps records
- Entity mapper → URL entity: converts
- Panache repository → PostgreSQL database: reads and writes
- HTTP client → Legacy REST resource: sends requests
- Legacy REST resource → Legacy URL service: invokes
- Legacy URL service → Legacy SQL repository: calls
- Legacy SQL repository → Legacy URL model: maps rows
- Legacy SQL repository → MySQL database: queries