A minimal Next.js + React starter for live coding exercises.
Repo: https://github.com/aintnorest/technical-interview-example
AI assistants (Cursor, Copilot, ChatGPT, etc.) are allowed. You are responsible for what you ship — read, run, and adjust generated code.
This exercise is delivered in phases during the interview. Complete each phase before moving on. Additional requirements will be given verbally by the interviewer. We will get as far as we get. That is not a race there is no requirement to complete all phases in fact the intention is to have more than you could complete in a single session. The goal is to see how you work and think.
- Node.js 20+
- npm
git clone https://github.com/aintnorest/technical-interview-example.git
cd technical-interview-example
npm install
npm run devOpen http://localhost:3000 and confirm the starter shell loads. The page renders ProductSearch from src/app/page.jsx.
| Path | Status |
|---|---|
src/data/products.js |
Seed catalog (~96 items) |
src/lib/productCatalog.js → fetchProducts() |
Implemented (simulated async load) |
src/lib/productCatalog.js → getCategories() |
Implemented |
src/lib/productCatalog.js → filterProducts() |
Stub — returns all products unchanged |
src/lib/productCatalog.test.js |
Passing tests; describe.skip("filterProducts", …) block for Phase 4 |
src/hooks/useProductCatalog.js → useProductCatalog() |
Stub — you implement |
src/components/ProductSearch.jsx → ProductSearch |
Stub — you implement |
Build a product catalog browser over ~96 items from src/data/products.js. Each product has id, name, category, price, inStock, and sku.
src/hooks/useProductCatalog.js— callfetchProducts()fromsrc/lib/productCatalog.js, expose catalog state to the UIsrc/components/ProductSearch.jsx— render the product list
- Load catalog data through
fetchProducts()insrc/lib/productCatalog.js(simulated delay — no real network). src/components/ProductSearch.jsxmust consumeuseProductCatalog()fromsrc/hooks/useProductCatalog.js.- Do not import
src/data/products.js(or@/data/products) insrc/components/ProductSearch.jsx.
- Show a loading state while
fetchProducts()insrc/lib/productCatalog.jsresolves. - Show an error message if
fetchProducts()rejects (pass{ simulateError: true }to test). - Render the full list with name, category, price, and stock status for each product.
Wait for Phase 2 before adding search or filters.
npm run lint
npm test
npm run buildsrc/
app/page.jsx # mounts ProductSearch
components/ProductSearch.jsx # you implement (UI)
data/products.js # seed data (do not import from component)
hooks/useProductCatalog.js # you implement (catalog state)
lib/productCatalog.js # fetchProducts, getCategories, filterProducts stub
lib/productCatalog.test.js # tests; filterProducts block skipped until Phase 4