Git Product home page Git Product logo

url-tracking's Introduction

URL 트래킹 서비스

개요

  • URL 트랙킹 사이트를 바탕으로 URL 트래킹 기능을 클론하는 프로젝트입니다.
    • 얼마나 많은 사람이 해당 URL 을 클릭했는지를 통계로 확인할 수 있습니다.

실행환경

  • JAVA17
  • Spring Boot 3.X
  • DOCKER

실행방법

  • 프로젝트 최상위 경로에서 docker-compose up 명령어를 통해 실행합니다.
  • docker 실행 후 ./gradlew clean, ./gradlew bootRun 명령어를 통해 실행할 수 있습니다.

사용방법

  • URL 저장
curl --location --request POST 'localhost:8080/api/v1/url' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "http://www.naver.com"
}'
  • 누적 조회수 조회
curl --location --request POST 'localhost:8080/api/v1/url/counts' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "http://www.naver.com"
}'
  • 일주일간 조회수 조회
curl --location --request POST 'localhost:8080/api/v1/url/statistic' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "http://www.google.com"
}'

API 문서

http://localhost:8080/swagger-ui/index.html

기능

  • URL 의 카운트를 증가하는 api 호출시 일간 조회수 및 누적 조회수 1 증가
  • URL 의 카운트를 조회하는 api 호출시 오늘 카운트와 누적 카운트를 응답
  • 하루가 지나면 일간 조회수 초기화
  • 해당 url의 통계를 조회할 수 있고 해당 데이터는 최근 7일간의 일간 조회수 응답

ERD

erd

url-tracking's People

Contributors

etff avatar

Watchers

 avatar

url-tracking's Issues

base62 저장 기능 추가

Is your feature request related to a problem? Please describe.

  • base62 인코딩 기능을 추가

Describe the solution you'd like

  • library를 가져온다
  • 직접 구현한다.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

URL 저장시 인코딩하여 저장

Is your feature request related to a problem? Please describe.

  • URL 저장할때 해싱하여 저장

Describe the solution you'd like

  • URL MD5 처리 및 Base62 인코딩
  • 충돌시 예외처리

Describe alternatives you've considered

  • 데이터베이스에 원본 URL을 읽어서 base62로 저장할 수있다.

Additional context
Add any other context or screenshots about the feature request here.

저장을 위한 entity 생성

Is your feature request related to a problem? Please describe.

  • 엔티티 생성

Describe the solution you'd like

  • 일별
  • 최종 저장을 위한 엔티티 생성

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

일주일간 트래킹 정보 조회

Is your feature request related to a problem? Please describe.

  • 일주일간의 조회수 통계기능이 필요합니다.

Describe the solution you'd like

  • 6일간의 DB의 저장된 데이터 + 오늘의 데이터

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

URL 내역을 redis에 저장

Is your feature request related to a problem? Please describe.

  • URL 내역을 redis에 임시로 저장합니다.

Describe the solution you'd like

  • URL을 레디스에 저장합니다
  • 저장시 중복일 경우 예외처리

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

API 문서화 도구 추가

Is your feature request related to a problem? Please describe.

  • API 기능을 확인할 수 있는 문서가 필요하다.

Describe the solution you'd like

  • 문서 조회를 위해 Swagger를 추가한다.

Describe alternatives you've considered

  • RestDoc을 선택하기

Additional context
Add any other context or screenshots about the feature request here.

스케줄을 통해 트래킹 정보를 저장

Is your feature request related to a problem? Please describe.

  • 하루동안 발생한 스케쥴 정보를 저장해야합니다.

Describe the solution you'd like

  • 레디스에 저장된 정보를 일별 기록합니다.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

md5 기능을 추가

Is your feature request related to a problem? Please describe.

  • 문자를 해싱하기위해 md5 기능을 추가한다.

Describe the solution you'd like

  • 라이브러리를 사용한다

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Redis를 설정

Is your feature request related to a problem? Please describe.

  • Redis가 필요합니다.

Describe the solution you'd like
A clear and concise description of what you want to happen.

  • 레디스 설정 정보 추가

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

URL 기록을 저장할 수 있어야한다

Is your feature request related to a problem? Please describe.

  • URL 정보를 전송받아 기록을 저장한다.

Describe the solution you'd like

  • URL 정보를 전달받아 영속화 한다.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

통계 조회시 날짜 정렬이 필요

Is your feature request related to a problem? Please describe.

  • 통계 조회시 날짜별 정렬이 필요합니다.

Describe the solution you'd like

  • 목록 조회시 날짜를 정렬하여 리턴합니다.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.