Repository navigation
docs(architecture): align flows, topology and contract claims with code - #11
Merged
Merged
Conversation
…de on main - rewrite key sequence flows from the real gateway, BFF and service routes - mark target vs current in the platform architecture and add quizz/word-pass -> gateway -> ai-engine - state that shared-sdk-client is an internal TypeScript library - mark event schemas, Outbox and contract-driven SDK regeneration as not implemented - note that true-false exists only in ai-engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong versus the code (origin/main, 2026-11-12)
architecture/key-sequence-flows.md(2026-04-22) described routes that do not exist:GET /v1/games/quiz/randomwith a "cache miss -> call AI" branch,PATCH /admin/routing/ai-engine,POST /rounds/:id/result,POST /players/:id/events. In code (checked gateway -> BFF -> service):GET /v1/mobile/games/quiz/random->bff-mobilesrc/app/routes/mobile.ts:373->GET /games/models/random(shared-sdk-clientgame-routes.ts:280), andrandomModelsonly reads stored Prisma rows; there is no AI fallback.POST /v1/mobile/games/*/generateis also served from the inventory (mobile.tsbuildGeneratedGameFromInventory).PUT /v1/backoffice/ai-engine/target->bff-backofficebackoffice.ts:1848->PUT /internal/admin/llama-targeton ai-engine; the gateway has its own separatePUT /internal/admin/ai-engine/target.GET /v1/backoffice/services/microservice-quiz/data?dataset=history->GET /games/history.POST /v1/mobile/games/eventsand stay in the BFFPlayerStore;bff-mobileonly callsGET /users/me/profileon the users service.POST /games/ingeston the game service -> gateway/internal/ai-engine/ingest/quiz-> ai-engine/ingest/quiz.architecture/target-architecture.mdandc4-views.mddrewGateway -> AIAPIbut not quizz/word-pass -> gateway -> ai-engine, which is whatplatform-infra/kubernetes/base/microservice-quizz/api-deployment.yaml:43configures (AI_ENGINE_BASE_URL=http://api-gateway:7005/internal/ai-engine). They also drew Contracts feeding the gateway and BFFs and the SDK feeding only those three.c4-views.md:71andglossary.md:28saidshared-sdk-clientis TS/Python/Kotlin generated clients; ADR 0003,contract-governance.mdanddomain-model.mdsaid the SDK is regenerated from contracts. It is an internal TypeScript library imported by six services; nothing is generated.master-alignment.mdclaimed "event-driven parcial" and events in ai-engine/quizz;service-communication.mdsaid event contracts are versioned. There is no broker, no producer and no consumer of the event schemas.quality-attributes.mdQA-P1 used the old route and a cache-hit measure that does not apply to a read-only path; QA-M1, QA-E1 and UC-14 assumed SDK regeneration./generate/true-false,/ingest/true-false); the gateway does not proxy it.What changed
key-sequence-flows.md: SF-01, SF-02, SF-04, SF-05, SF-06 rewritten from the real routes; added SF-07 (generation worker and processes) and a true-false note. SF-03 (CI/CD) kept, with a status note:platform-infradeploy.yamlis manual-only on main. Not otherwise re-verified.target-architecture.md: "current vs target" banner; quizz/word-pass -> gateway -> ai-engine; SDK edges to all six consumers; Contracts edge reduced to "docs, CI validation only"; async layer and true-false stated honestly.c4-views.md,glossary.md, ADR 0003 (status note, text kept),domain-model.md(contracts table now points to the Zod schemas ingame-schemas.ts),contract-governance.md,quality-attributes.md,use-cases.md.master-alignment.md(banner + cells),service-communication.md,tfm-practice-matrix.md; contract-driven SDK regeneration (target, not current).ai-content-generation.md: true-false has no consumer.Overlap with docs#10
AxiomNode/docs#10editsarchitecture/repository-map.md,operations/cicd-workflow-map.mdandoperations/deployment-strategy.md. This PR touches none of them, so there are no conflicting hunks. Only a content link: the SF-03 status note here is consistent with the staging-decommissioned wording in #10 (I confirmed the manual-onlydeploy.yamlonplatform-inframain independently).Related
AxiomNode/contracts-and-schemas#1(sibling draft PR): OpenAPI additions, generated route inventory for the gateway/BFFs (linked from SF-07 as a path, not a markdown link), event schemas marked not implemented.AxiomNode/microservice-users#5(open, unmerged) proposesPOST /users/me/games/events/batch. SF-06 mentions it as unmerged and describes only what is on main; nothing here depends on it.shared-sdk-clientPR Create icon and logos of app and project #4 (removes the empty python/kotlin/openapi/tooling folders) is not required for these docs; they describe the library as TypeScript-only.Verification
Done:
23e067b, bff-mobilea3a3fc5, bff-backofficeeb4a4a7, plus quizz, ai-engine, shared-sdk-client, platform-infra).validate-docs.yml) was ported to Node and run locally: 83 files, no broken links; line endings (CRLF) preserved in every file.Not verified:
c4-views.md(ai-engine supportstinydborredisbackends; I did not check which one is deployed); whether the ai-engine llama target override persists across pod restarts (stated as unverified in SF-02); the mobile appGameTypeclaim comes from the review notes, the app repository was not re-read; exact HTTP status mapping for slow upstreams in SF-04.shared-sdk-clientin passing); I searched for "kotlin/python" SDK mentions, event/Outbox, true-false and the old route names only.master-alignment.mdwas kept where untouched; my additions there are English or Spanish matching the cell.