Skip to main content

Package Graph

Every edge below is counted from real import statements across the 3,088 tracked TypeScript source files — not from package.json. Numbers are import statements, not files. Split into two diagrams because the combined graph exceeds what one picture can carry.

Applications → packages

Packages → packages

Leaf packages — import no other @cona/*: ui, agents, emails, observability, operational-config, temporal-config, plus eslint-config, typescript-config, and tailwind-config (build-time only, omitted above).

Do the layering rules hold?

CODEBASE_MAP.md:95-109 states three rules. Two hold; one does not.
“Core never imports an app” — 0 violations. No import from packages/core/** targets an app.
“Activities wrap core” — holds structurally. @cona/temporal-workflows imports @cona/core 292 times.
“Webapp never imports Prisma directly”false as written.@prisma/client is genuinely never imported by webapp. Repo-wide the only @prisma/* import is @prisma/instrumentation at packages/opentelemetry/src/dependencies.ts:10.But @cona/database’s root export re-exports the live client (packages/database/src/client.ts:177), and 40 production webapp files import it — including 9 mutations.
Webapp’s 507 @cona/database imports by entry point: The accurate rule is: webapp reaches the database through @cona/core or @cona/database/tracked, with 40 files still bypassing both.

Console is a different architecture

Console does not use @cona/core at all — it reads and writes through @cona/database directly. This is intentional given its superadmin scope, but it means the layering rules above simply do not apply to it. See Console.

Notes

@cona/core has no usable barrel. All 674 consumer imports go through subpaths — 541 via @cona/core/domains/* across 53 domains, 133 via named subpaths like /redis and /logger. The . export (src/index.ts) is imported by nothing. Draw core as 53 addressable modules, not one block. See Core Domain Map. One inverted edge. @cona/database imports @cona/temporal-config (src/direct-client.ts:1) — the data layer depending on Temporal configuration. Three runtime deps are declared as devDependencies in apps/webapp/package.json: @cona/core (343 imports), @cona/types (621), @cona/temporal-config (48). Next.js bundles them so it works, but it misrepresents the graph to tooling. Two directories look like packages but are not. packages/temporal-core and apps/sse-server contain only node_modules/build output, are untracked, and have no package.json. They are excluded everywhere in this section.