Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e4c8592
feat: User 모델 추가
yonjinoh Sep 2, 2025
40b82fb
feat: 비밀번호 해싱 미들웨어 추가
yonjinoh Sep 2, 2025
cfd26c6
feat: User 이미지 필드 null 값 허용 및 email unique
yonjinoh Sep 2, 2025
63233b2
feat: 회원가입, 로그인 로직 추가
yonjinoh Sep 2, 2025
a654760
feat: Refresh Token 로직 추가
yonjinoh Sep 2, 2025
598e48a
feat: Refresh Token 해싱 로직 추가
yonjinoh Sep 3, 2025
e662697
feat: 상품 기능 인가
yonjinoh Sep 3, 2025
e56baf7
feat: 게시글 기능 인가
yonjinoh Sep 3, 2025
762b045
feat: 댓글 기능 인가
yonjinoh Sep 3, 2025
9544433
feat: 마이페이지 기능 추가
yonjinoh Sep 3, 2025
bfacd19
feat: user 유효성 미들웨어 추가
yonjinoh Sep 3, 2025
5254ccc
feat: 좋아요 기능 추가
yonjinoh Sep 3, 2025
bb5c0f3
feat: 게시글 상세 조회 시 좋아요 여부 같이 출력
yonjinoh Sep 3, 2025
06535d3
feat: 상품 상세 조회 시 좋아요 여부 같이 출력
yonjinoh Sep 3, 2025
94629e4
feat: 좋아요 누른 상품 목록 조회
yonjinoh Sep 3, 2025
9bb398f
refactor: 미들웨어 폴더 내 유효성 검사 로직만 따로 모아둠
yonjinoh Sep 3, 2025
f3520c9
refactor: libs 폴더 생성 및 prisma 파일 이동
yonjinoh Sep 3, 2025
93a3e4d
refactor: 토큰 생성 함수 분리 & 일부 오류 수정
yonjinoh Sep 4, 2025
0cb20ac
refactor: 회원가입 해싱 함수 분리
yonjinoh Sep 4, 2025
91d5bf2
refactor: 로그인 관련 코드 리팩토링
yonjinoh Sep 4, 2025
54e74a2
refactor: cloudinary를 활용한 이미지 업로드
yonjinoh Sep 4, 2025
d96ba84
refactor: 유효성 검증 미들웨어 zod로 변경
yonjinoh Sep 4, 2025
70004c4
chore: TS 프로젝트 세팅
yonjinoh Sep 10, 2025
23407d6
refactor: libs 폴더 내 파일들 ts로 마이그레이션
yonjinoh Sep 10, 2025
64b4e49
refactor: external/classes ts로 refactoring
yonjinoh Sep 10, 2025
f568904
refactor: service 폴더 ts 마이그레이션
yonjinoh Sep 10, 2025
fd0ea8e
refactor: 미들웨어 유효성 검사 부분 ts로 변경
yonjinoh Sep 10, 2025
dd0b3c2
refactor: 미들웨어 ts로 변경
yonjinoh Sep 10, 2025
5cd26cf
refactor: 타입 정의 및 install @type/multer
yonjinoh Sep 10, 2025
6befb67
refactor: controller ts로 전환
yonjinoh Sep 10, 2025
295f482
refactor: routes 및 main.ts ts로 변경 & @types/cookie-parser install
yonjinoh Sep 10, 2025
ad99104
bug: article, product 페이지네이션 오류 수정
yonjinoh Sep 11, 2025
d6fa75d
refactor: Controller, Service, Repository로 나누어 코드를 리팩토링
yonjinoh Sep 11, 2025
0147e0d
refactor: article dto 추가
yonjinoh Sep 12, 2025
b144b00
refactor: product dto 추가
yonjinoh Sep 12, 2025
4ff4e67
refactor: 사용자 정보 dto 추가
yonjinoh Sep 12, 2025
04166e4
refactor: comment 유효성 검사 추가 및 dto 추가
yonjinoh Sep 12, 2025
142c1e3
refactor: user.dto -> auth.dto
yonjinoh Sep 12, 2025
73684ff
refactor: mypage 유효성 검사 및 dto 추가
yonjinoh Sep 12, 2025
fc3b8d6
refactor: Token 관련 상수 중복되는 부분 수정
yonjinoh Sep 16, 2025
e8bc5a0
fix: 상태코드 업데이트
yonjinoh Sep 16, 2025
3f3288e
feat: seed 데이터에 user 정보 추가 및 createAt -> createdAt
yonjinoh Sep 16, 2025
8403245
feat(merge): 원격 브랜치 충돌 해결
yonjinoh Sep 16, 2025
632d80c
feat: 비밀번호 변경 시 accessToken, refreshToken 재발급
yonjinoh Sep 16, 2025
5ad050d
feat: 회원탈퇴 기능 추가
yonjinoh Sep 16, 2025
d01a3dc
feat: 로그아웃 구현
yonjinoh Sep 16, 2025
aa0a52f
feat: access-token도 httpOnly로 설정하고, 보안 옵션을 적용
yonjinoh Sep 16, 2025
fb0d36b
refactor: service 내 기능별 폴더 정리
yonjinoh Sep 18, 2025
bfc881c
refactor: 파일명 통일
yonjinoh Sep 18, 2025
786a69f
refactor: validator 파일 service 폴더 내 각 역할 폴더로 이동
yonjinoh Sep 19, 2025
7d56e92
refactor: article & auth dto 추가
yonjinoh Sep 19, 2025
9d5351d
refactor: like, mypage, products dto 수정
yonjinoh Sep 19, 2025
4e97596
refactor: 남아있는 js 파일 ts로 변경
yonjinoh Sep 24, 2025
ec7e086
fix: 코드 리뷰 피드백 반영1(타입 에러 수정)
yonjinoh Sep 24, 2025
3676f25
refactor: 코드 리뷰 피드백 반영
yonjinoh Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/
/generated/prisma
.env
dist/
tsconfig.tsbuildinfo
604 changes: 603 additions & 1 deletion package-lock.json

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"main": "src/main.js",
"type": "module",
"scripts": {
"start": "node src/main.js",
"build": "tsc",
"start": "node dist/main.js",
"dev": "nodemon --watch 'src/**/*.ts' --exec 'node --loader ts-node/esm' src/main.ts",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint .",
"format": "prettier --write ."
Expand All @@ -15,8 +17,10 @@
"description": "",
"dependencies": {
"@prisma/client": "^6.13.0",
"@types/multer": "^2.0.0",
"axios": "^1.10.0",
"bcrypt": "^6.0.0",
"class-validator": "^0.14.2",
"cloudinary": "^1.41.3",
"cookie-parser": "^1.4.7",
"express": "^5.1.0",
Expand All @@ -28,10 +32,18 @@
},
"devDependencies": {
"@eslint/js": "^9.31.0",
"@types/bcrypt": "^6.0.0",
"@types/cookie-parser": "^1.4.9",
"@types/express": "^5.0.3",
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^24.3.1",
"eslint": "^9.31.0",
"eslint-plugin-react": "^7.37.5",
"globals": "^16.3.0",
"nodemon": "^3.1.10",
"prettier": "^3.6.2",
"ts-node": "^10.9.2",
"typescript": "^5.9.2",
"typescript-eslint": "^8.37.0"
},
"prisma": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Warnings:

- You are about to drop the column `createAt` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `updateAt` on the `User` table. All the data in the column will be lost.
- Added the required column `updatedAt` to the `User` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "public"."User" DROP COLUMN "createAt",
DROP COLUMN "updateAt",
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
4 changes: 2 additions & 2 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ model User {
image String?
password String
refreshToken String?
createAt DateTime @default(now())
updateAt DateTime @updatedAt
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
products Product[]
articles Article[]
Comment Comment[]
Expand Down
13 changes: 13 additions & 0 deletions prisma/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();

async function main() {
// User 생성
const user = await prisma.user.create({
data: {
email: "yonjin.oh@gmail.com",
nickname: "오연진",
password: "qwer1234!",
},
});

// Product 하나 생성
const product = await prisma.product.create({
data: {
name: "시딩 상품",
description: "상품 설명",
price: 19900,
tags: ["전자제품", "할인"],
userId: user.id,
},
});

Expand All @@ -17,6 +27,7 @@ async function main() {
data: {
title: "자유게시판 글",
content: "어쩌구 저쩌구",
userId: user.id,
},
});

Expand All @@ -26,10 +37,12 @@ async function main() {
{
content: "상품 댓글 어쩌구",
productId: product.id,
userId: user.id,
},
{
content: "게시글 댓글 어쩌구",
articleId: article.id,
userId: user.id,
},
],
});
Expand Down
92 changes: 0 additions & 92 deletions src/api/controllers/ArticleController.js

This file was deleted.

55 changes: 0 additions & 55 deletions src/api/controllers/AuthController.js

This file was deleted.

92 changes: 0 additions & 92 deletions src/api/controllers/CommentController.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/api/controllers/LikeController.js

This file was deleted.

Loading