Bmart νλ‘μ νΈλ λ°°λ¬μ λ―Όμ‘±μ Bmart λͺ¨λ°μΌ μ± μλΉμ€λ₯Ό λ°μν λͺ¨λ°μΌ μΉμΌλ‘ ν΄λ‘ νλ©΄μ μ¬μ©μμκ² μ±κ³Ό μ μ¬ν κ²½νμ μ 곡νλ©° μ¬μ¬μ©μ±μ΄ λμ μ»΄ν¬λνΈμ μμ μ μΈ μν κ΄λ¦¬λ₯Ό λͺ©νλ‘ νκ³ μμ΅λλ€.
|-- github
|-- workflows // github actions
|-- client
|-- public
|-- aseets // images
index.html
|-- src
|-- apis
|-- commons
constants.ts
svgs.tsx
|-- components // UI Components
|-- large
|-- medium
|-- small
|-- contexts
|-- user // user context
|-- hooks // custom hooks
|-- libs // libraries
|-- pages // page components
|-- styles // common & global styles
|-- tyles // common types
|-- utils // util functions..
App.tsx
|-- scripts // deploy scripts
|-- server
|-- bin // www
|-- controllers
|-- lib
|-- middlewares // express middlewares
|-- models // sequelize models
|-- routes // routing
|-- seeder // dummy data
|-- utils // constants & utils functions
app.js
Atomic Design Patternμ μ°Έκ³ νμ¬ μ§κΈ νλ‘μ νΈμμμ μ¬μ¬μ©μ±μ μ΄μ μ λ 3κ°μ κ³μΈ΅μ κ°μ§ μ»΄ν¬λνΈ κ΅¬μ‘°λ₯Ό λ§λ€μμ΅λλ€.
- small: νμμ μλ μ»΄ν¬λνΈκ° νμ¬ νλ‘μ νΈμμ μ¬μ¬μ©λ μ¬μ§κ° μλ μ»΄ν¬λνΈ
- medium: small νΉμ medium μ»΄ν¬λνΈλ₯Ό μ‘°ν©ν μ»΄ν¬λνΈ
- large: small, mediumμ μ‘°ν©ν΄μ λ§λ μ»΄ν¬λνΈ
κ° νμ΄μ§μ νμν λ°μ΄ν°μ μν κ΄λ¦¬λ pageμμ μ΄λ£¨μ΄μ§κ³ μ»΄ν¬λνΈλ λ°μ λ°μ΄ν°λ₯Ό λ λλ§νλ μν μ μνν©λλ€.
νΉν νμ΄μ§λ§λ€ λ€λ₯Έ μ’
λ₯μ μν 리μ€νΈκ° νμνκΈ° λλ¬Έμ μ΄λ₯Ό μμ²νκ³ κ΄λ¦¬ν μ μλ useProducts
customHookμ ꡬννμ¬ κ° νμ΄μ§μμ μ¬μ©νμ΅λλ€.
const [{ products, status }, productDispatch] = useProducts({ categoryId: params.categoryId });
git clone https://github.com/woowa-techcamp-2020/bmart-6.git
cd client
npm install
npm run build
β οΈ server/.env
μ λ€μ νκ²½ λ³μκ° λ±λ‘λμ΄μΌ ν©λλ€.
IS_DEMOλ₯Ό trueλ‘ μ€μ νλ©΄ μ€νν λ λ§λ€ ν μ΄ν°λ² μ΄μ€κ° μ΄κΈ°νλκ³ μ€λΉλ λ°μ΄ν°κ° μΆκ°λ©λλ€.
PORT=3000
IS_DEMO=true
DB_HOST={λ°μ΄ν°λ² μ΄μ€ μ£Όμ}
DB_USER={λ°μ΄ν°λ² μ΄μ€ μ¬μ©μ}
DB_PW={λ°μ΄ν°λ² μ΄μ€ μ¬μ©μ λΉλ°λ²νΈ}
DB_NAME={λ°μ΄ν°λ² μ΄μ€ μ΄λ¦}
JWT_SECRET={μμμ JWT SECRET KEY}
cd server
npm install
npm start
μλ²κ° μ€νλλ€λ©΄ http://localhost:3000 μμ νμΈνμ€ μ μμ΅λλ€.
λ€μκ³Ό κ°μ κ·μΉκ³Ό λμμΈμ λ°λΌ νμ μ μ§ννμ΅λλ€.
- μ΄κ΄ν @wudys
- μ μ§ν @zoomkoding
- νλμ± @doonguk