Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c6b2f9b
:wrench: [Chore]: airbnb eslint 모듈 설치
zero0205 Jan 8, 2025
4dbb3a3
:recycle: [Refactor]: eslint --fix 옵션으로 수정된 파일들
zero0205 Jan 8, 2025
f539093
:recycle: [Refactor]: Profile 페이지 eslint 에러 수정
zero0205 Jan 9, 2025
f324567
:recycle: [Refactor]: ChatContainer 컴포넌트 eslint 에러 수정
zero0205 Jan 9, 2025
549fa1a
:recycle: [Refactor]: Record 페이지 eslint 에러 수정
zero0205 Jan 9, 2025
71b2de4
:recycle: [Refactor]: Home 페이지 eslint 에러 수정
zero0205 Jan 9, 2025
dd2f3b9
:recycle: [Refactor]: Auth 페이지 eslint 에러 해결
zero0205 Jan 9, 2025
f0acc4b
:recycle: [Refactor]: Broadcast 페이지 eslint 에러 수정
zero0205 Jan 9, 2025
a16b631
:recycle: [Refactor]: components 디렉터리 내 파일들 eslint 에러 수정
zero0205 Jan 9, 2025
0a5098a
:recycle: [Refactor]: contexts의 eslint 에러 수정
zero0205 Jan 9, 2025
edcbd75
:recycle: [Refactor]: Live 페이지 eslint 에러 수정
zero0205 Jan 10, 2025
ef7d27c
:recycle: [Refactor]: 커스텀 훅들 eslint 에러 수정
zero0205 Jan 10, 2025
0e37e8d
:recycle: [Refactor]: 타입 선언 방식 type alias로 통일
zero0205 Jan 12, 2025
fadebd5
:recycle: [Refactor]: .eslintrc 파일 가독성 개선
zero0205 Jan 12, 2025
6e8c7d9
:bug: [Fix]: env.d.ts의 타입 선언을 interface로 다시 변경
zero0205 Jan 13, 2025
f4c7fc0
Merge pull request #2 from boostcampwm-2024/Refactor/1
zero0205 Jan 14, 2025
d6b557e
:bug: [Fix]: tailwind.config.js 빌드 관련 문제 해결
zero0205 Jan 14, 2025
7adc97e
Merge pull request #4 from boostcampwm-2024/Refactor/1
zero0205 Jan 14, 2025
8c7faf1
:bug: [Fix]: 캐릭터가 초기 로딩 시 의도와 다르게 보이는 현상 수정
zero0205 Jan 14, 2025
2e833dc
:bug: [Fix]: 버튼 안에 버튼 넣어서 발생하는 경고 해결
zero0205 Jan 14, 2025
9b96bb7
:recycle: [Refactor]: fSD 구조 적용 - 1. 코드를 pages 단위로 분할
zero0205 Jan 14, 2025
9924b10
:recycle: [Refactor]: FSD 구조 적용 - 1. 코드를 pages 단위로 분할
zero0205 Jan 14, 2025
62eaf42
:recycle: [Refactor]: FSD 구조 적용 - 2. 모든 것을 페이지에서부터 분리하기
zero0205 Jan 14, 2025
bff4ded
:recycle: [Refactor]: FSD 구조 적용 - 4. shared 레이어 unpack
zero0205 Jan 14, 2025
216023c
Merge branch 'Refactor/3' of https://github.com/boostcampwm-2024/refa…
zero0205 Jan 15, 2025
e84e4a7
:recycle: [Refactor]: FSD 구조 적용 - 4. shared 레이어 unpack 마무리
zero0205 Jan 15, 2025
db88229
:recycle: [Refactor]: FSD 구조 적용 - 5. Technical Purpose에 따라 코드 구성하기
zero0205 Jan 15, 2025
f74dd2b
:recycle: [Refactor]: FSD 구조 적용 - 6. 슬라이스를 features/entities 레이어로 분리하기
zero0205 Jan 16, 2025
f70878f
:recycle: [Refactor]: FSD 구조 적용 - 6. 슬라이스를 features 레이어로 분리하기
zero0205 Jan 16, 2025
63fce80
Merge branch 'Refactor/3' of https://github.com/boostcampwm-2024/refa…
zero0205 Jan 19, 2025
6e4072a
:recycle: [Refactor]: FSD 구조 적용 - 7. widgets 레이어로 분리하기
zero0205 Jan 19, 2025
def97dd
Merge pull request #6 from boostcampwm-2024/Refactor/3
zero0205 Jan 20, 2025
4f57377
:wrench: [Chore]: sonarqube-scanner 설치 및 설정
zero0205 Jan 21, 2025
d33ae85
:recycle: [Refactor]: 컴포넌트 props를 read-only로 지정
zero0205 Jan 21, 2025
a0854ae
:recycle: [Refactor]: auth guard 토큰 인증 방식 수정
huiseon37 Jan 23, 2025
350d0cb
Merge pull request #10 from boostcampwm-2024/Refactor/8
huiseon37 Jan 24, 2025
3d6679f
:recycle: [Refactor]: lazy Loading 적용
zero0205 Feb 9, 2025
c2a568b
:recycle: [Refactor]: 방송 송출 연결 관련 커스텀 훅 통합
zero0205 Feb 9, 2025
fac49cf
:bug: [Fix]: useAPI 훅의 무한 리렌더링 이슈 해결
zero0205 Feb 9, 2025
6b7da44
:recycle: [Refactor]: 방송 시청 연결 관련 커스텀 훅 통합
zero0205 Feb 9, 2025
d4beb60
:recycle: [Refactor]: SonarQube 분석으로 발견된 Reliability 이슈 수정
zero0205 Feb 9, 2025
68ef4ba
:recycle: [Refactor]: SonarQube Maintability 이슈 해결
zero0205 Feb 9, 2025
632446f
Merge pull request #11 from boostcampwm-2024/Refactor/7
zero0205 Feb 10, 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
3 changes: 2 additions & 1 deletion apps/chat/src/auth/jwt-auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import { ErrorStatus } from 'src/common/responses/exceptions/errorStatus';
export class JWTAuthGuard extends AuthGuard('jwt') {
getRequest(context: ExecutionContext) {
const client = context.switchToWs().getClient<Socket>();
const authorization = client.handshake.auth.accessToken || client.handshake.headers.accesstoken;

return {
headers: {
authorization: client.handshake.auth.accessToken,
authorization,
},
};
}
Expand Down
9 changes: 9 additions & 0 deletions apps/client/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# shadcn/ui 컴포넌트 폴더 무시
src/shared/ui/shadcn/*

# node_modules는 기본적으로 무시되지만, 명시적으로 추가할 수도 있습니다
node_modules/

# 다른 무시하고 싶은 파일/폴더들
dist/
build/
45 changes: 36 additions & 9 deletions apps/client/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
{
"parser": "@typescript-eslint/parser",

"parserOptions": {
"project": ["./apps/client/tsconfig.json"],
"project": ["./tsconfig.json"],
"ecmaVersion": 12,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},

"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],

"extends": ["airbnb", "airbnb/hooks", "plugin:@typescript-eslint/recommended", "prettier"],

"settings": {
"react": {
"version": "detect"
}
},

"plugins": ["prettier"],

"rules": {
// React 관련 규칙
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
],
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",

// TypeScript 관련 규칙
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
Expand All @@ -38,6 +48,23 @@
"varsIgnorePattern": "^_", // _ 로 시작하는 변수는 무시
"ignoreRestSiblings": true
}
],

// Import/Export 관련 규칙
"import/no-unresolved": "off",
"import/extensions": ["off"],
"import/prefer-default-export": "off",
"no-restricted-exports": "warn",

// 접근성 관련 규칙
"jsx-a11y/media-has-caption": "off",

// 기타 규칙
"no-param-reassign": [
"warn",
{
"props": false
}
]
}
}
4 changes: 4 additions & 0 deletions apps/client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Sonar
.sonar/
.scannerwork/
11 changes: 10 additions & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint",
"preview": "vite preview"
"preview": "vite preview",
"sonar": "sonar-scanner"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.1",
Expand All @@ -33,17 +34,25 @@
"@types/node": "^20.3.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.20",
"eslint": "*",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "*",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "*",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"postcss": "^8.4.47",
"prettier": "*",
"sonarqube-scanner": "^4.2.6",
"tailwindcss": "^3.4.14",
"typescript": "*",
"vite": "^5.4.10"
}
}
3 changes: 3 additions & 0 deletions apps/client/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=CamOn
sonar.sources=.
sonar.host.url=http://localhost:9000
4 changes: 0 additions & 4 deletions apps/client/src/App.css

This file was deleted.

24 changes: 0 additions & 24 deletions apps/client/src/App.tsx

This file was deleted.

71 changes: 0 additions & 71 deletions apps/client/src/Router.tsx

This file was deleted.

18 changes: 18 additions & 0 deletions apps/client/src/app/layouts/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Outlet } from 'react-router-dom';
import { Toaster } from '@/shared/ui/shadcn/toaster';
import { Header } from '@/widgets';
import { FloatingButton } from '@/shared/ui';
import { Providers } from '../providers';

export function Layout() {
return (
<Providers>
<Header />
<main className="pt-[74px] h-full">
<Outlet />
</main>
<Toaster />
<FloatingButton />
</Providers>
);
}
1 change: 1 addition & 0 deletions apps/client/src/app/layouts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Layout } from './Layout';
9 changes: 9 additions & 0 deletions apps/client/src/app/providers/AuthProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { useMemo, useState } from 'react';
import { AuthContext } from '@/shared/contexts';
import { ProviderProps } from './types';

export function AuthProvider({ children }: ProviderProps) {
const [isLoggedIn, setIsLoggedIn] = useState(() => !!localStorage.getItem('accessToken'));
const value = useMemo(() => ({ isLoggedIn, setIsLoggedIn }), [isLoggedIn, setIsLoggedIn]);
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
}
11 changes: 11 additions & 0 deletions apps/client/src/app/providers/Providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ThemeProvider } from '@/app/providers/ThemeProvider';
import { AuthProvider } from '@/app/providers/AuthProvider';
import { ProviderProps } from './types';

export function Providers({ children }: ProviderProps) {
return (
<AuthProvider>
<ThemeProvider>{children}</ThemeProvider>
</AuthProvider>
);
}
11 changes: 11 additions & 0 deletions apps/client/src/app/providers/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { useMemo, useState } from 'react';
import { ThemeContext } from '@/shared/contexts';
import { ProviderProps } from './types';

type Theme = 'light' | 'dark' | null;

export function ThemeProvider({ children }: ProviderProps) {
const [theme, setTheme] = useState<Theme>(() => (localStorage.getItem('theme') as Theme) ?? null);
const value = useMemo(() => ({ theme, setTheme }), [theme, setTheme]);
return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
}
1 change: 1 addition & 0 deletions apps/client/src/app/providers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Providers } from './Providers';
1 change: 1 addition & 0 deletions apps/client/src/app/providers/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type ProviderProps = Readonly<{ children: React.ReactNode }>;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react';
import { AuthContext } from '@contexts/AuthContext';
import { Navigate, Outlet } from 'react-router-dom';
import { AuthContext } from '@/features/auth/model/AuthContext';

function ProtectedRoute() {
const { isLoggedIn } = useContext(AuthContext);
Expand Down
1 change: 1 addition & 0 deletions apps/client/src/app/routes/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { routerOptions } from './options';
10 changes: 10 additions & 0 deletions apps/client/src/app/routes/config/options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export const routerOptions = {
future: {
v7_startTransition: true,
v7_relativeSplatPath: true,
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_skipActionErrorRevalidation: true,
},
};
1 change: 1 addition & 0 deletions apps/client/src/app/routes/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { router } from './router';
Loading