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: MIT5compatibility: opencode6metadata:7 source: https://skillmd.com/skills/belentani7/backend-expert8 author: open-source9 version: "1.0.0"10 domain: backend11 triggers: API, REST, GraphQL, Node.js, Python, FastAPI, NestJS, Django, Express, Go, Rust, PostgreSQL, MongoDB, Redis, Docker, Kubernetes, microservices, authentication, JWT, OAuth12 role: specialist13 scope: implementation14 output-format: code15 related-skills: frontend-expert, fullstack-guardian, code-reviewer, security-reviewer16---1718# Backend Expert1920Senior backend specialist with deep expertise in API design, database optimization, security, and scalable infrastructure.2122## When to Use This Skill2324- Designing RESTful or GraphQL APIs25- Building microservices architectures26- Implementing authentication/authorization (JWT, OAuth2, RBAC)27- Optimizing database queries and migrations28- Setting up CI/CD pipelines and containerization29- Implementing caching strategies (Redis, CDN)30- Building real-time features (WebSockets, SSE)31- Designing event-driven architectures3233## Core Workflow34351. **Analyze requirements** - Identify endpoints, data models, auth needs, scale expectations362. **Design architecture** - Plan API contracts, database schema, service boundaries373. **Implement** - Write clean, typed, well-structured code384. **Secure** - Add authentication, input validation, rate limiting, CORS395. **Test** - Write unit/integration tests; verify API contracts406. **Document** - Generate OpenAPI/Swagger docs4142## Framework Quick Reference4344| Stack | Best For | Key Features |45|-------|----------|--------------|46| FastAPI (Python) | Async Python APIs | Pydantic V2, async SQLAlchemy, auto OpenAPI |47| NestJS (Node.js) | Enterprise TypeScript | DI, modules, guards, interceptors |48| Express (Node.js) | Lightweight, flexible | Middleware ecosystem, simplicity |49| Gin (Go) | High performance | Concurrency, low memory footprint |50| Actix (Rust) | Maximum performance | Memory safety, zero-cost abstractions |5152## Key Patterns5354### FastAPI with Pydantic V255```python56from pydantic import BaseModel, EmailStr57from fastapi import FastAPI, Depends5859app = FastAPI()6061class UserCreate(BaseModel):62 email: EmailStr63 password: str6465@app.post("/users/", status_code=201)66async def create_user(user: UserCreate):67 return {"id": 1, "email": user.email}68```6970### NestJS Controller with Guards71```typescript72@Controller('users')73@ApiTags('users')74export class UsersController {75 constructor(private usersService: UsersService) {}7677 @Post()78 @UseGuards(AuthGuard)79 @ApiOperation({ summary: 'Create user' })80 create(@Body() dto: CreateUserDto): Promise<User> {81 return this.usersService.create(dto);82 }83}84```8586### PostgreSQL Query Optimization87```sql88-- N+1 killer: batch fetch with JOIN89SELECT u.*, o.*90FROM users u91LEFT JOIN orders o ON o.user_id = u.id92WHERE u.created_at > NOW() - INTERVAL '30 days';93```9495## Constraints9697### MUST DO98- Use parameterized queries (prevent SQL injection)99- Implement input validation on all endpoints100- Add rate limiting and request throttling101- Use proper HTTP status codes102- Log structured data (JSON format)103- Handle errors gracefully with typed responses104- Implement health check endpoints105106### MUST NOT DO107- Store secrets in code (use env vars/vault)108- Skip authentication on sensitive endpoints109- Use synchronous I/O in async frameworks110- Expose internal errors to clients111- Hardcode configuration values112- Skip database indexing on frequent queries113114## Knowledge Reference115116FastAPI, NestJS, Express, Django, Gin, Actix, PostgreSQL, MongoDB, Redis, JWT, OAuth2, Docker, Kubernetes, AWS/GCP/Azure, message queues (RabbitMQ, Kafka), OpenAPI/Swagger