Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: backend test

on:
push:
pull_request: [develop, main]
pull_request:
branches: [develop, main]
paths:
- apps/backend/**

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@

## ๐Ÿ›  ๊ธฐ์ˆ  ์Šคํƒ

| ์˜์—ญ | ๊ธฐ์ˆ  ์Šคํƒ |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **๊ณตํ†ต** | ![TypeScript](https://img.shields.io/badge/TypeScript-5.6.3-3178C6?style=flat-square&logo=typescript&logoColor=white) ![WebSocket](https://img.shields.io/badge/WebSocket-8.18.0-010101?style=flat-square&logo=socket.io&logoColor=white) ![TSDoc](https://img.shields.io/badge/TSDoc-0.26.11-3178C6?style=flat-square&logo=typescript&logoColor=white) |
| **Frontend** | ![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat-square&logo=react&logoColor=white) ![Vite](https://img.shields.io/badge/Vite-5.4.10-646CFF?style=flat-square&logo=vite&logoColor=white) ![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-3.4-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white) ![shadcn/ui](https://img.shields.io/badge/shadcn%2Fui-latest-000000?style=flat-square) ![Vitest](https://img.shields.io/badge/Vitest-latest-6E9F18?style=flat-square&logo=vitest&logoColor=white) ![Testing Library](https://img.shields.io/badge/Testing%20Library-latest-E33332?style=flat-square&logo=testing-library&logoColor=white) ![Storybook](https://img.shields.io/badge/Storybook-8.4.2-FF4785?style=flat-square&logo=storybook&logoColor=white) |
| **Backend** | ![NestJS](https://img.shields.io/badge/NestJS-10.4.7-E0234E?style=flat-square&logo=nestjs&logoColor=white) ![MySQL](https://img.shields.io/badge/MySQL-2-4479A1?style=flat-square&logo=mysql&logoColor=white) ![SQLite](https://img.shields.io/badge/SQLite-3-003B57?style=flat-square&logo=sqlite&logoColor=white) ![TypeORM](https://img.shields.io/badge/TypeORM-0.3.20-E93524?style=flat-square&logo=typeorm&logoColor=white) ![Swagger](https://img.shields.io/badge/Swagger-8.0.5-85EA2D?style=flat-square&logo=swagger&logoColor=black) ![Jest](https://img.shields.io/badge/Jest-Testing-C21325?style=flat-square&logo=jest&logoColor=white) ![SuperTest](https://img.shields.io/badge/SuperTest-Testing-009688?style=flat-square&logo=testing-library&logoColor=white) ![Artillery](https://img.shields.io/badge/Artillery-2.0.21-CA2B2B?style=flat-square&logoColor=white) |
| **์ธํ”„๋ผ** | ![NCP](https://img.shields.io/badge/Naver%20Cloud%20Platform-latest-03C75A?style=flat-square&logo=naver&logoColor=white) ![Nginx](https://img.shields.io/badge/Nginx-1.24.0-009639?style=flat-square&logo=nginx&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-3.0-2088FF?style=flat-square&logo=github-actions&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-24.0.7-2496ED?style=flat-square&logo=docker&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-Ubuntu%2022.04-FCC624?style=flat-square&logo=linux&logoColor=black) |
| **ํ˜‘์—… ๋„๊ตฌ** | ![Notion](https://img.shields.io/badge/Notion-2.0.41-000000?style=flat-square&logo=notion&logoColor=white) ![Figma](https://img.shields.io/badge/Figma-latest-F24E1E?style=flat-square&logo=figma&logoColor=white) ![Excalidraw](https://img.shields.io/badge/Excalidraw-latest-6965DB?style=flat-square&logo=excalidraw&logoColor=white) ![Zoom](https://img.shields.io/badge/Zoom-5.17.0-2D8CFF?style=flat-square&logo=zoom&logoColor=white) ![Git](https://img.shields.io/badge/Git-2.42.0-F05032?style=flat-square&logo=git&logoColor=white) ![GitHub](https://img.shields.io/badge/GitHub-latest-181717?style=flat-square&logo=github&logoColor=white) ![GitHub Projects](https://img.shields.io/badge/GitHub%20Projects-latest-181717?style=flat-square&logo=github&logoColor=white) |
| ์˜์—ญ | ๊ธฐ์ˆ  ์Šคํƒ |
| ------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **๊ณตํ†ต** | ![TypeScript](https://img.shields.io/badge/TypeScript-5.6.3-3178C6?style=flat-square&logo=typescript&logoColor=white) ![WebSocket](https://img.shields.io/badge/WebSocket-8.18.0-010101?style=flat-square&logo=socket.io&logoColor=white) ![TSDoc](https://img.shields.io/badge/TSDoc-0.26.11-3178C6?style=flat-square&logo=typescript&logoColor=white) |
| **Frontend** | ![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat-square&logo=react&logoColor=white) ![Vite](https://img.shields.io/badge/Vite-5.4.10-646CFF?style=flat-square&logo=vite&logoColor=white) ![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-3.4-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white) ![shadcn/ui](https://img.shields.io/badge/shadcn%2Fui-latest-000000?style=flat-square) ![Vitest](https://img.shields.io/badge/Vitest-latest-6E9F18?style=flat-square&logo=vitest&logoColor=white) ![Testing Library](https://img.shields.io/badge/Testing%20Library-latest-E33332?style=flat-square&logo=testing-library&logoColor=white) ![Storybook](https://img.shields.io/badge/Storybook-8.4.2-FF4785?style=flat-square&logo=storybook&logoColor=white) |
| **Backend** | ![NestJS](https://img.shields.io/badge/NestJS-10.4.7-E0234E?style=flat-square&logo=nestjs&logoColor=white) ![MySQL](https://img.shields.io/badge/MySQL-2-4479A1?style=flat-square&logo=mysql&logoColor=white) ![SQLite](https://img.shields.io/badge/SQLite-3-003B57?style=flat-square&logo=sqlite&logoColor=white) ![TypeORM](https://img.shields.io/badge/TypeORM-0.3.20-E93524?style=flat-square&logo=typeorm&logoColor=white) ![Swagger](https://img.shields.io/badge/Swagger-8.0.5-85EA2D?style=flat-square&logo=swagger&logoColor=black) ![Jest](https://img.shields.io/badge/Jest-Testing-C21325?style=flat-square&logo=jest&logoColor=white) ![SuperTest](https://img.shields.io/badge/SuperTest-Testing-009688?style=flat-square&logo=testing-library&logoColor=white) |
| **์ธํ”„๋ผ** | ![NCP](https://img.shields.io/badge/Naver%20Cloud%20Platform-latest-03C75A?style=flat-square&logo=naver&logoColor=white) ![Nginx](https://img.shields.io/badge/Nginx-1.24.0-009639?style=flat-square&logo=nginx&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-3.0-2088FF?style=flat-square&logo=github-actions&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-24.0.7-2496ED?style=flat-square&logo=docker&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-Ubuntu%2022.04-FCC624?style=flat-square&logo=linux&logoColor=black) ![Grafana](https://img.shields.io/badge/Grafana-10.2.3-F46800?style=flat-square&logo=grafana&logoColor=white) ![Prometheus](https://img.shields.io/badge/Prometheus-2.43.0-E6522C?style=flat-square&logo=prometheus&logoColor=white) ![k6](https://img.shields.io/badge/k6-0.55.0-7D64FF?style=flat-square&logo=k6&logoColor=white)|
| **ํ˜‘์—… ๋„๊ตฌ** | ![Notion](https://img.shields.io/badge/Notion-2.0.41-000000?style=flat-square&logo=notion&logoColor=white) ![Figma](https://img.shields.io/badge/Figma-latest-F24E1E?style=flat-square&logo=figma&logoColor=white) ![Excalidraw](https://img.shields.io/badge/Excalidraw-latest-6965DB?style=flat-square&logo=excalidraw&logoColor=white) ![Zoom](https://img.shields.io/badge/Zoom-5.17.0-2D8CFF?style=flat-square&logo=zoom&logoColor=white) ![Git](https://img.shields.io/badge/Git-2.42.0-F05032?style=flat-square&logo=git&logoColor=white) ![GitHub](https://img.shields.io/badge/GitHub-latest-181717?style=flat-square&logo=github&logoColor=white) ![GitHub Projects](https://img.shields.io/badge/GitHub%20Projects-latest-181717?style=flat-square&logo=github&logoColor=white) |

## ๐Ÿ— ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜

Expand Down Expand Up @@ -456,7 +456,7 @@ pnpm run start
โ””โ”€โ”€ ...
```

## ํŒ€ ์†Œ๊ฐœ(ํ‘œ์ธ๋ฐ ์–˜๋Š” ์ˆ˜์ •ํ•˜์ง€ ๋ง์•„์ฃผ์„ธ์š”)
## ํŒ€ ์†Œ๊ฐœ

| [J004 ๊ฐ•์ค€ํ˜„](https://github.com/JunhyunKang) | [J074 ๊น€ํ˜„์šฐ](https://github.com/krokerdile) | [J086 ๋„์„ ๋นˆ](https://github.com/typingmistake) | [J175 ์ด๋™ํ˜„](https://github.com/codemario318) | [J217 ์ „ํ˜„๋ฏผ](https://github.com/joyjhm) |
| --------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/quiz-zone/dto/create-quiz-zone.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class CreateQuizZoneDto {

@IsInt({ message: '์ตœ๋Œ€ ํ”Œ๋ ˆ์ด์–ด ์ˆ˜๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.' })
@Min(1, { message: '์ตœ์†Œ 1๋ช… ์ด์ƒ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.' })
// @Max(300, { message: '์ตœ๋Œ€ 300๋ช…๊นŒ์ง€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.' })
@Max(300, { message: '์ตœ๋Œ€ 300๋ช…๊นŒ์ง€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.' })
readonly limitPlayerCount: number;

@IsNotEmpty({ message: 'ํ€ด์ฆˆ์กด์„ ์„ ํƒํ•ด์ฃผ์„ธ์š”.' })
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/quiz-zone/quiz-zone.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ describe('QuizZoneService', () => {
{id: "player1", nickname: "๋ฏธ์นœํˆฌ์‚ฌ", score: 0, ranking: 1},
{id: "player2", nickname: "๋ฏธ์นœํˆฌ์‚ฌ", score: 0, ranking: 1}
],
endSocketTime: Date.now(),
endSocketTime: expect.any(Number),
});
});

Expand Down
10 changes: 6 additions & 4 deletions apps/frontend/src/blocks/CreateQuizZone/CreateQuizZoneBasic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ const CreateQuizZoneBasic = ({
onChange={(e) => handleChangeQuizZoneBasic(e, 'QUIZ_ZONE_ID')}
isBorder={true}
className="rounded-md w-full"
placeholder="ํ€ด์ฆˆ์กด ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”"
placeholder="์ˆซ์ž์™€ ์˜๋ฌธ์ž 5์ž ์ด์ƒ 10์ž ์ดํ•˜"
error={
validationError == '5์ž ์ด์ƒ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.' ||
validationError == '10์ž ์ดํ•˜๋กœ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.'
validationError == '10์ž ์ดํ•˜๋กœ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.' ||
validationError == '์ˆซ์ž์™€ ์•ŒํŒŒ๋ฒณ ์กฐํ•ฉ๋งŒ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.'
? validationError
: ''
}
Expand All @@ -95,12 +96,13 @@ const CreateQuizZoneBasic = ({
label="์ตœ๋Œ€ ์ธ์›"
name="quiz-zone-limit-player-count"
step={10}
min={1}
max={300}
value={limitPlayerCount}
onChange={(e) => handleChangeQuizZoneBasic(e, 'LIMIT')}
isBorder={true}
className="w-20"
isShowCount={true}
min={1}
max={300}
/>
</div>
<Input
Expand Down
21 changes: 21 additions & 0 deletions apps/frontend/src/components/common/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
/>
</div>
)}
{typeof value === 'number' && isShowCount && (
<div className="w-20 text-right pr-1 ml-auto">
<Typography
text={(isNaN(value) ? '-' : value) + '/' + max}
color="gray"
size={
getFontSizeClass().replace('text-', '') as
| 'xs'
| 'sm'
| 'base'
| 'lg'
| 'xl'
| '2xl'
| '3xl'
| '4xl'
| '5xl'
| '6xl'
}
/>
</div>
)}
</div>
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ export const validateQuizZoneSetDescription = (description: string) => {
export const validateQuizZoneSetCode = (code: string) => {
if (code.length < 5) return '5์ž ์ด์ƒ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.';
if (code.length > 10) return '10์ž ์ดํ•˜๋กœ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.';
if (!/^[a-zA-Z0-9]*$/g.test(code)) return '์ˆซ์ž์™€ ์•ŒํŒŒ๋ฒณ ์กฐํ•ฉ๋งŒ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.';
};

//์ž…์žฅ ์ธ์› ์ œํ•œ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ
export const validateQuizZoneSetLimit = (limit: number) => {
if (limit < 1) return '์ตœ์†Œ 1๋ช… ์ด์ƒ ์ง€์ •ํ•ด์ฃผ์„ธ์š”.';
// if (limit > 300) return '์ตœ๋Œ€ ์ธ์›์€ 300๋ช…์ž…๋‹ˆ๋‹ค.';
if (limit > 300) return '์ตœ๋Œ€ ์ธ์›์€ 300๋ช…์ž…๋‹ˆ๋‹ค.';
};
Loading