Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/seonghun-dev/quicklink

Quick & Free URL shortener
https://github.com/seonghun-dev/quicklink

Last synced: 9 days ago
JSON representation

Quick & Free URL shortener

Awesome Lists containing this project

README

        

# Quick Link - Quick & Free URL shortener

[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fseonghun-dev%2FQuickLink&count_bg=%231193F1&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)

## ๐Ÿ’โ€โ™‚๏ธ ์„œ๋น„์Šค ์†Œ๊ฐœ

Quick Link๋Š” ๋‹จ์ถ• URL์„ ์ œ๊ณตํ•˜๋Š” ๋ฌด๋ฃŒ ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž๋Š” ๊ธด URL์„ ์งง๊ณ  ๊ธฐ์–ตํ•˜๊ธฐ ์‰ฌ์šด ๋งํฌ๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ ๊ฐ„ํŽธํ•˜๊ฒŒ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

screenshot 2024-06-15 แ„‹แ…ฉแ„’แ…ฎ 3 44 06

## ๐Ÿ“ˆ Dependency and Quick Start
### ๐Ÿ“ฆ Dependency

Quick Link๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ์˜์กด์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค

- Java 21
- Spring Boot 3.3.0
- MySQL 8.0.1
- Gradle 8.8

### ๐Ÿš€ Quick Start
1. ์ €์žฅ์†Œ๋ฅผ clone ํ•ฉ๋‹ˆ๋‹ค.
```Bash
git clone https://github.com/seonghun-dev/QuickLink.git
cd QuickLink
```

2. Docker-compose๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‹คํ–‰์‹œํ‚ค๊ณ , schema.sql ํŒŒ์ผ์„ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์Šคํ‚ค๋งˆ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
```bash
docker-compose up -d
```

4. Gradle์„ ํ†ตํ•ด ๋นŒ๋“œํ•˜๊ณ , ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰์‹œํ‚ต๋‹ˆ๋‹ค.
```bash
./gradlew build
./gradlew bootRun
```

5. ๋ธŒ๋ผ์šฐ์ €์—์„œ http://localhost:8080 ์œผ๋กœ ์ด๋™ํ•˜์—ฌ ์„œ๋น„์Šค๋ฅผ ์ด์šฉํ•ฉ๋‹ˆ๋‹ค.

## ๐Ÿ› ๏ธ ๊ตฌํ˜„
Quick Link๋Š” URL ๋‹จ์ถ•์„ ์œ„ํ•ด Base62 ์ธ์ฝ”๋”ฉ๊ณผ Snowflake ID ์ƒ์„ฑ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

**Base62 ์ธ์ฝ”๋”ฉ**

Base62๋Š” URL์— ์•ˆ์ „ํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ฌธ์ž ์ง‘ํ•ฉ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ˆซ์ž ID๋ฅผ ์งง์€ ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.
์•ŒํŒŒ๋ฒณ ๋Œ€์†Œ๋ฌธ์ž์™€ ์ˆซ์ž (0-9)๋ฅผ ํฌํ•จํ•œ 62๊ฐœ์˜ ๋ฌธ์ž๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.
์ด๋ฅผ ํ†ตํ•ด ๋‹จ์ถ•๋œ URL์ด ์ƒ๋Œ€์ ์œผ๋กœ ์งง๊ณ  ์‚ฌ์šฉํ•˜๊ธฐ ํŽธ๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

**Snowflake ID ์ƒ์„ฑ**

Snowflake ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ํŠธ์œ„ํ„ฐ์—์„œ ๊ฐœ๋ฐœํ•œ ๋ถ„์‚ฐ ์‹œ์Šคํ…œ์„ ์œ„ํ•œ ๊ณ ์œ  ID ์ƒ์„ฑ๊ธฐ์ž…๋‹ˆ๋‹ค.
์ด ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ 64๋น„ํŠธ ์ˆซ์ž๋กœ ๊ตฌ์„ฑ๋œ ๊ณ ์œ  ID๋ฅผ ์ƒ์„ฑํ•˜๋ฉฐ, ํƒ€์ž„์Šคํƒฌํ”„, ๋ฐ์ดํ„ฐ์„ผํ„ฐ ID, ๋จธ์‹  ID, ์ผ๋ จ ๋ฒˆํ˜ธ ๋“ฑ์„ ์กฐํ•ฉํ•˜์—ฌ ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ๊ณ ์œ  ID๋ฅผ ๋น ๋ฅด๊ฒŒ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. .

### ๐Ÿ“„ ๋ผ์ด์„ ์Šค
์ด ํ”„๋กœ์ ํŠธ๋Š” MIT ๋ผ์ด์„ ์Šค๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ LICENSE ํŒŒ์ผ์„ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.