# Graph Report - backend (2026-10-04) ## Corpus Check - cluster-only mode — file stats not available ## Summary - 1832 nodes · 6368 edges · 81 communities (65 shown, 16 thin omitted) - Extraction: 95% EXTRACTED · 5% INFERRED · 0% AMBIGUOUS · INFERRED: 293 edges (avg confidence: 0.8) - Token cost: 0 input · 0 output ## Graph Freshness - Built from commit: `131aef79` - Run `git rev-parse HEAD` and compare to check if the graph is stale. - Run `graphify update .` after code changes (no API cost). ## Community Hubs (Navigation) - Community 0 - Community 1 - Community 2 - Community 3 - Community 4 - Community 5 - Community 6 - Community 7 - Community 8 - Community 9 - Community 10 - Community 11 - Community 12 - Community 13 - Community 14 - Community 15 - Community 16 - Community 17 - Community 18 - Community 19 - Community 20 - Community 21 - Community 22 - Community 23 - Community 24 - Community 25 - Community 26 - Community 27 - Community 28 - Community 29 - Community 30 - Community 31 - Community 32 - Community 33 - Community 34 - Community 35 - Community 36 - Community 37 - Community 38 - Community 39 - Community 40 - Community 41 - Community 42 - Community 43 - Community 44 - Community 45 - Community 46 - Community 47 - Community 48 - Community 49 - Community 50 - Community 51 - Community 52 - Community 53 - Community 54 - Community 55 - Community 56 - Community 57 - Community 58 - Community 59 - Community 60 - Community 61 - Community 62 - Community 63 - Community 64 - Community 65 - Community 66 - Community 67 - Community 68 - Community 69 - Community 70 - Community 71 - Community 72 - Community 73 - Community 74 - Community 75 - Community 76 - Community 77 - Community 78 - Community 79 ## God Nodes (most connected - your core abstractions) 1. `Principal` - 434 edges 2. `AppError` - 267 edges 3. `CurrentPrincipal` - 219 edges 4. `RequirePermission()` - 198 edges 5. `@nestjs/common` - 141 edges 6. `recordAudit()` - 134 edges 7. `DatabaseService` - 115 edges 8. `AccessStore` - 103 edges 9. `PageInput` - 55 edges 10. `SchemaPipe` - 51 edges ## Surprising Connections (you probably didn't know these) - `assertReturn()` --calls--> `AppError` [EXTRACTED] src/fulfillment/fulfillment.policy.ts → src/common/errors/app-error.ts - `assertShipment()` --calls--> `AppError` [EXTRACTED] src/fulfillment/fulfillment.policy.ts → src/common/errors/app-error.ts - `captureDecision()` --calls--> `AppError` [EXTRACTED] src/payments/payment.policy.ts → src/common/errors/app-error.ts - `refundAmount()` --calls--> `AppError` [EXTRACTED] src/payments/payment.policy.ts → src/common/errors/app-error.ts - `RecoveryController` --references--> `Public()` [EXTRACTED] src/identity/recovery.controller.ts → src/identity/access.decorator.ts ## Import Cycles - None detected. ## Communities (81 total, 16 thin omitted) ### Community 0 - "Community 0" Cohesion: 0.05 Nodes (27): PartnerOrderCancelStore, CancelPartnerOrderInput, cancelPartnerOrderSchema, CreatePartnerOrderInput, createPartnerOrderSchema, PartnerOrderQuery, partnerOrderQuerySchema, PartnerOrderStore (+19 more) ### Community 1 - "Community 1" Cohesion: 0.07 Nodes (29): BomLine, calculateBatchCost(), Decimal, PackagingLine, quantity(), Rate, Usage, estimateLineCost() (+21 more) ### Community 2 - "Community 2" Cohesion: 0.12 Nodes (17): latest, Db, Db, Db, requireSample(), sampleInclude, Snapshot, snapshotView (+9 more) ### Community 3 - "Community 3" Cohesion: 0.11 Nodes (16): ensureDefault(), artworkInclude, artworkVersionSelect, Db, requireArtwork(), requireArtworkVersion(), isVerifiedBusinessAccount(), editableProduct() (+8 more) ### Community 4 - "Community 4" Cohesion: 0.07 Nodes (10): catalogWhere(), CatalogQuery, ProductInput, VariantInput, ProductStore, ProductsController, StorefrontController, StorefrontStore (+2 more) ### Community 5 - "Community 5" Cohesion: 0.09 Nodes (11): BomListQuery, CreateBomInput, createBomSchema, quantity, auditFor(), BomStore, permissionFor(), BomsController (+3 more) ### Community 6 - "Community 6" Cohesion: 0.10 Nodes (16): BusinessController, businessStatus(), presentBusiness(), businessProfileSchema, BusinessQuery, businessQuerySchema, CreateBusinessInput, createBusinessSchema (+8 more) ### Community 7 - "Community 7" Cohesion: 0.07 Nodes (15): CheckoutInput, checkoutSnapshot(), CheckoutStore, decimal(), discountFor(), minor(), OrderAdminController, OrderStore (+7 more) ### Community 8 - "Community 8" Cohesion: 0.08 Nodes (4): BatchCostStore, DatabaseService, AccessStore, RoleStore ### Community 9 - "Community 9" Cohesion: 0.20 Nodes (12): @nestjs/common, @nestjs/core, SchemaPipe, Argument, CurrentPrincipal, Public(), PUBLIC_ROUTE, REQUIRED_PERMISSION (+4 more) ### Community 10 - "Community 10" Cohesion: 0.12 Nodes (15): orderStatus(), orderView(), holdOrderStock(), assertReplay(), commandHash(), enqueueEvent(), adjustedBalance(), Adjustment (+7 more) ### Community 11 - "Community 11" Cohesion: 0.08 Nodes (11): MAX_ARTWORK_BYTES, ArtworkReviewStore, ArtworkDecisionInput, artworkDecisionSchema, ArtworkQuery, artworkQuerySchema, CreateArtworkInput, createArtworkSchema (+3 more) ### Community 12 - "Community 12" Cohesion: 0.09 Nodes (18): profileSnapshot(), calculatePriceCheck(), PriceTerms, assertEligiblePriceVariants(), Db, requireBusinessAccount(), requirePriceList(), PriceListItemStore (+10 more) ### Community 13 - "Community 13" Cohesion: 0.09 Nodes (13): BatchCostController, MaterialCostRatesController, PackagingCostController, ProductionCostController, CostingModule, CostHistoryQuery, costHistoryQuerySchema, CostQuery (+5 more) ### Community 14 - "Community 14" Cohesion: 0.10 Nodes (24): zod, addressSchema, optionalText(), createPriceListSchema, priceCheckSchema, priceListItemSchema, priceListQuerySchema, groupSchema (+16 more) ### Community 15 - "Community 15" Cohesion: 0.12 Nodes (10): ProcurementController, code, MaterialInput, materialSchema, ProcurementQuery, SupplierInput, SupplierMaterialInput, supplierMaterialSchema (+2 more) ### Community 16 - "Community 16" Cohesion: 0.13 Nodes (11): BatchListQuery, CancelBatchInput, cancelBatchSchema, CompleteBatchInput, completeBatchSchema, CreateBatchInput, createBatchSchema, BatchStore (+3 more) ### Community 17 - "Community 17" Cohesion: 0.08 Nodes (17): assignmentsSchema, createUserSchema, email, name, password, recoveryRequestSchema, recoveryResetSchema, RoleInput (+9 more) ### Community 18 - "Community 18" Cohesion: 0.12 Nodes (21): ErrorCode, formatMaterialQuantity(), parseMaterialQuantity(), plannedMaterialQuantity(), requireAvailableMaterials(), stockPostingHash(), requestHash(), usageSelect (+13 more) ### Community 19 - "Community 19" Cohesion: 0.12 Nodes (11): AddressesModule, AppModule, B2bModule, CatalogModule, CheckoutModule, DatabaseModule, HealthModule, IdentityModule (+3 more) ### Community 20 - "Community 20" Cohesion: 0.12 Nodes (11): SampleActionStore, SampleDecisionInput, sampleDecisionSchema, SampleDispatchInput, sampleDispatchSchema, SampleQuery, sampleQuerySchema, SampleRequestInput (+3 more) ### Community 21 - "Community 21" Cohesion: 0.13 Nodes (3): RequirePermission(), PageInput, StockController ### Community 22 - "Community 22" Cohesion: 0.14 Nodes (18): helmet, @nestjs/platform-express, @nestjs/swagger, @nestjs/testing, reflect-metadata, supertest, ApiExceptionFilter, ERRORS (+10 more) ### Community 23 - "Community 23" Cohesion: 0.08 Nodes (25): engines, node, name, packageManager, private, version, dotenv, @electric-sql/pglite (+17 more) ### Community 24 - "Community 24" Cohesion: 0.13 Nodes (7): StorefrontGuard, AuditController, AuthRateGuard, AuthService, LoginInput, loginSchema, RateLimitService ### Community 25 - "Community 25" Cohesion: 0.12 Nodes (9): amount, SupplierPaymentInput, SupplierPaymentReversalInput, supplierPaymentReversalSchema, supplierPaymentSchema, activePayments(), SupplierPaymentStore, InvoicePaymentsController (+1 more) ### Community 26 - "Community 26" Cohesion: 0.12 Nodes (12): B2B_ARTWORK_ERRORS, B2B_CREDIT_ERRORS, B2B_ERRORS, B2B_ORDER_ERRORS, B2B_PAYMENT_ERRORS, B2B_PRICE_ERRORS, B2B_QUOTE_ERRORS, B2B_SAMPLE_ERRORS (+4 more) ### Community 27 - "Community 27" Cohesion: 0.14 Nodes (6): DeliveryMessage, DeliveryPort, DeliveryService, DeliveryStore, DisabledDelivery, OperationsModule ### Community 28 - "Community 28" Cohesion: 0.12 Nodes (5): RecoveryInput, RecoveryController, RecoveryMailer, RecoveryService, RecoveryStore ### Community 29 - "Community 29" Cohesion: 0.14 Nodes (8): MaterialTransferController, MaterialTransferInput, MaterialTransferQuery, materialTransferSchema, MaterialTransferStore, present(), Transfer, transferView ### Community 30 - "Community 30" Cohesion: 0.14 Nodes (8): QuoteResponseStore, IssueQuoteInput, issueQuoteSchema, QuoteQuery, quoteQuerySchema, QuoteResponseInput, quoteResponseSchema, QuotesController ### Community 31 - "Community 31" Cohesion: 0.17 Nodes (9): CreditPoliciesController, CreditDecisionInput, creditDecisionSchema, CreditQuery, creditQuerySchema, ProposeCreditInput, proposeCreditSchema, SuspendCreditInput (+1 more) ### Community 32 - "Community 32" Cohesion: 0.09 Nodes (22): scripts, admin:prepare-local, admin:seed-local, bootstrap:owner, build, check, db:deploy, db:generate (+14 more) ### Community 33 - "Community 33" Cohesion: 0.11 Nodes (7): amount, common, CouponInput, couponSchema, couponStatusSchema, CouponStore, CouponsController ### Community 34 - "Community 34" Cohesion: 0.14 Nodes (5): PurchaseOrderInput, PurchaseOrderQuery, PurchaseOrderStore, reference(), PurchaseOrdersController ### Community 35 - "Community 35" Cohesion: 0.14 Nodes (4): SupplierDocumentStore, SupplierDocumentController, SupplierDocumentsController, SupplierDocumentVersionsController ### Community 37 - "Community 37" Cohesion: 0.16 Nodes (6): MaterialStockController, MaterialStockQuery, receiptStockPostingSchema, itemView, MaterialStockStore, present() ### Community 38 - "Community 38" Cohesion: 0.14 Nodes (6): MaterialAdjustmentController, MaterialAdjustmentInput, MaterialAdjustmentQuery, MaterialAdjustmentStore, present(), scaledDelta() ### Community 39 - "Community 39" Cohesion: 0.13 Nodes (11): folder, hashes, manifest, names, root, stamps, commands, credentialFile (+3 more) ### Community 40 - "Community 40" Cohesion: 0.15 Nodes (3): AddressInput, AddressStore, AddressesController ### Community 41 - "Community 41" Cohesion: 0.18 Nodes (9): inspectArtwork(), TYPES, verifiedArtwork(), fileDigest(), inspectPdf(), UploadedDocument, verifiedContent(), documentView (+1 more) ### Community 42 - "Community 42" Cohesion: 0.17 Nodes (6): creditInclude, Db, presentCreditPolicy(), requireCreditPolicy(), CreditReviewStore, CreditStore ### Community 43 - "Community 43" Cohesion: 0.16 Nodes (3): CreateUserInput, UserStore, UsersController ### Community 44 - "Community 44" Cohesion: 0.12 Nodes (17): devDependencies, @electric-sql/pglite, @electric-sql/pglite-socket, jest, @nestjs/testing, pg, prettier, prisma (+9 more) ### Community 45 - "Community 45" Cohesion: 0.18 Nodes (3): CreatePriceListInput, PriceListQuery, PriceListsController ### Community 46 - "Community 46" Cohesion: 0.16 Nodes (3): GroupInput, GroupStore, GroupsController ### Community 47 - "Community 47" Cohesion: 0.15 Nodes (3): PricingController, PricingInput, PricingStore ### Community 49 - "Community 49" Cohesion: 0.17 Nodes (3): ReservationInput, ReservationTransitionStore, ReservationsController ### Community 50 - "Community 50" Cohesion: 0.12 Nodes (15): compilerOptions, emitDecoratorMetadata, esModuleInterop, experimentalDecorators, isolatedModules, module, moduleResolution, noUnusedLocals (+7 more) ### Community 51 - "Community 51" Cohesion: 0.20 Nodes (3): Principal, OperationsController, OperationsStore ### Community 52 - "Community 52" Cohesion: 0.18 Nodes (4): MaterialReceiptPostingController, MaterialReceiptPostingStore, present(), ReceiptStockPostingInput ### Community 53 - "Community 53" Cohesion: 0.22 Nodes (3): GoodsReceiptStore, GoodsReceiptsController, ReceiptInspectionController ### Community 54 - "Community 54" Cohesion: 0.15 Nodes (13): dependencies, dotenv, helmet, @nestjs/common, @nestjs/core, @nestjs/platform-express, @nestjs/swagger, nodemailer (+5 more) ### Community 55 - "Community 55" Cohesion: 0.22 Nodes (6): InspectionInput, inspectionSchema, quantity, ReceiptInput, receiptSchema, quantity() ### Community 56 - "Community 56" Cohesion: 0.27 Nodes (5): MAX_DOCUMENT_BYTES, DocumentDecisionInput, documentDecisionSchema, SupplierDocumentInput, supplierDocumentSchema ### Community 58 - "Community 58" Cohesion: 0.18 Nodes (3): PackagingStockPostingController, PackagingStockPostingStore, present() ### Community 61 - "Community 61" Cohesion: 0.18 Nodes (7): CapturedPayment, GatewayPort, PaymentRequest, RefundRequest, captureDecision(), ExpectedPayment, refundAmount() ### Community 63 - "Community 63" Cohesion: 0.25 Nodes (3): BootstrapService, derive(), PasswordService ### Community 67 - "Community 67" Cohesion: 0.46 Nodes (4): nodemailer, ENVIRONMENT, hashToken(), issueToken() ### Community 70 - "Community 70" Cohesion: 0.29 Nodes (6): ./tsconfig.json, compilerOptions, rootDir, exclude, extends, include ### Community 72 - "Community 72" Cohesion: 0.38 Nodes (4): BomKind, bomView, isPackagingMaterial(), PACKAGING_MATERIAL_KINDS ### Community 73 - "Community 73" Cohesion: 0.33 Nodes (4): assertReturn(), assertShipment(), rank, TrackingStatus ### Community 75 - "Community 75" Cohesion: 0.40 Nodes (4): cartLineSchema, cartVersionSchema, checkoutSchema, couponCode ### Community 76 - "Community 76" Cohesion: 0.70 Nodes (3): MaterialUsageInput, MaterialUsageQuery, materialUsageSchema ### Community 77 - "Community 77" Cohesion: 0.60 Nodes (3): PackagingRunInput, packagingRunSchema, quantity ## Knowledge Gaps - **175 isolated node(s):** `Db`, `BomLine`, `Decimal`, `PackagingLine`, `Rate` (+170 more) These have ≤1 connection - possible missing edges. (Counts symbols only; 457 node(s) total have ≤1 connection when file, concept and rationale nodes are included.) - **16 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes. ## Suggested Questions _Questions this graph is uniquely positioned to answer:_ - **Why does `Principal` connect `Community 51` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 7`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 20`, `Community 21`, `Community 24`, `Community 25`, `Community 29`, `Community 30`, `Community 31`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 42`, `Community 43`, `Community 45`, `Community 46`, `Community 47`, `Community 48`, `Community 49`, `Community 52`, `Community 53`, `Community 55`, `Community 56`, `Community 57`, `Community 58`, `Community 59`, `Community 62`, `Community 65`, `Community 66`, `Community 68`, `Community 69`, `Community 72`, `Community 74`, `Community 76`, `Community 77`?** _High betweenness centrality (0.314) - this node is a cross-community bridge._ - **Why does `@nestjs/common` connect `Community 9` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 22`, `Community 23`, `Community 24`, `Community 27`, `Community 29`, `Community 30`, `Community 31`, `Community 37`, `Community 41`, `Community 42`, `Community 53`, `Community 56`, `Community 63`, `Community 67`, `Community 72`, `Community 76`, `Community 77`?** _High betweenness centrality (0.145) - this node is a cross-community bridge._ - **Why does `AppError` connect `Community 3` to `Community 0`, `Community 1`, `Community 2`, `Community 4`, `Community 5`, `Community 6`, `Community 7`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 21`, `Community 24`, `Community 25`, `Community 27`, `Community 28`, `Community 29`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 42`, `Community 46`, `Community 48`, `Community 52`, `Community 53`, `Community 55`, `Community 56`, `Community 57`, `Community 58`, `Community 60`, `Community 61`, `Community 62`, `Community 63`, `Community 67`, `Community 68`, `Community 69`, `Community 72`, `Community 73`, `Community 74`?** _High betweenness centrality (0.112) - this node is a cross-community bridge._ - **What connects `Db`, `BomLine`, `Decimal` to the rest of the system?** _175 weakly-connected nodes found - possible documentation gaps or missing edges._ - **Should `Community 0` be split into smaller, more focused modules?** _Cohesion score 0.05485232067510549 - nodes in this community are weakly interconnected._ - **Should `Community 1` be split into smaller, more focused modules?** _Cohesion score 0.07197763801537387 - nodes in this community are weakly interconnected._ - **Should `Community 2` be split into smaller, more focused modules?** _Cohesion score 0.11901306240928883 - nodes in this community are weakly interconnected._