https://github.com/jongwooo/url-shortener-kotlin
URL Shortener API using Hexagonal Architecture with Kotlin
https://github.com/jongwooo/url-shortener-kotlin
hexagonal-architecture kotlin ports-and-adapters spring-boot url-shortener
Last synced: 7 months ago
JSON representation
URL Shortener API using Hexagonal Architecture with Kotlin
- Host: GitHub
- URL: https://github.com/jongwooo/url-shortener-kotlin
- Owner: jongwooo
- License: mit
- Created: 2023-04-16T01:30:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T13:42:16.000Z (over 2 years ago)
- Last Synced: 2025-01-15T01:46:27.833Z (9 months ago)
- Topics: hexagonal-architecture, kotlin, ports-and-adapters, spring-boot, url-shortener
- Language: Kotlin
- Homepage:
- Size: 83 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# URL Shortener
This project is a URL Shortener API implemented using Hexagonal Architecture and written in Kotlin.
## Structure
This project is structured in Hexagonal Architecture. The core of the application is the domain layer, which is
surrounded by the application layer. The application layer is surrounded by the adapter layer, which contains the
REST Controller and the Redis Database.```
├── UrlShortenerApplication.kt
├── application
│ └── ports
│ ├── input
│ │ └── UrlShortenerUseCase.kt
│ └── output
│ └── UrlHashOutputPort.kt
├── domain
│ ├── exception
│ │ └── HashNotFoundException.kt
│ └── service
│ └── UrlShortenerService.kt
└── infrastructure
└── adapters
├── config
│ ├── BeanConfig.kt
│ └── RedisConfig.kt
├── input
│ └── rest
│ ├── UrlShortenerRestAdapter.kt
│ └── data
│ ├── request
│ │ └── UrlShortenerRequest.kt
│ └── response
│ └── UrlShortenerResponse.kt
└── output
└── persistence
├── UrlHashPersistenceAdapter.kt
└── repository
└── UrlHashRepository.kt
```## Installation
You need a JDK and Gradle for this project.
As a requirement a Redis is necessary. Just start a Redis container with Docker Compose:
```bash
docker-compose up -d
```Then start the application:
```bash
./gradlew bootRun
```## License
Licensed under the [MIT License](LICENSE).