๐ [1ํธ] BOOTH ๋ง์ผ ๊ตฌ์กฐ ๋ถ์ ๋ฐ React ํ๋ก์ ํธ ์ด๊ธฐ ์ค์
๐ [1ํธ] BOOTH ๋ง์ผ ๊ตฌ์กฐ ๋ถ์ ๋ฐ React ํ๋ก์ ํธ ์ด๊ธฐ ์ค์
BOOTH(https://booth.pm)๋ ํฌ๋ฆฌ์์ดํฐ๋ค์ด ์์ ๋ง์ ์ฐฝ์๋ฌผ์ ๋์งํธ ์ํ์ผ๋ก ํ๋งคํ๋ ๋ํ์ ์ธ ๋ง์ผ ํ๋ซํผ์
๋๋ค.
์ด๋ฒ ์๋ฆฌ์ฆ์์๋ ์ด BOOTH ๋ง์ผ์ UI/UX ๊ตฌ์กฐ๋ฅผ ํด๋ก ํ๋ฉด์, ๊ฒ์ ์ค์ฌ์ ๋ง์ผํ ์น์ฑ์ React๋ก ์ค์ ๊ตฌํํ๋ ๊ณผ์ ์ ๋ค๋ฃน๋๋ค.
์ด๋ฒ ์ฒซ ๊ธ์์๋ ์ ์ฒด ์ํคํ ์ฒ๋ฅผ ๋ถ์ํ๊ณ , **React ๊ฐ๋ฐ ํ๊ฒฝ(Vite ๊ธฐ๋ฐ)**์ ๊ตฌ์ฑํ๋ ๊ฒ๊น์ง ์งํํฉ๋๋ค.
๐ 1. BOOTH ๋ง์ผ์ UI ๊ตฌ์กฐ ๋ถ์
์ฌ์ดํธ: https://booth.pm/ja/search
โ ์ฃผ์ ์์
๊ตฌ์ฑ ์์ ์ค๋ช
๊ฒ์ ์ ๋ ฅ์ฐฝ | ํค์๋ ๊ฒ์ ๊ธฐ๋ฅ ์ ๊ณต (debounce ๊ธฐ๋ฐ ์ ๋ ฅ UX) |
์ํ ์นด๋ ๋ฆฌ์คํธ | ์ธ๋ค์ผ, ์ ๋ชฉ, ๊ฐ๊ฒฉ, ํ๊ทธ๋ก ๊ตฌ์ฑ๋ ์นด๋ |
ํ๊ทธ ํํฐ | ์ธ๊ธฐ ํ๊ทธ ๊ธฐ๋ฐ ํํฐ ์ ํ ๊ฐ๋ฅ |
์ํ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๋ชจ๋ฌ | ํด๋ฆญ ์ ์์ธ ์ ๋ณด ํ์ |
URL ์ฟผ๋ฆฌ ํ๋ผ๋ฏธํฐ | ๊ฒ์ ์ํ๊ฐ URL์ ๋ฐ์๋จ |
๋ฌดํ ์คํฌ๋กค | ํ๋จ์ผ๋ก ๋ด๋ ค๊ฐ์๋ก ๋ ๋ง์ ์ํ ๋ก๋ |
๐ ์ฐ๋ฆฌ์ ๋ชฉํ:
์ด ๋ชจ๋ ๊ธฐ๋ฅ์ React + Tailwind CSS ๊ธฐ๋ฐ์ผ๋ก ํ๋์ฉ ์ง์ ๊ตฌํํ๋ฉด์, ์ค๋ฌด์์ ํ์ฉ ๊ฐ๋ฅํ ๋ง์ผ UI๋ฅผ ์ตํ๋ ๊ฒ!
๐ 2. ํ๋ก์ ํธ ์ด๊ธฐ ์ค์
โ 1) ํ๋ก์ ํธ ์์ฑ (Vite + React)
npm create vite@latest booth-clone --template react
cd booth-clone
npm install
npm run dev
โ 2) ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ์ค๊ณ
๐ booth-clone/
โฃ ๐ src/
โ โฃ ๐ components/
โ โฃ ๐ pages/
โ โฃ ๐ hooks/
โ โฃ ๐ utils/
โ โฃ ๐ data/
โ โ App.jsx
โฃ index.html
โฃ tailwind.config.js
โ 3) Tailwind CSS ์ ์ฉ
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
๐ tailwind.config.js
module.exports = {
content: ["./index.html", "./src/**/*.{js,jsx}"],
theme: {
extend: {},
},
plugins: [],
}
๐ src/index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
๐ main.jsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import './index.css';
ReactDOM.createRoot(document.getElementById('root')).render(<App />);
โจ 3. ๊ธฐ๋ณธ App ๋ ์ด์์ ์ค๊ณ
๐ src/App.jsx
function App() {
return (
<div className="min-h-screen bg-gray-100">
<header className="text-center py-4 bg-white shadow">
<h1 className="text-2xl font-bold">BOOTH Clone ๋ง์ผ</h1>
</header>
<main className="p-4">
<p>์ฌ๊ธฐ์ ์ํ ๊ฒ์ UI๊ฐ ๋ค์ด๊ฐ ์์ ์
๋๋ค.</p>
</main>
</div>
);
}
export default App;
๐ npm run dev ๋ก ์คํ ์ ๊ธฐ๋ณธ ํ ํ๋ฆฟ์ด ์ ์ ์ฉ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
๐ 4. ๋ค์ ๊ธ ์๊ณ : ์ํ ์นด๋ ๋ฆฌ์คํธ UI ๋ง๋ค๊ธฐ
๋ค์ ๊ธ์์๋ data/products.json์ ๊ฐ์์ ์ํ ๋ฐ์ดํฐ๋ฅผ ๋ง๋ค๊ณ ,
๋ฐ์ํ Grid ๋ ์ด์์์ผ๋ก ์นด๋ ๋ฆฌ์คํธ๋ฅผ ์ถ๋ ฅํ๋ UI๋ฅผ ๊ตฌํํฉ๋๋ค.
React ๋ง์ผ UI,BOOTH ํด๋ก ,React ๊ฒ์ UI,React Tailwind ํ๋ก์ ํธ,์ํ ์นด๋ ๋ ์ด์์,React ๋ฌดํ์คํฌ๋กค,React ๋ชจ๋ฌ,React ํํฐ ๊ตฌํ,React Vite ์์ํ๊ธฐ,React ํ๋ก์ ํธ ๊ตฌ์กฐ