GithubHelp home page GithubHelp logo

cnu-software-academy / cheerdo-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 3.0 469 KB

[동계 3팀] cheerdo server repo

Java 99.90% Dockerfile 0.10%
java spring spring-boot docker github-actions jpa-hibernate naver-cloud-platform restful-api spring-security

cheerdo-server's Introduction

cheerdo-server

cheerdo server repo

Version

  • spring boot 2.7.7 ( spring 5 )
  • Jdk-17 ( Java 17 )

Ground Rule

Commit Convention

  • the AngulatJS commit convention (type)(scope): (message)

(type)에 들어갈 수 있는 양식

feat : 새로운 기능 추가
fix : 버그 수정
docs : 문서 관련
style : 스타일 변경 (포매팅 수정, 들여쓰기 추가, …)
refactor : 코드 리팩토링
test : 테스트 관련 코드
build : 빌드 관련 파일 수정
ci : CI 설정 파일 수정
perf : 성능 개선
chore : 그 외 자잘한 수정

(scope)는 각자 맡고 있는 domain을 적음

ex) member, main, freinds, post

소문자로 메시지를 통일함.

ex) feat(main): make request validation

reference: https://velog.io/@outstandingboy/Git-%EC%BB%A4%EB%B0%8B-%EB%A9%94%EC%8B%9C%EC%A7%80-%EA%B7%9C%EC%95%BD-%EC%A0%95%EB%A6%AC-the-AngularJS-commit-conventions

Code Convention

  • google Java Style Guide

InteliJ에 있는 Reformat Code 기능을 수시로 할 것

reference: https://google.github.io/styleguide/javaguide.html

Constructor Pattern

  • Builder Pattern 을 사용

reference: https://velog.io/@yje876/Spring-Boot-%EB%B9%8C%EB%8D%94Builder-%ED%8C%A8%ED%84%B4-%EB%B0%8F-%EB%8B%A8%EC%9C%84-%ED%85%8C%EC%8A%A4%ED%8A%B8

cheerdo-server's People

Contributors

bodol4748 avatar kingseungwooya avatar

cheerdo-server's Issues

[Refactor] Friends api refactoring 필요

Issue ( 해결해야할 문제가 무엇인가 ? )

  • endpoint문제 해결
  • path varible ->> request param
  • 친구 삭제 요청시 post와의 relation 때문에 삭제 x -> cascade로 처리
  • 전체적인 코드 리팩토링

[REFACTOR] Todo API 3 tier구조로 구현

Issue ( 해결해야할 문제가 무엇인가 ? )

todo를 위한 crud 기능 및 부가 기능 Service와 Model 구조 만들기

ToDoList ( 해결 하기 위해 해야할 것 )

[FEAT] Entity 설계

Issue ( 해결해야할 문제가 무엇인가 ? )

JPA를 이용하기 위한 Entity설계
cheerdo Database 생성

ERD
image
https://www.erdcloud.com/p/kwNtxj5at9fCkYWHj

ToDoList ( 해결 하기 위해 해야할 것 )

erd를 객체지향적으로 class기반으로 설계한다.
yml파일에 db setting, jpa setting

[FEAT] calender 기능 추가

Issue ( 해결해야할 문제가 무엇인가 ? )

캘린더 날짜별 성공 퍼센티지 표시 필요.

ToDoList ( 해결 하기 위해 해야할 것 )

  • entity 설계
  • 당일 todo가 생기는 시점에서 calender object가 생성되어야한다.
  • todo의 success시 calender table update해야함

[Refactor] common exception

Issue ( 해결해야할 문제가 무엇인가 ? )

controller내에 try catch 부분이 너무 많음

  • wild card type 반환이 너무 많음
  • 어떤 exception인지 가독성 부분에서 떨어짐

controller advicer를 이용해 contoller component에서 발생하는 exception을 한번에 처리해주자

[FEAT] main 페이지 api 개발

Issue ( 해결해야할 문제가 무엇인가 ? )

main페이지에서의 api를 비즈니스 로직을 만들기 전에 dummy data를 통해 Client과 통신을 위한 작업.

ToDoList ( 해결 하기 위해 해야할 것 )

  • dummy data 만들기
  • api 명세서 만들기

[Refactor] DB ERD Refactoring

Issue ( 해결해야할 문제가 무엇인가 ? )

습관 진행도와 캘린더에 매일 성공률를 구하는데 문제가 생김 DB 튜닝이 필요함

  • date로 검색 요건이 많고 calender 습관 진행도 조회시 매 todo에 대해 select하고 count해서 성공률을 계산해야함
  • 습관에 대해서 설정시 주기적으로 자동 생성되야함
  • 습관 진행도를 확인하기 위해서 todo table에 자동으로 추가되서 연산 되어야함

ToDoList ( 해결 하기 위해 해야할 것 )

  • ERD Refactoring
    image
  • Calender table추가

[Refactor] respone token using cookie

Issue ( 해결해야할 문제가 무엇인가 ? )

login 시 token을 serverside쪽에서 httponly형식으로 cookie에 넣어줘야 한다.

ToDoList ( 해결 하기 위해 해야할 것 )

successfulAuthentication method에 반환 시 cookie생성

[HotFix] Habit dPlusDay

Issue ( 해결해야할 문제가 무엇인가 ? )

  • 현재 구현 상황
    • dPlusDay가 작성 날짜 기준으로 계산된다.
  • 수정
    • 현재 날짜를 기준으로 Habit이 연속적으로 성공한 일 수를 반환해야한다.
    • Habit1 ( 1/1 ~ 1/30), Habit2 ( 1/1 ~ 1/10) , Habit3 ( 1/5 ~ 1/20) 이 있고 현재가 1/7일 이라면 1월 1일부터 1월 7일까지 각 해당 날짜의 habit들을 모두 성공했다면 7을 반환한다.

ToDoList ( 해결 하기 위해 해야할 것 )

[FEAT] member 기능 구현

Issue ( 해결해야할 문제가 무엇인가 ? )

  • member info update, read 기능
  • habit progress 반환 기능

[FEAT] api document

Issue ( 해결해야할 문제가 무엇인가 ? )

Client에게 전달할 api documentation필요
Swagger 이용 Version 2.9.2

ToDoList ( 해결 하기 위해 해야할 것 )

  • Build.gradle에 Swagger의존성 적용
  • Swagger Configuration Class 설계

[FEAT] login 기능

Issue ( 해결해야할 문제가 무엇인가 ? )

  • token을 이용한 login기능
  • join시 validation
  • 로그인시 비밀번호 check

[Fix] singleton repo problem

Issue ( 해결해야할 문제가 무엇인가 ? )

도메인 분리 작업의 문제로 싱글톤 객체로 존재해야할 repositroy 객체들이 남용되어 common 패키지에 repo를 분리.

ToDoList ( 해결 하기 위해 해야할 것 )

repository 옮기기

[Ci] Dockerfile 생성

Issue ( 해결해야할 문제가 무엇인가 ? )

docker file로 docker 설정

ToDoList ( 해결 하기 위해 해야할 것 )

  • dockerfile server용과 dev용 생성

[Refactor] Todo 변경사항

Issue ( 해결해야할 문제가 무엇인가 ? )

  • Todo 작성시 id를 uuid형태로 입력받고 그 값을 String형태로 저장해야한다.
  • post 요청시 todo의 lifetime과 날짜를 입력받는다.
  • calender 객체 생성
  • Habit은 입력시 자동으로 다음날까지 Todo Table에 생성된다. 지울시 자동으로 전부 없어지기
  • !! 중요한 점 Todo는 Calender에 의존된다.

ToDoList ( 해결 하기 위해 해야할 것 )

[Feat] Post Sorting

Issue ( 해결해야할 문제가 무엇인가 ? )

post를 갖고오는 api에서 요구사항 추가 조회기간( startDate하고 endDate ) 과 정렬 ( latest, oldest ) request 추가

ToDoList ( 해결 하기 위해 해야할 것 )

dto 변수 추가, 정렬 method 추가

[FEAT] post 페이지 api 개발

Issue ( 해결해야할 문제가 무엇인가 ? )
편지함 페이지에서의 api를 비즈니스 로직을 만들기 전에 dummy data를 통해 Client과 통신을 위한 작업.

ToDoList ( 해결 하기 위해 해야할 것 )
dummy data 만들기
api 명세서 만들기

[Ci/Cd] github action configure 설정

Issue ( 해결해야할 문제가 무엇인가 ? )

github action 용 yml파일 설정.

ToDoList ( 해결 하기 위해 해야할 것 )

  • ci 설정
  • cd 설정

[FEAT] server http to https

Issue ( 해결해야할 문제가 무엇인가 ? )

스프링부트 application, 내장 톰캣서버에 https 프로토콜 적용

ToDoList ( 해결 하기 위해 해야할 것 )

  • domain 등록
  • openssl 인증서 발급 (using certbot)
  • DNS TXT 설
  • nginx 환경설정
  • 프로젝트 yml https 설정 변경

[FEAT] friend list 페이지 API 개발

Issue ( 해결해야할 문제가 무엇인가 ? )

개발해야할 API 목록

  • 내 친구목록을 받아오는 기능
  • 친구의 데이터(보낸편지 받은편지 습관d-day 프로필 한줄소개)를 받아오는 기능
  • 친구를 추가하는 기능
  • 친구를 삭제하는 기능
  • 내가 건 친구요청을 삭제하는 기능
  • 나에게 온 친구요청을 받아오는 기능
  • 나에게 온 친구요청을 수락하는 기능
  • 특정 친구에게 편지를 요청하는 기능

ToDoList ( 해결 하기 위해 해야할 것 )

  • API 명세
  • 더미데이터 만들기

[Fix] coin 처리시 string형태로 처리 문제

Issue ( 해결해야할 문제가 무엇인가 ? )

  • 코인 보상 시 int + int가 아닌 String + int 형태로 되어 concate되는 문제 발생
  • ex) 10개의 코인중 편지 작성시 5개의 reward되어 15개가 되어야하지만 현재 '10'+'5' 되어 105로 표시된다.

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.