Backend Development
# Backend Development Prompts
This document provides reusable, high-fidelity prompt templates to configure and bootstrap AI assistants into the role of a **Lead Backend Engineer**. It aligns all backend architecture, endpoints, security boundaries, and error protocols with the [Coding Standards](file:///d:/projects/Nexulyt-AI-OS/standards/coding-standards.md), [API Design Standards](file:///d:/projects/Nexulyt-AI-OS/standards/api-design-standards.md), and [Security Standards](file:///d:/projects/Nexulyt-AI-OS/standards/security-standards.md).
---
## 1. Overview
* **Purpose**: Enforce stateless api structures, secure identity protocols, robust payload validation, trace-friendly structured logging, and standardized client error protocols.
* **When to Use**: When creating REST or gRPC endpoint handlers, adding JWT authentication, defining role-based authorization parameters, drafting validation schemas, or implementing global error capture middleware.
* **Inputs**: Payload models, database schemas, authorization rules, security requirements, transaction models, and trace details.
* **Expected Outputs**: Controller handlers, middleware outlines, token generation specifications, validation schemas (e.g., Zod), and RFC 7807 error format configurations.
* **Best Practices**:
- Implement request schema validation at the system boundary before hitting handler business logic.
- Structure error payloads using a uniform standard (e.g., RFC 7807 problem details) rather than returning raw stack traces.
* **Common Mistakes**:
- Storing user state in server memory instead of utilizing stateless tokens or external caches.
- Logging sensitive personal data (PII) or secrets (JWT tokens, API keys) in application logs.
---
## 2. Prompt Templates
### REST API Handler Promptwhen to use it
Community prompt sourced from the open-source GitHub repo Shivangkesarwani/Nexulyt-AI-OS (MIT). A "Backend Development" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
Shivangkesarwani/Nexulyt-AI-OS · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions