fe-stack
1
总安装量
1
周安装量
#44046
全站排名
安装命令
npx skills add https://github.com/ingpdw/pdw-fe-dev-tool --skill fe-stack
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
zencoder
1
Skill 文档
Frontend Tech Stack Convention
기ì ì¤í
| í목 | ì í |
|---|---|
| ì¸ì´ | TypeScript 5+ (strict mode) |
| UI íë ììí¬ | React 19+ |
| ë©í íë ììí¬ | Next.js 16+ (App Router) |
| UI ì»´í¬ëí¸ | shadcn/ui + Radix UI |
| ì¤íì¼ë§ | Tailwind CSS v4 |
| ë¹ë ë구 | Vite |
| í ì¤í¸ | Vitest + React Testing Library |
| í¨í¤ì§ 매ëì | pnpm |
| 린í | ESLint + Prettier |
íë¡ì í¸ êµ¬ì¡° (Next.js App Router)
src/
âââ app/ # App Router ë¼ì°í¸
â âââ layout.tsx # Root layout
â âââ page.tsx # Home page
â âââ globals.css # Global styles (Tailwind)
â âââ (auth)/ # Route group
â â âââ login/page.tsx
â â âââ signup/page.tsx
â âââ api/ # API Route Handlers
â âââ [resource]/route.ts
âââ components/
â âââ ui/ # shadcn/ui ì»´í¬ëí¸ (ìë ìì±)
â âââ common/ # ê³µì© ì»´í¬ëí¸
â âââ [feature]/ # 기ë¥ë³ ì»´í¬ëí¸
âââ hooks/ # 커ì¤í
í
âââ lib/ # ì í¸ë¦¬í°, í¬í¼
â âââ utils.ts # cn() ë± ê³µì© ì í¸
â âââ api.ts # API í´ë¼ì´ì¸í¸
âââ types/ # ì ì íì
ì ì
âââ stores/ # ìí ê´ë¦¬ (Zustand)
âââ constants/ # ìì ì ì
âââ __tests__/ # í
ì¤í¸ íì¼ (co-location ê¶ì¥)
TypeScript 컨벤ì
strict: trueíìinterfaceë¡ ê°ì²´ íì ì ì (íì¥ ê°ë¥),typeì ì ëì¨/ì¸í°ì¹ì ì ì¬ì©anyì¬ì© ê¸ì§ âunknown+ type guard ì¬ì©- ì»´í¬ëí¸ Propsë
interfaceë¡ ì ì,React.FCì¬ì©íì§ ìì asíì ë¨ì¸ ìµìí, íì ê°ë í¨ì ì í¸enumëìas constê°ì²´ ì¬ì©
// Props ì ì
interface ButtonProps {
variant?: "default" | "destructive" | "outline";
size?: "sm" | "md" | "lg";
children: React.ReactNode;
onClick?: () => void;
}
// as const í¨í´
const STATUS = {
IDLE: "idle",
LOADING: "loading",
ERROR: "error",
} as const;
type Status = (typeof STATUS)[keyof typeof STATUS];
React 컨벤ì
- í¨ì ì ì¸ë¬¸ì¼ë¡ ì»´í¬ëí¸ ì ì (
function Component(), íì´í í¨ìë íì©) - Props destructuring ì¬ì©
- ë¨ì¼ ì± ì ìì¹: ì»´í¬ëí¸ë íëì ìí ë§ ë´ë¹
- ì¡°ê±´ë¶ ë ëë§: ì¼í ì°ì°ì ëë
&&(falsy ê° ì£¼ì) - ì´ë²¤í¸ í¸ë¤ë¬:
handle[Event]ë¤ì´ë° (ì:handleClick,handleSubmit) - 커ì¤í
í
:
use[Name]ë¤ì´ë°, ë¨ì¼ ê´ì¬ì¬ keypropì index ì¬ì© ê¸ì§ (ìì ì ì¸ ê³ ì ID ì¬ì©)
function UserCard({ name, email, onEdit }: UserCardProps) {
const handleEditClick = () => onEdit(email);
return (
<Card>
<CardHeader>
<CardTitle>{name}</CardTitle>
</CardHeader>
<CardContent>
<p className="text-muted-foreground">{email}</p>
<Button variant="outline" onClick={handleEditClick}>
Edit
</Button>
</CardContent>
</Card>
);
}
Next.js App Router ê·ì¹
- Server Component 기본, íì ì
"use client"ì ì¸ "use client"ë ê°ë¥í í¸ë¦¬ì ë§ë¨ì ë°°ì¹ (í´ë¼ì´ì¸í¸ ê²½ê³ ìµìí)- ë°ì´í° íì¹: Server Componentìì
async/awaitë¡ ì§ì fetch - Server Actions:
"use server"í¨ìë¡ í¼ ì²ë¦¬, 뮤í ì´ì loading.tsx,error.tsx,not-found.tsxíì©- Metadata:
generateMetadata()ëë ì ì metadataê°ì²´ - Route Handler:
GET,POSTë± named export í¨ì - ëì ë¼ì°í¸:
[param]í´ë,generateStaticParams()ë¡ ì ì ìì± - Parallel Routes(
@slot), Intercepting Routes((.)) ì ì í íì©
shadcn/ui ê·ì¹
npx shadcn@latest add [component]ë¡ ì»´í¬ëí¸ ì¶ê°components/ui/ì ìì±ë ì½ë를 íë¡ì í¸ ì구ì ë§ê² 커ì¤í°ë§ì´ì¦cn()ì í¸ë¦¬í°ë¡ ì¡°ê±´ë¶ í´ëì¤ í©ì±- Radix UI primitives 기ë°ì¼ë¡ ì ê·¼ì± ë´ì¥
- í
ë§ ì»¤ì¤í°ë§ì´ì¦ë
globals.cssì CSS ë³ìë¡ ê´ë¦¬
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
<Button className={cn("w-full", isActive && "bg-primary")} variant="outline">
Click
</Button>
Tailwind CSS v4 ê·ì¹
- ì í¸ë¦¬í° í´ëì¤ ì°ì , 커ì¤í CSS ìµìí
@applyì¬ì© ìµìí (ì»´í¬ëí¸ ì¶ì¶ ì í¸)- ë°ìí:
sm:,md:,lg:,xl:,2xl:ì ëì¬ (mobile-first) - ë¤í¬ 모ë:
dark:ì ëì¬ + CSS ë³ì ê¸°ë° í ë§ clsxëëcn()(tailwind-merge)ë¡ ëì í´ëì¤ í©ì±
ìí ê´ë¦¬
- ë¡ì»¬ ìí:
useState,useReducer - ìë² ìí: TanStack Query (React Query)
- ì ì í´ë¼ì´ì¸í¸ ìí: Zustand
- URL ìí:
useSearchParams,nuqs - í¼ ìí: React Hook Form + Zod ì í¨ì± ê²ì¬
íì¼ ë¤ì´ë° ê·ì¹
| ëì | ê·ì¹ | ìì |
|---|---|---|
| ì»´í¬ëí¸ | PascalCase | UserProfile.tsx |
| í | camelCase (use ì ëì¬) | useAuth.ts |
| ì í¸ë¦¬í° | camelCase | formatDate.ts |
| íì | PascalCase | UserTypes.ts |
| ìì | camelCase íì¼, UPPER_SNAKE ë³ì | apiEndpoints.ts |
| í ì¤í¸ | ìë³¸ëª .test | UserProfile.test.tsx |
| íì´ì§ (App Router) | ì문ì í´ë | app/dashboard/page.tsx |
Import ìì
// 1. React/Next.js
import { useState } from "react";
import Link from "next/link";
// 2. ìëíí° ë¼ì´ë¸ë¬ë¦¬
import { useQuery } from "@tanstack/react-query";
import { z } from "zod";
// 3. ë´ë¶ ì»´í¬ëí¸ (shadcn/ui í¬í¨)
import { Button } from "@/components/ui/button";
import { UserCard } from "@/components/user/UserCard";
// 4. í
, ì í¸, íì
import { useAuth } from "@/hooks/useAuth";
import { cn } from "@/lib/utils";
import type { User } from "@/types";