CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/api-design-patterns

REST API design patterns — response envelopes, pagination, filtering, status codes, and resource naming

87

1.78x
Quality

83%

Does it follow best practices?

Impact

98%

1.78x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Product Catalog API for an E-Commerce Platform

Problem Description

An e-commerce company needs a backend API for their product catalog. The catalog currently holds about 50,000 products and is growing. The frontend team and a mobile app team will consume this API.

Build a Node.js/Express REST API that supports:

  • Listing products with the ability to filter by category, price range, and availability
  • Getting the details of a single product by ID
  • Creating a new product (admin use)
  • Updating specific fields of an existing product (e.g., changing just the price without resending the entire product)
  • Deleting a product (admin use)

Products have: id, name, description, price, category, in_stock (boolean), and created_at.

Output Specification

Implement the API in a src/ directory with an entry point at src/app.js (or src/app.ts). Use an in-memory array or SQLite for storage — no external database required.

Produce a package.json with all dependencies.

Do not start the server — just produce the source files.

evals

tile.json