# atlasdigitaltech/athyper architecture

> Architecture diagram of the GitHub repository atlasdigitaltech/athyper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atlasdigitaltech/athyper
- Repository: https://github.com/atlasdigitaltech/athyper

## Overview

Athyper is a multi-tenant SaaS platform with a TypeScript runtime and a Neon web product. Its documented architecture centers on a DI-based runtime and adapters; the visible query workflow accepts REST requests, validates and executes cross-entity queries with tenant and field-level security. The graph also preserves documented platform capabilities and sampled content, notification, validation, audit, and orchestration services. Several subsystems are represented by paths in the source index or tree but were not excerpted, so their connections are left unverified rather than inferred.

Main entry points: [`framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts`](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts) (Query execution), [`framework/runtime/src/kernel/bootstrap.ts`](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/kernel/bootstrap.ts) (Runtime kernel), [`framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts`](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts) (Content previews), [`framework/runtime/src/services/platform/foundation/generic-api/query/query.routes.ts`](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query.routes.ts) (Query routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and adapters"]
  node_http["HTTP API"]
  node_kernel["Runtime kernel<br/>[bootstrap.ts]"]
  node_db[("PostgreSQL adapter<br/>[adapter.ts]")]
  node_redis[("Redis adapter<br/>[redis.ts]")]
  node_object_storage[("Object storage<br/>[client.ts]")]
  node_job_queue["Job queue<br/>[types.ts]"]
end

subgraph group_query["Query and security"]
  node_query_routes["Query routes<br/>[query.routes.ts]"]
  node_query_service["Query execution<br/>[query.service.ts]"]
  node_query_dsl["Query DSL<br/>[query-dsl.ts]"]
  node_join_planner["Join planner<br/>[join-planner.ts]"]
  node_field_projection["Field projection"]
  node_field_access["Field access policy"]
end

subgraph group_platform["Platform services"]
  node_content_preview["Content previews<br/>[PreviewService.ts]"]
  node_attachment_repo["Attachment records<br/>[AttachmentRepo.ts]"]
  node_content_audit["Content audit"]
  node_notification_rules["Notification rules<br/>[RuleEngine.ts]"]
  node_notification_model["Rule model"]
  node_notification_repo["Rule persistence"]
  node_validation["Meta validation"]
  node_conditions["Condition evaluator"]
  node_audit_timeline["Audit timeline"]
  node_audit_slow["Slow-query audit"]
  node_audit_outbox[("Audit outbox<br/>[AuditOutboxRepo.ts]")]
  node_orchestration["Job orchestration"]
end

subgraph group_business["Business services"]
  node_finance["Finance capabilities<br/>[module.ts]"]
  node_engines["Business engines<br/>[engine-base.ts]"]
end

subgraph group_web["Neon web product"]
  node_web["Neon web app<br/>[route.ts]"]
  node_api_client["Typed API clients<br/>[messagingClient.ts]"]
end

node_user(("Platform user"))

node_user -.->|"sends requests"| node_http
node_http -.->|"dispatches requests"| node_kernel
node_kernel -.->|"registers routes"| node_query_routes
node_query_routes -->|"executes queries"| node_query_service
node_query_service -->|"plans joins"| node_join_planner
node_query_service -->|"parses conditions"| node_query_dsl
node_query_service -->|"projects fields"| node_field_projection
node_field_projection -->|"checks access"| node_field_access
node_query_service -.->|"queries data"| node_db
node_content_preview -->|"loads attachments"| node_attachment_repo
node_content_preview -->|"reads and writes files"| node_object_storage
node_content_preview -.->|"emits audit"| node_content_audit
node_notification_rules -->|"loads rules"| node_notification_repo
node_notification_rules -->|"evaluates rules"| node_notification_model
node_validation -->|"evaluates conditions"| node_conditions
node_validation -->|"caches compiled rules"| node_redis
node_audit_slow -->|"handles slow queries"| node_audit_timeline
node_audit_timeline -.->|"persists audit events"| node_audit_outbox
node_orchestration -->|"enqueues approvals"| node_job_queue
node_web -.->|"uses API clients"| node_api_client
node_web -.->|"requests entity data"| node_query_routes
node_kernel -.->|"hosts modules"| node_finance
node_kernel -.->|"hosts engines"| node_engines

click node_http "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/adapters/http/express.httpServer.ts"
click node_kernel "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/kernel/bootstrap.ts"
click node_db "https://github.com/atlasdigitaltech/athyper/blob/main/framework/adapters/db/src/adapter.ts"
click node_redis "https://github.com/atlasdigitaltech/athyper/blob/main/framework/adapters/memorycache/src/redis.ts"
click node_query_routes "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query.routes.ts"
click node_query_service "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts"
click node_query_dsl "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query-dsl.ts"
click node_join_planner "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/join-planner.ts"
click node_field_projection "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/security/field-security/field-projection.ts"
click node_field_access "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/security/field-security/field-access.service.ts"
click node_content_preview "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts"
click node_attachment_repo "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/persistence/AttachmentRepo.ts"
click node_object_storage "https://github.com/atlasdigitaltech/athyper/blob/main/framework/adapters/objectstorage/src/s3/client.ts"
click node_content_audit "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/domain/services/ContentAuditEmitter.ts"
click node_notification_rules "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/notification/domain/services/RuleEngine.ts"
click node_notification_model "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/notification/domain/models/NotificationRule.ts"
click node_notification_repo "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/notification/persistence/NotificationRuleRepo.ts"
click node_validation "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/meta/validation/rule-engine.service.ts"
click node_conditions "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/shared/condition-evaluator.ts"
click node_audit_timeline "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/audit-governance/domain/activity-timeline.service.ts"
click node_audit_slow "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/audit-governance/domain/audit-slow-query.handler.ts"
click node_audit_outbox "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/audit-governance/persistence/AuditOutboxRepo.ts"
click node_orchestration "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/automation-jobs/orchestration/orchestration-engine.service.ts"
click node_job_queue "https://github.com/atlasdigitaltech/athyper/blob/main/framework/core/src/jobs/types.ts"
click node_finance "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/business/finance/accounting/module.ts"
click node_engines "https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/business/engines/shared/engine-base.ts"
click node_web "https://github.com/atlasdigitaltech/athyper/blob/main/products/neon/apps/web/app/api/entity-page/%5Bentity%5D/route.ts"
click node_api_client "https://github.com/atlasdigitaltech/athyper/blob/main/packages/api-client/src/messaging/messagingClient.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_http,node_kernel,node_db,node_redis,node_object_storage,node_job_queue,node_user toneBlue
class node_query_routes,node_query_service,node_query_dsl,node_join_planner,node_field_projection,node_field_access toneAmber
class node_content_preview,node_attachment_repo,node_content_audit,node_notification_rules,node_notification_model,node_notification_repo,node_validation,node_conditions,node_audit_timeline,node_audit_slow,node_audit_outbox,node_orchestration toneMint
class node_finance,node_engines toneRose
class node_web,node_api_client toneIndigo
```

## Components

### Runtime and adapters

- [HTTP API](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/adapters/http/express.httpServer.ts): `framework/runtime/src/adapters/http/express.httpServer.ts`
- [Runtime kernel](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/kernel/bootstrap.ts): `framework/runtime/src/kernel/bootstrap.ts`
- [PostgreSQL adapter](https://github.com/atlasdigitaltech/athyper/blob/main/framework/adapters/db/src/adapter.ts): `framework/adapters/db/src/adapter.ts`
- [Redis adapter](https://github.com/atlasdigitaltech/athyper/blob/main/framework/adapters/memorycache/src/redis.ts): `framework/adapters/memorycache/src/redis.ts`
- [Object storage](https://github.com/atlasdigitaltech/athyper/blob/main/framework/adapters/objectstorage/src/s3/client.ts): `framework/adapters/objectstorage/src/s3/client.ts`
- [Job queue](https://github.com/atlasdigitaltech/athyper/blob/main/framework/core/src/jobs/types.ts): `framework/core/src/jobs/types.ts`

### Query and security

- [Query routes](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query.routes.ts): `framework/runtime/src/services/platform/foundation/generic-api/query/query.routes.ts`
- [Query execution](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts): `framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts`
- [Query DSL](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/query-dsl.ts): `framework/runtime/src/services/platform/foundation/generic-api/query/query-dsl.ts`
- [Join planner](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/generic-api/query/join-planner.ts): `framework/runtime/src/services/platform/foundation/generic-api/query/join-planner.ts`
- [Field projection](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/security/field-security/field-projection.ts): `framework/runtime/src/services/platform/foundation/security/field-security/field-projection.ts`
- [Field access policy](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/foundation/security/field-security/field-access.service.ts): `framework/runtime/src/services/platform/foundation/security/field-security/field-access.service.ts`

### Platform services

- [Content previews](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts): `framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts`
- [Attachment records](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/persistence/AttachmentRepo.ts): `framework/runtime/src/services/platform-services/content/persistence/AttachmentRepo.ts`
- [Content audit](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/content/domain/services/ContentAuditEmitter.ts): `framework/runtime/src/services/platform-services/content/domain/services/ContentAuditEmitter.ts`
- [Notification rules](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/notification/domain/services/RuleEngine.ts): `framework/runtime/src/services/platform-services/notification/domain/services/RuleEngine.ts`
- [Rule model](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/notification/domain/models/NotificationRule.ts): `framework/runtime/src/services/platform-services/notification/domain/models/NotificationRule.ts`
- [Rule persistence](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform-services/notification/persistence/NotificationRuleRepo.ts): `framework/runtime/src/services/platform-services/notification/persistence/NotificationRuleRepo.ts`
- [Meta validation](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/meta/validation/rule-engine.service.ts): `framework/runtime/src/services/platform/meta/validation/rule-engine.service.ts`
- [Condition evaluator](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/shared/condition-evaluator.ts): `framework/runtime/src/services/platform/shared/condition-evaluator.ts`
- [Audit timeline](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/audit-governance/domain/activity-timeline.service.ts): `framework/runtime/src/services/platform/audit-governance/domain/activity-timeline.service.ts`
- [Slow-query audit](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/audit-governance/domain/audit-slow-query.handler.ts): `framework/runtime/src/services/platform/audit-governance/domain/audit-slow-query.handler.ts`
- [Audit outbox](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/audit-governance/persistence/AuditOutboxRepo.ts): `framework/runtime/src/services/platform/audit-governance/persistence/AuditOutboxRepo.ts`
- [Job orchestration](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/platform/automation-jobs/orchestration/orchestration-engine.service.ts): `framework/runtime/src/services/platform/automation-jobs/orchestration/orchestration-engine.service.ts`

### Business services

- [Finance capabilities](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/business/finance/accounting/module.ts): `framework/runtime/src/services/business/finance/accounting/module.ts`
- [Business engines](https://github.com/atlasdigitaltech/athyper/blob/main/framework/runtime/src/services/business/engines/shared/engine-base.ts): `framework/runtime/src/services/business/engines/shared/engine-base.ts`

### Neon web product

- [Neon web app](https://github.com/atlasdigitaltech/athyper/blob/main/products/neon/apps/web/app/api/entity-page/%5Bentity%5D/route.ts): `products/neon/apps/web/app/api/entity-page/[entity]/route.ts`
- [Typed API clients](https://github.com/atlasdigitaltech/athyper/blob/main/packages/api-client/src/messaging/messagingClient.ts): `packages/api-client/src/messaging/messagingClient.ts`

### Other components

- **Platform user**

## Connections

- Platform user → HTTP API: sends requests
- HTTP API → Runtime kernel: dispatches requests
- Runtime kernel → Query routes: registers routes
- Query routes → Query execution: executes queries (evidence: `framework/runtime/src/services/platform/foundation/generic-api/query/query.routes.ts`)
- Query execution → Join planner: plans joins (evidence: `framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts`)
- Query execution → Query DSL: parses conditions (evidence: `framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts`)
- Query execution → Field projection: projects fields (evidence: `framework/runtime/src/services/platform/foundation/generic-api/query/query.service.ts`)
- Field projection → Field access policy: checks access (evidence: `framework/runtime/src/services/platform/foundation/security/field-security/field-projection.ts`)
- Query execution → PostgreSQL adapter: queries data
- Content previews → Attachment records: loads attachments (evidence: `framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts`)
- Content previews → Object storage: reads and writes files (evidence: `framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts`)
- Content previews → Content audit: emits audit (evidence: `framework/runtime/src/services/platform-services/content/domain/services/PreviewService.ts`)
- Notification rules → Rule persistence: loads rules (evidence: `framework/runtime/src/services/platform-services/notification/domain/services/RuleEngine.ts`)
- Notification rules → Rule model: evaluates rules (evidence: `framework/runtime/src/services/platform-services/notification/domain/services/RuleEngine.ts`)
- Meta validation → Condition evaluator: evaluates conditions (evidence: `framework/runtime/src/services/platform/meta/validation/rule-engine.service.ts`)
- Meta validation → Redis adapter: caches compiled rules (evidence: `framework/runtime/src/services/platform/meta/validation/rule-engine.service.ts`)
- Slow-query audit → Audit timeline: handles slow queries (evidence: `framework/runtime/src/services/platform/audit-governance/domain/audit-slow-query.handler.ts`)
- Audit timeline → Audit outbox: persists audit events
- Job orchestration → Job queue: enqueues approvals (evidence: `framework/runtime/src/services/platform/automation-jobs/orchestration/orchestration-engine.service.ts`)
- Neon web app → Typed API clients: uses API clients
- Neon web app → Query routes: requests entity data
- Runtime kernel → Finance capabilities: hosts modules
- Runtime kernel → Business engines: hosts engines
