HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏀
[팀14] 슬램 - 우리 주변 농구장 예약
/
🧭
Domain 설계 1
🧭

Domain 설계 1

HTTP Status Code

REST API 관점에서 바라보는 HTTP 상태 코드(HTTP status code)
REST API 관점에서 바라보는 HTTP 상태 코드(HTTP status code) TOC RESTful API 설계 가이드 심화 과정으로 설계 가이드의 HTTP 상태 코드 에 대해서 자세하게 알아보려고 한다. 이번 주제의 핵심은 REST API 관점에서 바라보는 이다. 이 주제를 정한 이유를 알기 위해선 HTTP와 REST 의 관계에 대해서 알 필요가 있다.
REST API 관점에서 바라보는 HTTP 상태 코드(HTTP status code)
https://sanghaklee.tistory.com/61
REST API 관점에서 바라보는 HTTP 상태 코드(HTTP status code)
[HttpStatus] API 처리 별 HttpStatus 리턴 코드 정리
단일 리소스 Method HttpStatus Code Description GET 200 OK GET 404 NOT FOUND 조회 시 데이터 없을 경우 POST 201 CREATED POST 400 BAD REQUEST 생성 요청 시 데이터가 올바르지 않음 PUT 202 ACCEPTED 데이..
[HttpStatus] API 처리 별 HttpStatus 리턴 코드 정리
https://jessyt.tistory.com/122
[HttpStatus] API 처리 별 HttpStatus 리턴 코드 정리
  • 2xx
    • 200 OK
    • 201 Created : 일반적으로 POST 요청 또는 일부 PUT 요청 이후
    • 204 No Content : 요청에 대해서 보내줄 수 있는 콘텐츠가 없지만, 헤더는 의미있음
  • 4xx
    • 400 Bad Request
    • 401 Unauthorized : 클라이언트가 인증이 안되서(unauthenticated) 작업을 진행할 수 없음
    • 403 Forbidden : 클라이언트가 권한이 없기 때문에 작업을 진행할 수 없는 경우
    • 404 Not Found : 요청한 자료/경로 없음
    • 405 Method Not Allowed : 자원(URI)은 존재하지만 해당 자원이 지원하지 않는 메소드일 때
  • 5xx
    • 500 Server Error
 

RestAPI

slam domain 상세
백엔드 완료여부)
수정요청
무한스크롤
책임자
Method
URL
기능
Domain
Entity
비고
프론트 요구자
요청사항
열
백엔드 완료여부)
젤리
GET
/api/v1/users/me
앱 실행시 내 정보/알림 조회
user
user
notifications
백엔드 완료여부)
수정요청
젤리
GET
/api/v1/users/myprofile - 토큰만 필요
내 프로필 정보 조회
user
user
follow
백엔드 완료여부)
수정요청
젤리
PUT
/api/v1/users/me → /api/v1/users/myprofile
내 정보 수정
user
user
백엔드 완료여부)
수정요청
젤리
PUT
/api/v1/users/me/image → /api/v1/users/myprofile/image
내 프로필 이미지 수정
user
user
백엔드 완료여부)
수정요청
젤리
DELETE
/api/v1/users/me/image → /api/v1/users/myprofile/image
내 프로필 이미지 삭제
user
user
백엔드 완료여부)
수정요청
젤리
GET
/api/v1/users/{userId}
다른 사람 회원 프로필 조회
user
user
follow
백엔드 완료여부)
수정요청
무한스크롤
젤리
GET
/api/v1/follow/{userId}/follwers
팔로우 목록 조회
follow
user
follow
백엔드 완료여부)
수정요청
무한스크롤
젤리
GET
/api/v1/follow/{userId}/followings
팔로잉 목록 조회
follow
user
follow
백엔드 완료여부)
헤이
GET
/api/v1/courts/all
농구장 전체 정보 조회
court
court
백엔드 완료여부)
수정요청
무한스크롤
헤이
POST
/api/v1/courts/new
사용자가 농구장 추가하기
court
newCourt
백엔드 완료여부)
무한스크롤
헤이
GET
/api/v1/courts/date=&{date}&time=${time}&start=${latitude}%${longtitude}&end=${latitude}%${longtitude}
사용자가 날짜, 시간, 바운더리로 농구장 검색하기
court
court
reservation
한나
백엔드 완료여부)
헤이
GET
/api/v1/courts/detail/{courtId}
사용자가 선택한 코트에 대한 자세한 정보 읽어오기
court
court
reservation
한나
백엔드 완료여부)
헤이
GET
temp (한나) /api/v1/courts/{courtId}/reservations/{date}
농구장 특정 날짜의 예약 전체조회
백엔드 완료여부)
수정요청
헤이
GET
/api/v1/favorites
농구장 즐겨찾기 리스트 보기
favorite
user
court
favorite
백엔드 완료여부)
헤이
POST
/api/v1/favorites
농구장 즐겨찾기 추가
favorite
user
court
favorite
백엔드 완료여부)
무한스크롤
헤이
DELETE
/api/v1/favorites/{favoriteId}
농구장 즐겨찾기 제거
favorite
user
court
favorite
무한스크롤
헤이
GET
/api/v1/reservations/expired
지난 예약 목록 조회
reservation
user
reservation
court
백엔드 완료여부)
헤이
GET
/api/v1/reservations/upcoming
다가올 예약 목록 조회
reservation
user
reservation
court
무한스크롤
헤이
GET
/api/v1/reservations/{reservationId} →/api/v1/reservations/{courtId}/{startTime}/{endTime}
예약 상세 조회 (토글버튼)
reservation
user
reservation
follow
앤
백엔드 완료여부)
헤이
POST
/api/v1/reservations
예약 추가하기
reservation
user
reservation
court
백엔드 완료여부)
헤이
PATCH
/api/v1/reservations/{reservationId}
예약 변경하기
reservation
user
reservation
court
백엔드 완료여부)
헤이
DELETE
/api/v1/reservations/{reservationId}
예약 취소하기
reservation
user
reservation
court
백엔드 완료여부)
무한스크롤
플로라
GET
/api/v1/notifications?params
알림 조회하기
alarm
user
court
alarmMessage
notificationIndex
loudspeakerNotification
followNotification
follow entity : follow 메시지 관련
플로라
PUT
/api/v1/notifications/read
사용자의 “알람 읽음” 여부 정보 전달
수정요청
무한스크롤
플로라
GET
/api/v1/chat/list?params
채팅 타이틀(목록) 조회하기
chat
user
userCourtMapping
chatTitle
court
무한스크롤
플로라
GET
/api/v1/chat/court/{courtId}?params
채팅 내용 조회
chat
user
court
userCourtMapping
chatTitle
chatDetails
alarmSpeaker
확성기 알림 내용을 따로 chatDetails에 저장해야할까요??
플로라
DELETE
/api/v1/chat/court/{courtId}
사용자의 채팅방 목록에서 채팅방 삭제
chat
수정요청
플로라
POST
/api/v1/chat/court/{courtId}
채팅방 최초 입장하기
chat
chatDetails
수정요청
무한스크롤
공통
GET
/api/v1/management/newCourts
사용자가 추가한 농구장 목록 조회
management
newCourt
No
공통
PATCH
/api/v1/management/newCourt/accept
관리자가 농구장 등록하기
management
newCourt
court
chatTitle
* chatTitle: 새로 추가할 농구장이 기존 농구장이 아니면, 채팅방 새로 생성합니다.
공통
PATCH
/api/v1/management/newCourt/deny
등록한 농구장 등록 취소하기
management
newCourt
court
backUp
 

 

WebSocket

Client Socket
진행 우선순위
역할
Type
destination
content
header
설명
완료
팔로우 선택
Send
/follow
{ receiverId : Number }
token 필요
완료
팔로우 취소
Send
/followcancel
{ receiverId : Number }
token 필요
완료
확성기 실행?
Send
/loudspeaker
{ courtId : Number, startTime : {경기 시작 시간 (ex 13시)}, reservationId : {reservationId}, }
token 필요
- reservation 정보 필요한 이유: 사용자가 본 농구장을 예약한 사람이 맞는지를 확인하기 위해
완료
채팅 정보 전송
Send
/chat
{ courtId : Number, content : String }
token 필요
완료
알림 받기
Subscribe
user/{userId}/notification
알림을 페이지에 뿌려준다.
완료
채팅 받기
Subscribe
user/{courtId}/chat
채팅을 페이지에 뿌려준다.
Server Socket
진행 우선순위
역할
Type
destination
content
header
설명
1순위
진행전
알림 보내기 (팔로우 정보, 확성기 정보)
Send
/user/{userId}notification
{ type: “FOLLOW” || “LOUD_SPEAKER” || ..., followerInfo?: { userId: Number userNickname: String userImage: S3 imageUrl String }, loudSpeakerInfo?: { court: ...CourtInfoAll, startTime: Number }, isRead(1): Boolean, isClicked(2): Boolean }
- 팔우한 사람의 userId 필요한 이유: 프로필을 볼 수 있음으로
2순위
진행전
확성기 정보 전송
Send
/user/{courtId}/chat
{ court: { id: number, name: string }, creator: { id: number, nickname: string, image: string }, conversation: { content: string, } | null, loudSpeaker : { startTime: string, } | null, createdAt: string, updatedAt: string, }
1순위
진행전
팔로우 정보 받기
Subscribe
/follow
{ receiverId : Number }
token 필요
1순위
진행전
팔로우 취소 정보 받기
Subscribe
/followcancel
{ receiverId : Number }
token 필요
1순위
진행전
확성기 정보 받기
Subscribe
/loudspeaker
{ courtId : Number, startTime : {경기 시작 시간 (ex 13시)}, reservationId : {reservationId}, }
token 필요
2순위
진행전
채팅 내용 받기
Subscribe
/chat
{ courtId: Number, content: String }
token 필요
 
 
{ court: { id: number, name: string }, creator: { id: number, nickname: string, image: string }, conversation: { content: string, } | null, loudSpeaker : { startTime: string, } | null, createdAt: string, updatedAt: string, }
 
 
[PUT] /api/v1/users/myprofile/image
 
[GET] /api/v1/users/join
[POST] /api/v1/users/me
/api/v1/user/modify
 

courts

[POST] /api/v1/courts/new
 

favorites

[GET] /api/v1/favorites
[POST] /api/v1/favorites
[DELETE] /api/v1/favorites/{favoriteId}
 

reservations

[GET] /api/v1/reservations/expired/?params
[GET] /api/v1/reservations/upcoming
[POST] /api/v1/reservations
[PATCH] /api/v1/reservations/{reservationId}
[DELETE] /api/v1/reservations/{reservationId}
 

notifications

[GET] /api/v1/notifications?params
[POST] /api/v1/notification
[PUT] /api/v1/notifications/read
 

chat

[GET] /api/v1/chat/list?prams
[GET] /api/v1/chat/court/{courtId}?params
[POST] /api/v1/chat/court/{courtId}
(web socket 처리) 채팅 내용 추가
[DELETE] /api/v1/chat/court/{courtId}
 

management

[GET] /api/v1/management/newCourts?params
[GET] /api/v1/courts
[PATCH] /api/v1/newCourts/accept
[PATCH] /api/v1/management/newCourt/deny
 
/api/v1/user/{userId}
/api/v1/user/
[GET] /api/v1/users/{userId}
[GET] /api/v1/follow/{userId}/followers
[GET] /api/v1/{userId}/followings
[GET]
/api/v1/follow/{userId}/followings
[POST] /api/v1/follow
[DELETE]
/api/v1/follow
[GET] /api/v1/courts/all
 
 
 
 
 
 
 

추가
[POST] api/v1/users/images
[DELETE] api/v1/users/image
[POST] api/v1/court/images
 
[PUT]
/api/v1/users/myprofile
/api
[DELETE] /api/v1/users/{userId}/image
[DELETE] /api/v1/follow/{userId}/followings
[GET] /api/v1/courts/{date}/{time}
[GET] /api/v1/reservations/{courtId}/{startTime}/{endTime}
[GET]
/api/v1/courts/detail/{courtId}/{date}/{dawn}
[GET] /api/v1/courts/?params
[GET] /api/v1/courts/{courtId}/reservations/{date}
[GET] /api/v1/users/myprofile
[GET]
/api/v1/users/me
 
 
 
POST
url: post/comment
{
postId: string
commentContent: {
}
}
 
POST
url: post/[postId]/comment
{
 
}
 
POST
Header: token
api/v1/courts/favorite
{
courtId: string
}
(약속)[GET]
/api/v1/users/me/{userId}/reservation 1