μμΈμ립λνκ΅ νμλ€μ μν κ³΅μ§ κ²μ νλ«νΌμ λλ€.
- νλ μμν¬: Next.js 15 (App Router)
- μΈμ΄: TypeScript
- μ€νμΌλ§: Emotion (CSS-in-JS)
- ν¨ν€μ§ λ§€λμ : pnpm
- Node.js 18+
- pnpm (κΆμ₯)
# μμ‘΄μ± μ€μΉ
pnpm install
# κ°λ° μλ² μ€ν
pnpm dev
# λΉλ
pnpm build
# νλ‘λμ
μ€ν
pnpm start
# λ¦°νΈ μ²΄ν¬
pnpm lintλΈλΌμ°μ μμ http://localhost:3000μΌλ‘ μ μνμΈμ.
src/
βββ app/ # App Router νμ΄μ§
β βββ layout.tsx # λ£¨νΈ λ μ΄μμ
β βββ page.tsx # ν νμ΄μ§
β βββ globals.css # μ μ μ€νμΌ
βββ components/ # React μ»΄ν¬λνΈ
β βββ ui/ # μμ UI μ»΄ν¬λνΈ (λλ©μΈ 무κ΄)
β βββ layout/ # λ μ΄μμ μ»΄ν¬λνΈ
β βββ providers/ # Provider μ»΄ν¬λνΈ
β βββ (domain)/ # λλ©μΈλ³ μ»΄ν¬λνΈ
βββ hooks/ # 컀μ€ν
ν
βββ services/ # API λ μ΄μ΄
βββ store/ # μν κ΄λ¦¬
βββ types/ # TypeScript νμ
μ μ
βββ styles/ # μ€νμΌ κ΄λ ¨ (ν
λ§ λ±)
βββ utils/ # μ νΈλ¦¬ν° ν¨μ
μ΄ νλ‘μ νΈλ **Emotion (CSS-in-JS)**μ μ¬μ©ν©λλ€.
'use client';
import styled from '@emotion/styled';
const Button = styled.button`
padding: 12px 24px;
background-color: #667eea;
color: white;
border-radius: 8px;
`;'use client';
/** @jsxImportSource @emotion/react */
import { css } from '@emotion/react';
<div
css={css`
color: red;
font-size: 20px;
`}
>
Hello
</div>;μμΈν λ΄μ©μ Emotion μ€μ κ°μ΄λλ₯Ό μ°Έκ³ νμΈμ.
- Emotion μ€μ κ°μ΄λ
- Babel μμ΄ Emotion μ¬μ©νκΈ°
- Cursor Rules - νλ‘μ νΈ μ½λ© 컨벀μ
μ΄ νλ‘μ νΈλ ALOC 4κΈ° ν νλ‘μ νΈμ λλ€.