Skip to content

Commit

Permalink
init project
Browse files Browse the repository at this point in the history
  • Loading branch information
MyohanMyolang committed Feb 3, 2025
1 parent d1e4b1a commit 08b6b60
Show file tree
Hide file tree
Showing 15 changed files with 783 additions and 186 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
text=auto eol=lf
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": false,
"arrowParens": "avoid",
"semi": false,
"trailingComma": "all",
"tailwindAttributes": ["classNames"],
"printWidth": 120
}
32 changes: 32 additions & 0 deletions .vscode/setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"eslint.workingDirectories": [
{
"mode": "auto"
}
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always",
"source.fixAll": "always"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],

"tailwindCSS.classAttributes": [
"class",
"ngClass",
"className",
"classNames",
".*classNames.*",
".*Variants.*",
".*Variants.*",
"cva"
],
"tailwindCSS.experimental.classRegex": ["cva\\(([^)]*)\\)"],
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}
100 changes: 78 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,92 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# Ascendia FrontEnd

## Getting Started
| 기술 스택 | 버전 | 비고 |
| :------------: | :----: | :--- |
| nextJs | 15.1.6 |
| Tanstack Query | 5 |
| Zustand |
| MSW |
| tailwind |

First, run the development server:
## 폴더 구조

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
- common

- 도메인에 대한 의존성이 없으며 재사용 가능한 것들을 해당 폴더에 만듭니다.

- Domain
- 해당 폴더는 각 도메인에 해당하는 기능 또는 컴포넌트들을 해당하는 하위 폴더에 만듭니다.

## 함수 선언

- 화살표 함수로 함수를 선언해주세요

```typescript
// EX

const someFu = () => {}
```

## 컴포넌트 선언

컴포넌트는 무조건 export default로 내보내 주세요.

```typescript
// EX

const Component = () => {}

export default Component
```

## API 통신에 사용하는 타입 네이밍 컨벤션

---Request 와 ---Response 로 선언합니다.

```typescript
// EX

interface SomeRequest {}

interface SomeResponse {}
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## type 파일 네이밍 컨벤션

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
- type 파일은 some.tpye.ts 로 만듭니다.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## 커밋 컨벤션

## Learn More
| 태그 이름 | 설명 |
| -------------------- | ------------------------------------------------------------------ |
| **Feat** | 새로운 기능을 추가할 경우 |
| **Fix** | 버그를 고친 경우 |
| **Design** | CSS 등 사용자 UI 디자인 변경 |
| **!BREAKING CHANGE** | 커다란 API 변경의 경우 |
| **!HOTFIX** | 급하게 치명적인 버그를 고쳐야 하는 경우 |
| **Style** | 코드 포맷 변경, 세미콜론 누락, 코드 수정이 없는 경우 |
| **Refactor** | 프로덕션 코드 리팩토링 |
| **Comment** | 필요한 주석 추가 및 변경 |
| **Docs** | 문서를 수정한 경우 |
| **Test** | 테스트 추가, 테스트 리팩토링 (프로덕션 코드 변경 없음) |
| **Chore** | 빌드 태스크 업데이트, 패키지 매니저 설정 (프로덕션 코드 변경 없음) |
| **Rename** | 파일 혹은 폴더명을 수정하거나 옮기는 작업만 수행한 경우 |
| **Remove** | 파일을 삭제하는 작업만 수행한 경우 |

To learn more about Next.js, take a look at the following resources:
## 브랜치 전략

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- `main`: 안정적인 프로덕션 브랜치
- `dev`: 개발 진행 브랜치
- 기능 개발 및 버그 수정은 `feat/{기능명}`, `fix/{버그명}` 등의 브랜치를 생성하여 작업 후 `dev`로 병합

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## 머지 전략

## Deploy on Vercel
- `dev` 브랜치:

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
- **Squash Merge** 사용
- 여러 커밋을 하나로 합쳐 깔끔한 커밋 히스토리 유지

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
- `main` 브랜치:
- **일반 Pull Request Merge** 사용
- `dev` 브랜치에서 충분한 테스트를 거친 후 `main`으로 병합
- 기존 커밋 히스토리를 유지하여 변경 사항 추적 가능
145 changes: 137 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,145 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import { dirname } from "path"
import { fileURLToPath } from "url"
import { FlatCompat } from "@eslint/eslintrc"
import eslintJs from "@eslint/js"
import importPlugin from "eslint-plugin-import"
import noRelativeImportPaths from "eslint-plugin-no-relative-import-paths"
import prettierRecommended from "eslint-plugin-prettier/recommended"
import tailwind from "eslint-plugin-tailwindcss"
import unicorn from "eslint-plugin-unicorn"
import unusedImports from "eslint-plugin-unused-imports"

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

const compat = new FlatCompat({
baseDirectory: __dirname,
});
})

const eslintConfig = [
{ ignores: ["**/.vitepress/", "**/dist/", "**/esm/", "**/.next/", "**/.next-local/", "./README.md"] },
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
eslintJs.configs.recommended,
prettierRecommended,
{
name: "절대 경로 import",
plugins: {
"no-relative-import-paths": noRelativeImportPaths,
},
rules: {
"no-relative-import-paths/no-relative-import-paths": [
"warn",
{ allowSameFolder: true, rootDir: "src", prefix: "@" },
],
},
},
...tailwind.configs["flat/recommended"],
{
settings: {
tailwindcss: {
callees: ["classnames", "clsx", "ctl"],
config: "tailwind.config.js",
cssFiles: ["**/*.css", "!**/node_modules", "!**/.*", "!**/dist", "!**/build"],
cssFilesRefreshRate: 5_000,
removeDuplicates: true,
skipClassAttribute: false,
whitelist: [],
tags: [],
classRegex: "^class(Name)?$",
},
},
},
{
name: "사용하지 않는 import 제거",
plugins: {
"unused-imports": unusedImports,
},
rules: {
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
},
},
{
name: "Config LanguageOption",
languageOptions: {
ecmaVersion: "latest",
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
name: "import order",
plugins: {
import: importPlugin,
},
rules: {
"import/no-duplicates": ["error", { "prefer-inline": true }],
"import/order": [
2,
{
groups: ["builtin", "external", ["parent", "sibling"], "index"],
alphabetize: {
order: "asc",
caseInsensitive: false,
},
},
],
},
},
{
name: "파일 네임 지정",
plugins: { unicorn },
rules: {
"unicorn/filename-case": [
"error",
{
case: "kebabCase",
},
],
},
},
{},
...compat.extends("next/core-web-vitals", "next/typescript"),
];
{
rules: {
"tailwindcss/no-custom-classname": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"unicorn/prevent-abbreviations": "off",
},
},
{
files: ["**/*.{jsx,tsx,ts,jx"],
rules: {
"no-console": "warn",
},
},
{
rules: {
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
},
},
]

export default eslintConfig;
export default eslintConfig
6 changes: 3 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { NextConfig } from "next";
import type { NextConfig } from "next"

const nextConfig: NextConfig = {
/* config options here */
};
}

export default nextConfig;
export default nextConfig
19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,28 @@
"lint": "next lint"
},
"dependencies": {
"next": "15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "15.1.6"
"tailwind-merge": "^3.0.1"
},
"devDependencies": {
"typescript": "^5",
"@eslint/eslintrc": "^3",
"@eslint/js": "^9.4.0",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"clsx": "^2.1.1",
"eslint": "^9",
"eslint-config-next": "15.1.6",
"@eslint/eslintrc": "^3"
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-tailwindcss": "^3.18.0",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-unused-imports": "^4.1.4",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
Loading

0 comments on commit 08b6b60

Please sign in to comment.