Skip to content

docs: update READMEs for microservices split + EdDSA + native control flow#12

Merged
dherrero merged 1 commit into
mainfrom
docs/update-readmes-microservices
May 19, 2026
Merged

docs: update READMEs for microservices split + EdDSA + native control flow#12
dherrero merged 1 commit into
mainfrom
docs/update-readmes-microservices

Conversation

@dherrero
Copy link
Copy Markdown
Owner

Summary

Ambos README.md (es) y docs/README_eng.md (en) estaban anclados al estado pre-refactor. Esta PR los reescribe para reflejar el estado actual del proyecto tras los merges de #9, #10 y #11.

Cambios

Tema Antes Ahora
Stack Angular 20, Nx 22.0, Express 5.1 Angular 21.2, Nx 22.7, Express 5.2
Arquitectura "Backend" monolítico en :3200 Diagrama gateway público (:3100) → api privado (:3200) con X-Internal-Auth EdDSA
Estructura apps/{front, back} apps/{front, gateway, api} + libs/{rest-dto, internal-auth}
Scripts dev:back, build:back, test:back dev:api, dev:gateway, build:api, build:gateway, test:api, test:gateway, test:internal-auth
Auth "JWT con access y refresh tokens" genérico Sección detallada: secretos separados, claims typ + jti, refresh_token_family con reuse detection, Ed25519 con privilege separation, link a docs/SECURITY.md
Env vars JWT_SECRET único Bloque completo: JWT_ACCESS_SECRET, JWT_REFRESH_SECRET, INTERNAL_JWT_PRIVATE_KEY/PUBLIC_KEY, GATEWAY_PORT, API_BASE_URL
Esquema DB Toy snippet con users.permission singular Esquemas reales de db/10.user.sql y db/20.refresh_token_family.sql
Backend agent authController.hasPermission(...) requireInternalAuth({allowedScopes, requiredPermissions}) de libs/internal-auth
Frontend agent "TrackBy en *ngFor" Control flow nativo (@if / @for con track / @switch), sin *ngIf / *ngFor en código nuevo
Troubleshooting Sólo puerto en uso / DB connection + sección con el error refresh_token_family does not exist y el path de recovery dev:db:clean
Roadmap Genérico (notificaciones, e2e, métricas) Alineado con SaaS enterprise: SSO/OIDC, SAML, SCIM 2.0, multi-tenancy, OpenTelemetry

Sección de Claude Code / subagentes / skills mantenida (sigue válida), sólo ajustada en los puntos donde la convención del agente cambió (auth en api/gateway, control flow nativo).

Verificación

  • grep -n 'apps/back' README.md docs/README_eng.md → 0 ocurrencias.
  • grep -n 'dev:back\|build:back\|test:back\|start:back' README.md docs/README_eng.md → 0 ocurrencias.
  • grep -n 'JWT_REFRESH_SECRET' README.md docs/README_eng.md → ahora aparece junto a JWT_ACCESS_SECRET (eran inexistentes / un único JWT_SECRET antes).
  • Estilo npm run dev actualizado a 4 terminales en paralelo (DB + API + Gateway + Frontend).
  • Versión inglesa mantiene paridad 1-a-1 con la española.

Test plan

  • Render del README en GitHub se ve correctamente (badges, tabla, diagrama ASCII).
  • Render del docs/README_eng.md igualmente.
  • Todos los enlaces relativos (docs/SECURITY.md, scripts/rename.sh, etc.) resuelven correctamente.
  • Un dev nuevo siguiendo Quick Start del README llega hasta npm run dev sin fricción y entiende que tiene que generar las claves Ed25519 antes.

No toca código de la aplicación — sólo dos archivos Markdown.

🤖 Generated with Claude Code

… flow

Both README.md (Spanish) and docs/README_eng.md (English) were stuck on
the pre-refactor state — Angular 20, `apps/back`, single JWT_SECRET,
backend on port 3200 exposed publicly, `*ngIf` performance tips, etc.
Rewritten to reflect the current architecture:

- Architecture: gateway (public, :3100) + api (private, :3200) diagram,
  internal-network with `internal: true`.
- Stack: Angular 21, Nx 22, Express 5.2, PostgreSQL 16, esbuild + Vite.
- Project structure: apps/{api, front, gateway} + libs/{rest-dto,
  internal-auth}; old `apps/back` removed.
- Scripts: dev:api / dev:gateway / dev:front (instead of dev:back),
  build:api / build:gateway, test:api / test:gateway /
  test:internal-auth.
- Auth section rewritten around split secrets (JWT_ACCESS_SECRET +
  JWT_REFRESH_SECRET), typ + jti claims, refresh_token_family
  rotation/reuse detection, and Ed25519 keypair for internal JWT with
  link to docs/SECURITY.md.
- Subagent docs: backend developer now mentions
  `requireInternalAuth({allowedScopes, requiredPermissions})` rather
  than the old `authController.hasPermission`. Frontend developer
  notes native control flow (@if / @for / @switch) and no *ngIf /
  *ngFor in new code.
- Database section: real schemas straight from db/10.user.sql and
  db/20.refresh_token_family.sql instead of the stale toy snippet.
- Env vars: full updated block including INTERNAL_JWT_PRIVATE_KEY /
  INTERNAL_JWT_PUBLIC_KEY, GATEWAY_PORT, API_BASE_URL, CORS_ORIGIN.
- Troubleshooting: added the common `refresh_token_family does not
  exist` symptom and the dev:db:clean recovery path.
- Roadmap aligned with the SSO/OIDC/SAML/SCIM/multi-tenant direction
  discussed in the architecture conversation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dherrero dherrero merged commit c23c295 into main May 19, 2026
@dherrero dherrero deleted the docs/update-readmes-microservices branch May 19, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant