Web performance patterns — lazy loading, bundle optimization, query optimization, compression, and resource management
81
77%
Does it follow best practices?
Impact
97%
3.23xAverage score across 3 eval scenarios
Passed
No known issues
Build a product listing page for an e-commerce store. The page shows products from a PostgreSQL database, each with a name, price, description, and product image. Users can browse products and click through to a product detail page.
The backend is an Express API with the following schema:
CREATE TABLE categories (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
price DECIMAL(10,2) NOT NULL,
image_url TEXT,
category_id INTEGER REFERENCES categories(id),
created_at TIMESTAMP DEFAULT NOW()
);The frontend is React with TypeScript and React Router.
server/index.ts — Express server setup and middlewareserver/routes/products.ts — Product routessrc/App.tsx — React app with routingsrc/pages/HomePage.tsx — Home pagesrc/pages/ProductListPage.tsx — Product listing pagesrc/pages/ProductDetailPage.tsx — Product detail page (can be a stub)src/pages/AboutPage.tsx — About pagesrc/components/ProductCard.tsx — Product card component