10-arquitectura-backend

10-arquitectura-backend is a cursor rule for Cursor from Mazalucas/El-DT-Lightweight-Army. It costs 0 tokens per session (515 once invoked), scanned A, original, MIT.

A set of conventions for structuring backend code and web APIs, including business logic, data access, presentation, and error handling.

In plain words
What is it for?
It helps build REST APIs and organize repositories, services, database access, endpoint documentation, and error reporting.
Why use it?
It gives server-side code a predictable structure and prevents errors from being silently ignored.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It helps build REST APIs and organize repositories, services, database access, endpoint documentation, and error reporting.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Mazalucas/El-DT-Lightweight-Army

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 10-arquitectura-backend

README.md
[![agentmods](https://agentmods.dev/badge/rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend/github.svg)](https://agentmods.dev/rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend)
Your own site
<a href="https://agentmods.dev/rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend"><img src="https://agentmods.dev/badge/rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 10-arquitectura-backend

Your own site · 80×15
<a href="https://agentmods.dev/rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend"><img src="https://agentmods.dev/badge/rules/mazalucas/el-dt-lightweight-army/10-arquitectura-backend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 515 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00515
Opus 5 $0.00000 $0.00258
Sonnet 5 $0.00000 $0.00103
Haiku 4.5 $0.00000 $0.00052

Measured 9d ago against content hash 03974bc59640, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

10-arquitectura-backend scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/10-arquitectura-backend.mdc · 57 lines

What it actually says

Arquitectura Backend

Stack default del DT: ver regla 08-stack-web-default y vitals/data/engineering/web-stack.yaml.

Stack default (proyecto web nuevo)

  • Backend/API: Cloud Functions for Firebase (Node.js LTS)
  • Base de datos: Firestore (Realtime DB solo si el caso lo exige)
  • Auth: Firebase Auth
  • Secrets: Firebase Secrets (ver regla 90-seguridad-secrets)
  • Escalation: Cloud Run + Firestore para workers pesados; SQL solo con opt-out explícito

Si el repo ya usa otro stack, respetarlo (soft default).

Convenciones

  • Capas: Separar lógica de negocio, acceso a datos y presentación (API)
  • APIs: Usar convenciones REST; nombres en snake_case o camelCase según el stack
  • Manejo de errores: Capturar y propagar con contexto; no tragar excepciones
  • Patrones: Repository para datos; Service para lógica de negocio

Ejemplo de manejo de errores

// Evitar
try { await fetchData(); } catch (e) {}

// Preferir
try {
  await fetchData();
} catch (e) {
  logger.error('Failed to fetch', { error: e });
  throw new DataFetchError('Unable to retrieve data', { cause: e });
}

APIs

  • Documentar endpoints (OpenAPI/Swagger si aplica)
  • Versionar APIs cuando sea necesario
  • Validar input en el boundary

Reutilización (reuse-first)

Regla transversal: 15-engineering-reuse · skill arquitecto · DOC-REF-006.

  • Extender handlers y services existentes antes de nuevos entrypoints paralelos
  • Validators compartidos en boundary — no duplicar validación por handler
  • Repository/Service existente: añadir métodos; evitar *Repository2, *ServiceCopy
  • Decisiones estructurales (DB, breaking API): proponer ADR en docs/05_decisions/ (ver skill arquitecto/references/adr-triggers.md)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 57 lines · 0 tokens per session scan A 03974bc59640

Subscribe to this mod's changes

10-arquitectura-backend is a cursor rule published in the GitHub repository Mazalucas/El-DT-Lightweight-Army (4 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 515 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.