All Engineering Roles

AI for Backend Engineers

Copy-paste prompts for APIs, databases, system design, and more. Stop Googling, start shipping.

Write and optimize database queries
Design scalable API architectures
Debug complex backend issues
Generate comprehensive test suites
Refactor legacy code safely
Document APIs and systems

Backend Engineering Prompts

API Design

RESTful API Design

Design clean, consistent REST APIs

Design a RESTful API for [describe your feature/resource].

Requirements:
- Resource name: [e.g., users, orders, products]
- Operations needed: [CRUD, search, bulk operations, etc.]
- Auth method: [JWT, API key, OAuth]

Provide:
1. Endpoint structure with HTTP methods
2. Request/response schemas (JSON)
3. Error response format
4. Pagination approach
5. Rate limiting recommendations
Database

Database Schema Design

Design normalized, efficient database schemas

Design a database schema for [describe your domain].

Context:
- Database: [PostgreSQL/MySQL/MongoDB]
- Expected scale: [rows, queries/sec]
- Key queries: [list main queries]

Provide:
1. Table/collection definitions
2. Indexes for query optimization
3. Foreign key relationships
4. Data types with reasoning
5. Migration script
Database

SQL Query Optimizer

Optimize slow database queries

Optimize this SQL query:

```sql
[paste your slow query]
```

Table schemas:
[paste relevant CREATE TABLE statements]

Current execution time: [time]
Target execution time: [time]

Analyze:
1. Why is it slow?
2. What indexes would help?
3. Rewritten optimized query
4. EXPLAIN plan comparison
Architecture

Microservice Design

Design bounded microservices

Design a microservice for [describe the bounded context].

Current system: [monolith/existing services]
Team size: [number]
Traffic: [requests/day]

Define:
1. Service boundaries and responsibilities
2. API contract (endpoints)
3. Data ownership (what DB tables it owns)
4. Integration points with other services
5. Message queue events it publishes/consumes
6. Deployment considerations
Performance

Caching Strategy

Design effective caching layers

Design a caching strategy for [describe your use case].

Current setup:
- Database: [type]
- Traffic: [requests/sec]
- Data characteristics: [read-heavy, write-heavy, etc.]

Define:
1. What to cache (and what NOT to)
2. Cache invalidation strategy
3. TTL recommendations
4. Cache warming approach
5. Redis/Memcached data structures
6. Cache-aside vs write-through decision
Patterns

Error Handling Pattern

Implement robust error handling

Design an error handling strategy for [describe your service/API].

Language: [Python/Node/Go/Java]
Framework: [Express/FastAPI/Spring/etc.]

Provide:
1. Custom exception hierarchy
2. Error response format (JSON)
3. Error codes catalog
4. Logging strategy for errors
5. Client-friendly error messages
6. Code examples

Want More Prompts?

Get access to our full library of 50+ backend prompts, plus tools, workflows, and regular updates.

Get Full Access