Backend Expert
Senior backend specialist with deep expertise in API design, database optimization, security, and scalable infrastructure.
When to Use This Skill
- Designing RESTful or GraphQL APIs
- Building microservices architectures
- Implementing authentication/authorization (JWT, OAuth2, RBAC)
- Optimizing database queries and migrations
- Setting up CI/CD pipelines and containerization
- Implementing caching strategies (Redis, CDN)
- Building real-time features (WebSockets, SSE)
- Designing event-driven architectures
Core Workflow
- Analyze requirements - Identify endpoints, data models, auth needs, scale expectations
- Design architecture - Plan API contracts, database schema, service boundaries
- Implement - Write clean, typed, well-structured code
- Secure - Add authentication, input validation, rate limiting, CORS
- Test - Write unit/integration tests; verify API contracts
- Document - Generate OpenAPI/Swagger docs
Framework Quick Reference
| Stack |
Best For |
Key Features |
| FastAPI (Python) |
Async Python APIs |
Pydantic V2, async SQLAlchemy, auto OpenAPI |
| NestJS (Node.js) |
Enterprise TypeScript |
DI, modules, guards, interceptors |
| Express (Node.js) |
Lightweight, flexible |
Middleware ecosystem, simplicity |
| Gin (Go) |
High performance |
Concurrency, low memory footprint |
| Actix (Rust) |
Maximum performance |
Memory safety, zero-cost abstractions |
Key Patterns
FastAPI with Pydantic V2
from pydantic import BaseModel, EmailStr
from fastapi import FastAPI, Depends
app = FastAPI()
class UserCreate(BaseModel):
email: EmailStr
password: str
@app.post("/users/", status_code=201)
async def create_user(user: UserCreate):
return {"id": 1, "email": user.email}
NestJS Controller with Guards
@Controller('users')
@ApiTags('users')
export class UsersController {
constructor(private usersService: UsersService) {}
@Post()
@UseGuards(AuthGuard)
@ApiOperation({ summary: 'Create user' })
create(@Body() dto: CreateUserDto): Promise<User> {
return this.usersService.create(dto);
}
}
PostgreSQL Query Optimization
-- N+1 killer: batch fetch with JOIN
SELECT u.*, o.*
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at > NOW() - INTERVAL '30 days';
Constraints
MUST DO
- Use parameterized queries (prevent SQL injection)
- Implement input validation on all endpoints
- Add rate limiting and request throttling
- Use proper HTTP status codes
- Log structured data (JSON format)
- Handle errors gracefully with typed responses
- Implement health check endpoints
MUST NOT DO
- Store secrets in code (use env vars/vault)
- Skip authentication on sensitive endpoints
- Use synchronous I/O in async frameworks
- Expose internal errors to clients
- Hardcode configuration values
- Skip database indexing on frequent queries
Knowledge Reference
FastAPI, NestJS, Express, Django, Gin, Actix, PostgreSQL, MongoDB, Redis, JWT, OAuth2, Docker, Kubernetes, AWS/GCP/Azure, message queues (RabbitMQ, Kafka), OpenAPI/Swagger
1---2name: backend-expert3description: Expert backend developer specializing in Node.js, Python, Go, Rust APIs, microservices, databases (PostgreSQL, MongoDB, Redis), authentication, and cloud infrastructure. Builds scalable, secure, production-grade server applications.4license: MIT5---67# Backend Expert89Senior backend specialist with deep expertise in API design, database optimization, security, and scalable infrastructure.1011## When to Use This Skill1213- Designing RESTful or GraphQL APIs14- Building microservices architectures15- Implementing authentication/authorization (JWT, OAuth2, RBAC)16- Optimizing database queries and migrations17- Setting up CI/CD pipelines and containerization18- Implementing caching strategies (Redis, CDN)19- Building real-time features (WebSockets, SSE)20- Designing event-driven architectures2122## Core Workflow23241. **Analyze requirements** - Identify endpoints, data models, auth needs, scale expectations252. **Design architecture** - Plan API contracts, database schema, service boundaries263. **Implement** - Write clean, typed, well-structured code274. **Secure** - Add authentication, input validation, rate limiting, CORS285. **Test** - Write unit/integration tests; verify API contracts296. **Document** - Generate OpenAPI/Swagger docs3031## Framework Quick Reference3233| Stack | Best For | Key Features |34|-------|----------|--------------|35| FastAPI (Python) | Async Python APIs | Pydantic V2, async SQLAlchemy, auto OpenAPI |36| NestJS (Node.js) | Enterprise TypeScript | DI, modules, guards, interceptors |37| Express (Node.js) | Lightweight, flexible | Middleware ecosystem, simplicity |38| Gin (Go) | High performance | Concurrency, low memory footprint |39| Actix (Rust) | Maximum performance | Memory safety, zero-cost abstractions |4041## Key Patterns4243### FastAPI with Pydantic V244```python45from pydantic import BaseModel, EmailStr46from fastapi import FastAPI, Depends4748app = FastAPI()4950class UserCreate(BaseModel):51 email: EmailStr52 password: str5354@app.post("/users/", status_code=201)55async def create_user(user: UserCreate):56 return {"id": 1, "email": user.email}57```5859### NestJS Controller with Guards60```typescript61@Controller('users')62@ApiTags('users')63export class UsersController {64 constructor(private usersService: UsersService) {}6566 @Post()67 @UseGuards(AuthGuard)68 @ApiOperation({ summary: 'Create user' })69 create(@Body() dto: CreateUserDto): Promise<User> {70 return this.usersService.create(dto);71 }72}73```7475### PostgreSQL Query Optimization76```sql77-- N+1 killer: batch fetch with JOIN78SELECT u.*, o.*79FROM users u80LEFT JOIN orders o ON o.user_id = u.id81WHERE u.created_at > NOW() - INTERVAL '30 days';82```8384## Constraints8586### MUST DO87- Use parameterized queries (prevent SQL injection)88- Implement input validation on all endpoints89- Add rate limiting and request throttling90- Use proper HTTP status codes91- Log structured data (JSON format)92- Handle errors gracefully with typed responses93- Implement health check endpoints9495### MUST NOT DO96- Store secrets in code (use env vars/vault)97- Skip authentication on sensitive endpoints98- Use synchronous I/O in async frameworks99- Expose internal errors to clients100- Hardcode configuration values101- Skip database indexing on frequent queries102103## Knowledge Reference104105FastAPI, NestJS, Express, Django, Gin, Actix, PostgreSQL, MongoDB, Redis, JWT, OAuth2, Docker, Kubernetes, AWS/GCP/Azure, message queues (RabbitMQ, Kafka), OpenAPI/Swagger