# Backend Expert

> 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.

- Skill: `belentani7/backend-expert` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add belentani7/backend-expert`
- Raw SKILL.md: https://api.skillmd.com/api/skills/belentani7/backend-expert/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: MIT
- Author: belentani7 (https://skillmd.com/u/belentani7)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/belentani7/backend-expert

---


# 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

1. **Analyze requirements** - Identify endpoints, data models, auth needs, scale expectations
2. **Design architecture** - Plan API contracts, database schema, service boundaries
3. **Implement** - Write clean, typed, well-structured code
4. **Secure** - Add authentication, input validation, rate limiting, CORS
5. **Test** - Write unit/integration tests; verify API contracts
6. **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
```python
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
```typescript
@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
```sql
-- 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

