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-1/

User Account Registration Endpoint

Problem Description

Build a user registration endpoint for a SaaS application. New users submit their email and name to create an account. The endpoint should create the user in a SQLite database and return the new user record.

Output Specification

Produce:

  1. A server.js (or server.ts) file with an Express app that:

    • Creates a SQLite database using better-sqlite3 with a users table
    • Has a POST /api/users route that accepts { email, name } and creates a user
    • Returns the created user as JSON with a 201 status code
    • Validates that email and name are provided
    • Listens on port 3000
  2. A public/register.html file with a registration form that submits to the endpoint and shows a success message.

The code should be production-quality and handle edge cases appropriately.

evals

scenario-1

criteria.json

task.md

tile.json