Skip to content

Latest commit

History

291 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

TEAM OWNSIZE

1

🔔 서비스명 : 온사이즈

🔔 서비스 한줄소개 : 쉽고 똑똑한 나의 쇼핑 도우미, 온사이즈

🔔 서비스 가치제안 :

  • 단순한 / Simple : 몇 번의 클릭만으로 사이즈를 추천받고 나의 옷장에 저장해요
  • 개인화된 / Personalize : 오로지 나만의 기준으로 옷을 추천받고 분류해요
  • 똑똑한 / Smart : 익스텐션을 통해 보다 똑똑하게 쇼핑해요

🔔 서비스 문제정의 :

  • 사이즈 실패로 인해 발생하게 될 환불, 교환, 반송에 대한 스트레스
  • 정확한 사이즈를 고르고자 다양한 정보를 수집하는 과정 속 번거로움

🔔 서비스 타겟정의 :

  • 패션에 관심이 많아 온라인에서 다양한 의류 및 관련정보를 찾아보며 구매를 결정하는 고객
  • 온라인에서의 사이즈 실패 경험으로 인해 오프라인 쇼핑으로 전환한 고객

🏃 Used 🏃


Node.jsExpressPostgreSQLPrismaAWS
PrettierESLint


👥 Contributors

김동재조하얀
ehdwoKIM yanh2

기능 설명

18192021222426272930


💻 API

기능명엔드포인트담당완료
회원가입 및 로그인[POST] /auth/login조하얀
전체 옷장 조회[GET] /allCloset김동재
전체 옷장 의류 정보 수정[PUT] /allCloset/:productId김동재
전체 옷장 의류 삭제[DELETE] /allCloset/:productId김동재
포함된 카테고리 id 조회[GET] /allCloset/:productId김동재
카테고리에 의류 추가[POST] /allCloset/toCategory김동재
카테고리 전체 조회[GET] /category김동재
카테고리 생성[POST] /category/createCategory김동재
카테고리 삭제[DELETE] /category/:categoryId김동재
카테고리 수정[PUT] /category/:categoryId김동재
카테고리 상세 조회[GET] /category/:categoryId김동재
카테고리 내 의류 핀 고정/해제[PUT] /category/:categoryId/:productId김동재
카테고리 내 의류 삭제[DELETE] /category/:categoryId/:inClothId김동재
마이사이즈 조회[GET] /mysize조하얀
내 상의 사이즈 정보 입력[POST] /mysize/topSize조하얀
내 하의 사이즈 정보 입력[POST] /mysize/bottomSize조하얀
마이페이지 조회[GET] /mypage조하얀
사이즈 추천 기록 조회[GET] /mypage/history조하얀
전체 옷장에 저장[POST] /extesion/toAllCloset김동재
크롤링한 사이즈표 저장[POST] /extesion/saveCrawling김동재
사이즈 추천 결과 저장[POST] /extension/saveBest김동재
비교 사이즈 수동 입력[POST] /extension/inputSize김동재

ERD

AllCloset


🧑‍💻 Code Convention

변수명
  1. Camel Case 사용
  2. 함수의 경우 동사+명사 사용 ( ex) getUser() )
  3. 약어는 되도록 사용하지 않음
주석
  1. 한 줄 주석 사용 //
  2. 함수 주석
/**
* @route
* @desc
* @access
**/
getUser()

이 외 ESLint 라이브러리 문법을 따른다.


🎋 Branch Convention

Branch 이름용도
main초기 세팅
develop배포 branch (api 로직 구현 완료)
feature/#이슈번호이슈별 api 로직 구현
  • feature -> development : Pull Request (코드 리뷰 없이 merge 불가)

⬆️ Commit Convention

[브랜치 이름] 기능 (또는 변경사항) 간략 설명 (70자)
- 보충 설명이 필요한 경우
- Head에 한칸을 띄어서 작성
issue tracker: 이슈 번호 (option)

📂 Folder Constructor

3-Layer Architecture 기반
📁 src
|_ 📁 constants
|_ 📁 controller
|_ 📁 interfaces
|_ 📁 middlewares
|_ 📁 modules
|_ 📁 router
|_ 📁 service
|_ 📁 test
|_ index.ts

schema.prisma

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id(map: "user_pk") @unique(map: "user_id_uindex") @default(autoincrement())
name String? @db.VarChar(10)
email String @unique @db.VarChar(50)
userImage String? @db.VarChar(500)
token String? @db.VarChar(500)
AllCloset AllCloset[]
AllSizeBottom AllSizeBottom[]
AllSizeTop AllSizeTop[]
Category Category[]
Recommend Recommend[]
}
model AllCloset {
id Int @id(map: "Archive_pkey") @unique(map: "Archive_id_key") @default(autoincrement())
userId Int @default(autoincrement())
image String? @db.VarChar(500)
productName String? @db.VarChar(36)
size String? @db.VarChar(10)
memo String? @db.VarChar(50)
isRecommend Boolean?
isPin Boolean @default(false)
mallName String? @db.VarChar(50)
productUrl String? @db.VarChar(500)
faviconUrl String? @db.VarChar(500)
createdAt String? @db.VarChar(20)
User User @relation(fields: [userId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "allcloset_user_id_fk")
AllCloset_Category AllCloset_Category[]
}
model AllSizeBottom {
id Int @id @unique @default(autoincrement())
size String? @db.VarChar(10)
bottomLength Int?
waist Int?
thigh Int?
rise Int?
hem Int?
isWidthOfBottom Boolean?
isManual Boolean?
topOrBottom Int?
manualInputNum Int?
bottomItemId Int?
userId Int @default(autoincrement())
User User @relation(fields: [userId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "allsizebottom_user_id_fk")
}
model AllSizeTop {
id Int @id @unique @default(autoincrement())
size String? @db.VarChar(10)
topLength Int?
shoulder Int?
chest Int?
isWidthOfTop Boolean?
isManual Boolean?
topOrBottom Int?
manualInputNum Int?
topItemId Int?
userId Int @default(autoincrement())
User User @relation(fields: [userId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "allsizetop_user_id_fk")
}
model MySize {
id Int @id @unique @default(autoincrement())
userId Int @unique @default(autoincrement())
topLength Int?
shoulder Int?
chest Int?
isWidthOfTop Boolean?
bottomLength Int?
waist Int?
thigh Int?
rise Int?
hem Int?
isWidthOfBottom Boolean?
}
model Category {
id Int @id @unique @default(autoincrement())
categoryName String? @db.VarChar(20)
isPinCategory Boolean?
image String[] @db.VarChar
userId Int @default(autoincrement())
AllCloset_Category AllCloset_Category[]
User User @relation(fields: [userId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "category_user_id_fk")
}
model AllCloset_Category {
id Int @id @unique @default(autoincrement())
productId Int @default(autoincrement())
categoryId Int @default(autoincrement())
isInPin Boolean?
AllCloset AllCloset @relation(fields: [productId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "allcloset_category_allcloset_id_fk")
Category Category @relation(fields: [categoryId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "allcloset_category_category_id_fk")
}
model Recommend {
id Int @id @unique @default(autoincrement())
userId Int @default(autoincrement())
url String? @db.VarChar(200)
recommendSize String? @db.VarChar(10)
topItemId Int?
bottomItemId Int?
User User @relation(fields: [userId], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "recommend_user_id_fk")
}

🔶 package.json (dependencies module)

{
"name": "Server",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/OWN-SIZE/Server.git",
"author": "ehdwoKIM <kinbell19@gmail.com>",
"license": "MIT",
"scripts": {
"dev": "nodemon",
"build": "tsc && node dist",
"db:pull": "npx prisma db pull",
"db:push": "npx prisma db push",
"generate": "npx prisma generate"
},
"dependencies": {
"@prisma/client": "^4.6.1",
"bcryptjs": "^2.4.3",
"express": "^4.18.2",
"express-validator": "^6.14.2",
"prisma": "^4.6.1",
"typescript": "^4.9.3"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.2",
"@types/express": "^4.17.14",
"@types/express-validator": "^3.0.0",
"@types/node": "^18.11.9",
"nodemon": "^2.0.20",
"ts-node": "^10.9.1"
} }

📌 Server Architecture

  • 개발 환경 : Typescript, Express(Node.js)
  • 데이터베이스 : PostgreSQL, AWS S3
  • 서버 환경 : AWS EC2, PM2

About

ownsize server

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages