backend-engineering-edho-ferdian

Guides server-side code layering, error handling, and background job design between API and datastore.

2|Updated Sep 6, 2026
One-click install
npx skills add https://github.com/edhoferdian/EEF --skill backend-engineering-edho-ferdian-edhoferdian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-engineering-edho-ferdian
Source: https://github.com/edhoferdian/EEF/tree/main/.agents/skills/backend-engineering-edho-ferdian
Command: npx skills add https://github.com/edhoferdian/EEF --skill backend-engineering-edho-ferdian-edhoferdian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Server-side code between the API contract and the datastore often grows without clear layering, consistent error handling, or safe background job patterns, leading to silent failures, duplicate side effects, and tangled dependencies. This Skill provides concrete patterns for structuring that middle layer so services fail loudly, retry safely, and stay testable. ## Core Features & Use Cases - Layering and boundaries: Applies ports-and-adapters architecture, the repository-vs-service split, and a composition root, including a six-step migration playbook for entangled legacy code and a checklist for adding new integrations cleanly. - Error taxonomy and resilience: Defines typed error hierarchies per language (TypeScript, Python, Go), retry with exponential backoff and jitter, circuit breakers, idempotency keys, and safe third-party email/webhook delivery. - Background jobs and queues: Covers queue backend selection (BullMQ, SQS, Postgres-based pg-boss/graphile-worker), per-queue worker concurrency sizing, dead-letter queues with replay paths, and queue observability. - Specialized pipelines: Includes NestJS project structure and bootstrap conventions, regex-first LLM pipelines with confidence scoring and cost-aware model routing, and scheduled collect/enrich/store scraping pipelines with prompt-injection defenses. - Use Case: When adding a new payment integration to a NestJS service, use this Skill to define a vendor-neutral port, write the adapter, wire it in the composition root, and enforce idempotency on the charge job. ## Quick Start Ask the assistant to design the service layer and error handling for a new backend feature, for example: structure a NestJS module with a retry-safe background job that charges a customer idempotently.

Frequently Asked Questions about backend-engineering-edho-ferdian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a backend service layer with ports and adapters?

Define interfaces (ports) owned by the application core, named for capabilities like PaymentGateway rather than vendors. Implement them in adapters that know the outside world, and wire concrete classes to ports only in a single composition root so services stay testable with fakes.

How do I retry failed background jobs safely?

Retry only transient failures like network errors, rate limits, and 5xx responses, using exponential backoff with jitter and a cap of three to five attempts. Every retried job needs an idempotency key derived from the business operation so redelivery never duplicates side effects.

BullMQ vs SQS vs pg-boss: which queue backend should I use?

BullMQ fits most Node apps needing delayed jobs and priorities on existing Redis. SQS suits AWS environments needing durability, but requires idempotent consumers. Postgres-based queues like pg-boss allow enqueueing in the same transaction as the business write.

Why does SQS process the same message twice?

SQS uses at-least-once delivery, and a visibility timeout shorter than the job's worst-case processing time makes the message visible to another consumer while the first still works. Set the timeout with headroom and extend it programmatically for long-running jobs.

When should I use regex instead of an LLM for parsing?

Use regex first when text follows a consistent, repeating format, since it typically clears over 95% of items deterministically and free. Reserve LLM calls for items that fail a programmatic confidence score threshold, routed to the cheapest capable model.

How do I add a new third-party integration to an existing backend?

Name a port from the core's perspective, write an adapter translating the vendor's shapes and errors into domain types, wire it only in the composition root, and build a fake implementation for tests. Vendor SDK imports stay inside the adapter file.