t1k:web:core:backend-development
| Field | Value |
|---|---|
| Module | core |
| Version | 1.26.1 |
| Effort | medium |
| Tools | — |
Keywords: API, backend, FastAPI, go, GraphQL, microservices, NestJS, node.js, python, REST
How to invoke
Section titled “How to invoke”/t1k:web:core:backend-development[framework] [task]Backend Development Skill
Section titled “Backend Development Skill”Production-ready backend development with modern technologies, best practices, and proven patterns.
When to Use
Section titled “When to Use”- Designing RESTful, GraphQL, or gRPC APIs
- Building authentication/authorization systems
- Optimizing database queries and schemas
- Implementing caching and performance optimization
- OWASP Top 10 security mitigation
- Designing scalable microservices
- Testing strategies (unit, integration, E2E)
- CI/CD pipelines and deployment
- Monitoring and debugging production systems
Technology Selection Guide
Section titled “Technology Selection Guide”Languages: Node.js/TypeScript (full-stack), Python (data/ML), Go (concurrency), Rust (performance) Frameworks: NestJS, FastAPI, Django, Express, Gin Databases: PostgreSQL (ACID), MongoDB (flexible schema), Redis (caching) APIs: REST (simple), GraphQL (flexible), gRPC (performance)
See: references/backend-technologies.md for detailed comparisons
Reference Navigation
Section titled “Reference Navigation”Core Technologies:
backend-technologies.md- Languages, frameworks, databases, message queues, ORMsbackend-api-design.md- REST, GraphQL, gRPC patterns and best practices
Security & Authentication:
backend-security.md- OWASP Top 10 2025, security best practices, input validationbackend-authentication.md- OAuth 2.1, JWT, RBAC, MFA, session management (internal studio services: studio-auth first,docs/studio-auth.md)
Performance & Architecture:
backend-performance.md- Caching, query optimization, load balancing, scalingbackend-architecture.md- Microservices, event-driven, CQRS, saga patterns
Quality & Operations:
backend-testing.md- Testing strategies, frameworks, tools, CI/CD testingbackend-code-quality.md- SOLID principles, design patterns, clean codebackend-devops.md- Docker, Kubernetes, deployment strategies, monitoringbackend-debugging.md- Debugging strategies, profiling, logging, production debuggingbackend-mindset.md- Problem-solving, architectural thinking, collaboration
Managed Database — Optimize Queries By Default
Section titled “Managed Database — Optimize Queries By Default”If the data tier is a managed cloud Postgres (Neon, Supabase, RDS) rather than a container on the same host, every query is a network round trip instead of a local call — and that one hop can dominate a request’s latency. Optimization stops being a throughput concern and becomes a per-request one.
Default to optimizing queries:
- Count round trips, not rows. Two queries in one round trip beat one query in two. Batch reads
(
WHERE id = ANY($1)), useRETURNINGinstead of insert-then-select, and collapse read-modify-write into a single statement. - Never loop queries inside a request handler. Fetch the set, join, or use a CTE. An N+1 that was invisible against a local database is a user-visible stall against a remote one — 50 sequential queries at ~45 ms each is ~2.3 seconds of pure round-trip latency in a single request.
- Chatty transactions pay per statement.
BEGIN/COMMITare round trips too; a 5-statement transaction costs ~6 hops. Push the logic into one statement where you can. - Use the pooled endpoint for the app (the direct one is for restores and DDL). Connection setup over TLS is several round trips — never open a connection per request.
- Cache read-heavy paths. A cache hit avoids the round trip entirely; that cache/DB gap just widened by orders of magnitude.
Measurements, the billing model behind “chatty is also expensive”, and the correct way to measure
the hop: the t1k-web-devops-core skill’s managed-postgres-economics.md reference. Code-level detail:
references/backend-performance.md § “The database is REMOTE now”.
Key Best Practices (2025)
Section titled “Key Best Practices (2025)”Security: Argon2id passwords, parameterized queries (98% SQL injection reduction), OAuth 2.1 + PKCE, rate limiting, security headers
Performance: Redis caching (90% DB load reduction), database indexing (30% I/O reduction), CDN (50%+ latency cut), connection pooling
Testing: 70-20-10 pyramid (unit-integration-E2E), Vitest 50% faster than Jest, contract testing for microservices, 83% migrations fail without tests
DevOps: Blue-green/canary deployments, feature flags (90% fewer failures), Kubernetes 84% adoption, Prometheus/Grafana monitoring, OpenTelemetry tracing
Quick Decision Matrix
Section titled “Quick Decision Matrix”| Need | Choose |
|---|---|
| Fast development | Node.js + NestJS |
| Data/ML integration | Python + FastAPI |
| High concurrency | Go + Gin |
| Max performance | Rust + Axum |
| ACID transactions | PostgreSQL |
| Flexible schema | MongoDB |
| Caching | Redis |
| Internal services | gRPC |
| Public APIs | GraphQL/REST |
| Real-time events | Kafka |
Implementation Checklist
Section titled “Implementation Checklist”API: Choose style → Design schema → Validate input → Add auth → Rate limiting → Documentation → Error handling
Database: Choose DB → Design schema → Create indexes → Connection pooling → Migration strategy → Backup/restore → Test performance
Security: OWASP Top 10 → Parameterized queries → OAuth 2.1 + JWT → Security headers → Rate limiting → Input validation → Argon2id passwords
Testing: Unit 70% → Integration 20% → E2E 10% → Load tests → Migration tests → Contract tests (microservices)
Deployment: Docker → CI/CD → Blue-green/canary → Feature flags → Monitoring → Logging → Health checks
Resources
Section titled “Resources”- OWASP Top 10: https://owasp.org/www-project-top-ten/
- OAuth 2.1: https://oauth.net/2.1/
- OpenTelemetry: https://opentelemetry.io/