Auto-generated tile from GitHub (10 skills)
92
94%
Does it follow best practices?
Impact
92%
1.16xAverage score across 44 eval scenarios
Advisory
Suggest reviewing before use
Your team is about to deploy a payment processing microservice to three separate cloud regions (US, EU, AP). The ops lead has flagged that the previous generation of internal services suffered from a serious operational issue: configuration was scattered across a mix of JSON files checked into the repo (config/production.json, config/staging.json, config/development.js) and conditional branches on NODE_ENV. When a secret was rotated last year, it had to be updated in six places, one of which was missed, causing a 3-hour outage.
The new service must be structured so that all configuration comes from the runtime environment (the platform injects secrets and connection strings via environment variables). The service must validate its configuration at startup and fail fast with a clear error message if a required variable is missing or has the wrong type. The configuration should be accessible to the rest of the application in a type-safe, centralised way.
The service handles payments, so it needs: a database connection string, a Stripe-compatible webhook secret (minimum 32 characters), a port number, a host address, and a log level setting.
Produce a working Fastify application skeleton with:
package.json (with type: "module" and a start script)src/app.ts - the Fastify instance factory (exported as a buildApp function)src/plugins/config.ts - the configuration pluginsrc/server.ts - the entry point that starts the serverconfig-notes.md documenting: what validation library is used for config, how the schema is defined, and what happens if a required variable is absent at startupevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37
scenario-38
scenario-39
scenario-40
scenario-41
scenario-42
scenario-43
scenario-44
skills
documentation
fastify
init
linting-neostandard-eslint9
node
nodejs-core
rules
oauth
octocat
snipgrapher