CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/api-idempotency

Idempotent API design — safe retries for POST endpoints, idempotency keys,

93

10.00x
Quality

90%

Does it follow best practices?

Impact

100%

10.00x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Order Creation API for a Food Delivery App

Problem Description

Build the order creation backend for a food delivery app. The mobile app sometimes has spotty connectivity, so requests may take a while or fail partway through. The endpoint should create an order and return the order details.

Output Specification

Produce a self-contained server.js (or server.ts) file with an Express app that:

  1. Has a POST /api/orders route that accepts { customerName, items, deliveryAddress } and creates an order.
  2. Stores orders in memory (an array or Map is fine).
  3. Returns the created order as JSON with a unique order ID.
  4. Handles errors gracefully.
  5. Listens on port 3000.

The code should be production-ready and follow best practices for an API that handles real customer orders.

evals

tile.json