@@ -366,42 +366,31 @@ func FrameworkGraph() *Graph {
366366 // ── Layer 0: root ──────────────────────────────────────────────────
367367 g .AddNode (parent )
368368
369- // ── Layer 1: bom → parent ────────────────────────────────── ───────
369+ // ── Layer 1: bom + leaf modules (only depend on parent POM) ───────
370370 g .AddEdge (bom , parent )
371-
372- // ── Layer 2: utils → bom ──────────────────────────────────────────
373- g .AddEdge (utils , bom )
374-
375- // ── Layer 3: leaf modules that depend only on utils ────────────────
376371 for _ , mod := range []string {
377- validators , plugins , cache , r2dbc , eda , cqrs ,
378- client , ecm , idp , configServer ,
372+ utils , cache , eda , ecm , idp , configServer ,
373+ client , validators , plugins , transactionalEng ,
379374 } {
380- g .AddEdge (mod , utils )
375+ g .AddEdge (mod , parent )
381376 }
382377
383- // ── Layer 4 : modules with inter-module dependencies ─────────── ─────
378+ // ── Layer 2 : modules with single-level framework dependencies ─────
384379
385- // web depends on utils + cache
386- g .AddEdge (web , utils )
387- g .AddEdge (web , cache )
380+ // r2dbc depends on utils
381+ g .AddEdge (r2dbc , utils )
388382
389- // eventsourcing depends on cqrs, eda, r2dbc, cache
390- g .AddEdge (eventsourcing , cqrs )
391- g .AddEdge (eventsourcing , eda )
392- g .AddEdge (eventsourcing , r2dbc )
393- g .AddEdge (eventsourcing , cache )
383+ // cqrs depends on validators, cache
384+ g .AddEdge (cqrs , validators )
385+ g .AddEdge (cqrs , cache )
386+
387+ // web depends on cache
388+ g .AddEdge (web , cache )
394389
395390 // workflow depends on cache, eda
396391 g .AddEdge (workflow , cache )
397392 g .AddEdge (workflow , eda )
398393
399- // application depends on client, cache, cqrs, eda
400- g .AddEdge (application , client )
401- g .AddEdge (application , cache )
402- g .AddEdge (application , cqrs )
403- g .AddEdge (application , eda )
404-
405394 // ECM implementation modules
406395 g .AddEdge (ecmEsigAdobe , ecm )
407396 g .AddEdge (ecmEsigDocusign , ecm )
@@ -411,50 +400,61 @@ func FrameworkGraph() *Graph {
411400
412401 // IDP implementation modules
413402 g .AddEdge (idpCognito , idp )
414- g .AddEdge (idpInternalDB , idp )
415403 g .AddEdge (idpKeycloak , idp )
416404
417- // ── Layer 5: transactional engine → eventsourcing ──────────────────
418- g .AddEdge (transactionalEng , eventsourcing )
405+ // ── Layer 3: modules with deeper dependencies ─────────────────────
406+
407+ // eventsourcing depends on r2dbc, eda, cache
408+ g .AddEdge (eventsourcing , r2dbc )
409+ g .AddEdge (eventsourcing , eda )
410+ g .AddEdge (eventsourcing , cache )
411+
412+ // application depends on client, cache, cqrs, eda
413+ g .AddEdge (application , client )
414+ g .AddEdge (application , cache )
415+ g .AddEdge (application , cqrs )
416+ g .AddEdge (application , eda )
419417
420- // ── Layer 6: modules that depend on transactional-engine ───────────
418+ // idp-internal-db depends on idp, r2dbc
419+ g .AddEdge (idpInternalDB , idp )
420+ g .AddEdge (idpInternalDB , r2dbc )
421421
422- // core depends on cqrs, eda , transactional-engine
422+ // core depends on eda, cqrs , transactional-engine
423423 g .AddEdge (core , cqrs )
424424 g .AddEdge (core , eda )
425425 g .AddEdge (core , transactionalEng )
426426
427- // domain depends on client, cqrs, eda, transactional-engine, validators
428- g .AddEdge (domain , client )
427+ // domain depends on validators, transactional-engine, cqrs, client, eda
428+ g .AddEdge (domain , validators )
429+ g .AddEdge (domain , transactionalEng )
429430 g .AddEdge (domain , cqrs )
431+ g .AddEdge (domain , client )
430432 g .AddEdge (domain , eda )
431- g .AddEdge (domain , transactionalEng )
432- g .AddEdge (domain , validators )
433433
434- // data depends on cache, client, cqrs, eda, transactional-engine
435- g .AddEdge (data , cache )
434+ // data depends on client, cqrs, eda, cache, transactional-engine
436435 g .AddEdge (data , client )
437436 g .AddEdge (data , cqrs )
438437 g .AddEdge (data , eda )
438+ g .AddEdge (data , cache )
439439 g .AddEdge (data , transactionalEng )
440440
441- // ── Layer 7 : modules that depend on core/domain/data ─ ──────────────
441+ // ── Layer 4 : modules that depend on core/domain/data ──────────────
442442
443443 // notifications depends on core
444444 g .AddEdge (notifications , core )
445445
446- // rule-engine depends on cache, core, r2dbc, utils, validators, web
447- g .AddEdge (ruleEngine , utils )
448- g .AddEdge (ruleEngine , cache )
446+ // rule-engine depends on core, cache, utils, validators, web, r2dbc
449447 g .AddEdge (ruleEngine , core )
450- g .AddEdge (ruleEngine , r2dbc )
448+ g .AddEdge (ruleEngine , cache )
449+ g .AddEdge (ruleEngine , utils )
451450 g .AddEdge (ruleEngine , validators )
452451 g .AddEdge (ruleEngine , web )
452+ g .AddEdge (ruleEngine , r2dbc )
453453
454- // webhooks depends on cache, core, eda, web
455- g .AddEdge (webhooks , cache )
454+ // webhooks depends on core, eda, cache, web
456455 g .AddEdge (webhooks , core )
457456 g .AddEdge (webhooks , eda )
457+ g .AddEdge (webhooks , cache )
458458 g .AddEdge (webhooks , web )
459459
460460 // callbacks depends on core, eda, r2dbc, web
@@ -473,7 +473,7 @@ func FrameworkGraph() *Graph {
473473 g .AddEdge (backoffice , eda )
474474 g .AddEdge (backoffice , application )
475475
476- // ── Layer 8 : notification implementations → notifications ─ ─────────
476+ // ── Layer 5 : notification implementations → notifications ─────────
477477 g .AddEdge (notifFirebase , notifications )
478478 g .AddEdge (notifResend , notifications )
479479 g .AddEdge (notifSendgrid , notifications )
0 commit comments