← Back to overview
CLIENT REST LAYER SERVICE LAYER DATA LAYER SCHEDULER HTTP Client Browser / curl / API consumer UrlController POST /shorten · GET /{shortCode} GlobalException Handler UrlService Business logic · cache-aside pattern Base62Encoder long ID → short code UrlRepository Spring Data JPA · JPQL queries Redis url:{code} string cache · TTL PostgreSQL url_mappings table ExpirationCleanupJob @Scheduled 03:00 cron · bulk delete RedisConfig CacheManager · 24h TTL
Click any component in the diagram to see details, properties, and code examples.

Components

Every class in the url-shortener service — click to jump to source

Cache Keys & Redis Schema

Redis key patterns, TTL strategy, and value format used by UrlService