CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/configuration-management

Production config management for any backend — centralized config module, env vars, no hardcoded secrets, fail-fast validation

86

1.88x
Quality

77%

Does it follow best practices?

Impact

100%

1.88x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Build a Payment Processing API

Problem/Feature Description

An e-commerce company needs a REST API to process payments through Stripe and store order records in PostgreSQL. Build it using Express and TypeScript.

Endpoints:

  • POST /api/payments -- create a payment intent (amount, currency, customer email)
  • GET /api/payments/:id -- retrieve payment status
  • GET /api/payments -- list payments with optional ?status= filter
  • POST /api/webhooks/stripe -- receive Stripe webhook events to update payment status

Business rules:

  • Amount must be a positive integer (in cents)
  • Currency must be a supported ISO code (usd, eur, gbp)
  • Customer email is required and must be valid
  • Webhook endpoint must verify Stripe's signature before processing

Use pg for PostgreSQL and stripe for Stripe integration.

Output Specification

Produce:

  • src/server.ts -- server entry point
  • src/app.ts -- Express application setup
  • src/routes/payments.ts -- payment route handlers
  • src/routes/webhooks.ts -- Stripe webhook handler
  • src/db.ts -- database connection and queries
  • package.json -- with dependencies listed (no need to run npm install)
  • .gitignore -- standard Node.js gitignore

You may create additional files as needed for a well-structured codebase.

evals

tile.json