A Samsung-style washing machine product listing page (Polish UI) built with React 19, TypeScript and Vite. Originally a web-dev test task for Cheil Poland.
Live demo: web-dev-test-task-cheil.vercel.app
- 🔍 Debounced search — filters by product name 250ms after the last keystroke
- 🗂 Sort & filter dropdowns — popularity / price / capacity sorting, plus function, energy class and capacity filters (all combinable with search)
- ➕ "Pokaż więcej" — loads 6 more cards per click, resets when filters change
- 🔢 Live result counter
- 📱 Fully responsive card grid (3 → 2 → 1 columns)
- 🖼 WebP product images, self-hosted Samsung fonts
- 🐳 Docker support (Bun build → Nginx)
React 19 · TypeScript 5.8 · Vite 7 (SWC) · SCSS · Bun · ESLint 9
State is managed with React Context + custom hooks — no external state libraries.
Requires Bun ≥ 1.2 (npm works too, but the lockfile is bun.lock).
git clone https://github.com/CharlesSBL/Samsung-component_implementation.git
cd Samsung-component_implementation
bun install
bun run dev # → http://localhost:5173| Command | Description |
|---|---|
bun run dev |
Start dev server with HMR |
bun run build |
Production build → dist/ |
bun run preview |
Preview the production build |
bun run lint |
Run ESLint |
docker build -t cheil-poland .
docker run -d -p 8080:80 cheil-poland # → http://localhost:8080Multi-stage build: oven/bun:1 compiles the app, nginx:stable-alpine serves the static output. A run.sh helper script is included.
public/
├── data/products/products.json # Dataset (15 products) + field docs
├── fonts/ images/ # Samsung fonts, WebP images, SVG icons
src/
├── main.tsx # Entry point
├── css/ # SCSS: styles, fonts, reset
└── feature/product-listing/
├── ProductListing.tsx # Root component & state owner
├── context/ # React contexts (products, count, card limit)
├── hooks/ # FilterHook (fetch/sort/filter), SearchInputHook (debounce)
├── functions/ # Pure helpers (filtering, data → card mapping)
├── types/ interfaces/ # Data & prop types
└── components/ # Header, Filter, Counter, Listing/Card, Footer
FilterHookfetchesproducts.jsonwhenever the search term or a dropdown option changes.- The pipeline applies: name search → sorting → function/energy/capacity filters.
- Results go into context;
Listingmaps them to card view-models and renders the first N (N = 6, +6 per "show more" click). - Dropdowns close on outside click; the visible-card limit resets on any criteria change.
- UI text is in Polish; the dataset uses nullable installments (hidden on cards without offers).
- Task brief:
docs/webDevTestTask.pdf. Samsung fonts/imagery are proprietary, used here for a recruitment exercise only.