Code Monkey home page Code Monkey logo

used-trading-market's People

Contributors

hyunsb avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

hyunsb

used-trading-market's Issues

각종 상품 조회 프로세스 구현

👨🏻‍💻 Description

상품 조회 프로세스를 구현한다.
조회 프로세스는 domain과 application 모듈 코드를 작성하지 않고,
Inbound Adapter 에서 Outbound Adapter 와 직접 통신한다.
변경 가능성(UI의 변경 가능성이 높을 것)을 고려하여 의존 방향은 제어 흐름과 동일하게 가져간다.

  • 지역 위치 기반 전체 상품 조회
    • GET /api/v1/posts HTTP 1.1
  • 특정 상품 조회
    • GET /api/v1/posts/{postId} HTTP 1.1
  • 키워드 검색
    • GET /api/v1/posts/keywords?keyword={} HTTP 1.1
  • 카테고리 검색
    • GET /api/v1/posts/categories?catedoryId={} HTTP 1.1

✅ Process

  • Inbound, Outbound Adapter 구현
  • bootstrap, framework 모듈 테스트 코드 작성

🔗 reference

로그인 프로세스 구현

👨🏻‍💻 Description

로그인 프로세스를 구현한다.

  • POST /api/v1/members/login HTTP 1.1
  • 사용자는 email, password를 Application/json 타입으로 ResponseBody에 담아 요청한다.
  • Driving Adapter(hadler)는 각 데이터에 대한 검증을 수행한 이후 UseCase에 따른 Service를 호출한다.
  • Service는 이메일에 해당하는 데이터를 조회하고 비밀번호 검증을 수행한다.
  • 로그인 성공 시 JWT를 생성하여 HTTP header에 담아 반환한다.

✅ Process

  • MemberForLogin 도메인 생성
  • 로그인을 수행하는 비즈니스 로직 구현
  • 로그인을 위한 Driving Adapter 구현
  • 로그인을 위한 Driven Adapter 구현
  • application 모듈 테스트 코드 작성
  • bootstrap 모듈 테스트 코드 작성
  • framework 모듈 테스트 코드 작성

🔗 reference

상품 등록 프로세스 구현

👨🏻‍💻 Description

상품 등록 프로세스를 구현한다.

  • POST /api/v1/posts HTTP 1.1
  • 사용자는 Access token과 상품 정보를 HTTP body에 담아 서버로 요청한다.
  • 사용자의 Access token을 검증한다.
  • 상품 도메인 엔티티를 생성하고 값을 검증하며 문제가 없을 시 영속화한다.
  • 상품 등록 성공 시 상품의 ID 값을 반환한다.

✅ Process

  • Post 도메인 및 비즈니스 로직 구현
  • Driving, Driven Adapter 구현
  • application, domain 모듈 테스트 코드 작성
  • bootstrap, framework 모듈 테스트 코드 작성

🔗 reference

회원 가입 프로세스 구현

👨🏻‍💻 Description

회원 가입 프로세스를 구현한다.

  • POST /api/v1/members HTTP 1.1
  • 사용자는 regionId, email, password, nickname을 Application/json 타입으로 ResponseBody에 담아 요청한다.
  • Driving Adapter(hadler)는 각 데이터에 대한 검증을 수행한 이후 UseCase에 따른 Service를 호출한다.
  • Service는 regionId 검증, 이메일 중복체크, password 암호화를 수행한 뒤 도메인을 생성하고, outputPort를 통해 회원 정보를 저장한다.
  • Driven Adapter는 도메인 객체를 Persistence Entity로 파싱하여 DB 저장 작업을 수행한다.

✅ Process

  • member 도메인 생성
  • 회원 가입을 수행하는 비즈니스 로직 구현
  • 회원 가입을 위한 Driving Adapter 구현
  • 회원 저장을 위한 Driven Adapter 구현
  • application 모듈 테스트 코드 작성
  • bootstrap 모듈 테스트 코드 작성
  • framework 모듈 테스트 코드 작성

🔗 reference

JaCoCo 특정 클래스 Exclude 하기

회원 지역 변경 프로세스 및 카프카 이벤트 처리 구현

👨🏻‍💻 Description

프로젝트에 카프카를 적용하고, 회원 지역 변경 프로세스를 구현한다.
PATCH /api/v1/members/regions HTTP 1.1

post는 작성자의 region을 참조할 수 있어야 한다. post를 작성할 때 member의 regionId를 넣어주기 때문에 아무런 문제가 발생하지 않는다. 하지만 member의 region이 변경된다면, member가 작성한 모든 post를 select한 뒤 regionId를 변경시켜야 하는 오버헤드가 발생한다.

member의 region 정보를 변경하는 것은 빈번하게 발생하지 않기에 위 처럼 처리하는 방식도 UX 관점에서 큰 문제가 발생하진 않을 것이라 생각한다. 하지만 이후 실제로 문제가 발생할 가능성이 있는 유사한 문제를 마주쳤을 때, 해결할 수 있는 능력을 기르기 위해 학습 차원에서 카프카를 적용시켜 이벤트를 처리하도록 구현해보려 한다.

image


✅ Process

  • Apache Kafka 적용
  • application, domain 로직 구현
  • bootstrap, framework 모듈 구현
  • application, domain 모듈 테스트 코드 작성
  • bootstrap, framework 모듈 테스트 코드 작성

🔗 reference

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.