How shukla-ashu/url-shortner-service works
Project type and purpose
• This is a backend service: a RESTful URL shortener built with Java and Spring Boot.
• Purpose: generate compact, shareable short URLs for given long URLs and redirect requests efficiently, using Redis for cache and MongoDB for persistence.
File structure
• Top-level artifacts:
• pom.xml, Maven wrapper files → Java/Spring Boot project built with Maven
• src/main/java/io/skycrate/urlshortner → application entry and package root
• configuration, controller, service, repository, mapper, model, strategy directories → layered architecture
• src/main/resources/application.properties → externalized configuration for MongoDB/Redis
• Tests under src/test/java mirror main packages → unit/integration tests for each layer
README for additional insights
• It outlines a 5-layer architecture: Controller → Service → Strategy → Repository → Database/Cache
• Technology stack: Java 17+, Spring Boot, MongoDB, Redis
• Describes API endpoints (POST /api/shorten, GET /{shortUrl})