Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Take‑Home Assessment

Welcome, candidate! This project contains intentional issues that mimic real‑world scenarios. Your task is to refactor, optimize, and fix these problems.

Objectives

🔧 Backend (Node.js)

  1. Refactor blocking I/O

    • src/routes/items.js uses fs.readFileSync. Replace with non‑blocking async operations.
  2. Performance

    • GET /api/stats recalculates stats on every request. Cache results, watch file changes, or introduce a smarter strategy.
  3. Testing

    • Add unit tests (Jest) for items routes (happy path + error cases).

💻 Frontend (React)

  1. Memory Leak

    • Items.js leaks memory if the component unmounts before fetch completes. Fix it.
  2. Pagination & Search

    • Implement paginated list with server‑side search (q param). Contribute to both client and server.
  3. Performance

    • The list can grow large. Integrate virtualization (e.g., react-window) to keep UI smooth.
  4. UI/UX Polish

    • Feel free to enhance styling, accessibility, and add loading/skeleton states.

📦 What We Expect

  • Idiomatic, clean code with comments where necessary.
  • Solid error handling and edge‑case consideration.
  • Tests that pass via npm test in both frontend and backend.
  • A brief SOLUTION.md describing your approach and trade‑offs.

Quick Start

node version: 18.XX

nvm install 18

# Terminal 1
cd backend
nvm use && npm install
npm start

# Terminal 2
cd frontend
nvm use && npm install
npm start

The frontend proxies /api requests to http://localhost:3001.

About

Full-stack take-home project using React, TypeScript, Node.js, Zod, and React Query. Features server-side pagination, filtering, form validation, and cached stats.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages