# intellectdaksh/inkloom-ai-codetitans-2026 architecture

> Architecture diagram of the GitHub repository intellectdaksh/inkloom-ai-codetitans-2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/intellectdaksh/inkloom-ai-codetitans-2026
- Repository: https://github.com/intellectdaksh/inkloom-ai-codetitans-2026

## Overview

AdSnitch is a pre-publication brand-governance application: creators submit campaign copy, receive evidence-linked compliance findings and suggested edits, and high-risk drafts can enter reviewer approval. Its central runtime is a submission API coordinating persistence and a six-stage analysis pipeline. The README documents additional capabilities including claims management, cascade re-review, disputes, analytics, and team governance. Relationships among unsampled feature pages and endpoints are not asserted unless documented; the cited source excerpts show the submission orchestration and pipeline dependencies.

Main entry points: [`src/lib/ai/pipeline.ts`](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/pipeline.ts) (Governance Pipeline), [`src/app/api/submissions/route.ts`](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/route.ts) (Submission API), [`src/lib/db/store.ts`](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/db/store.ts) (Tenant Data Store), [`src/app/page.tsx`](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/page.tsx) (Audit Workbench)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Creator and Reviewer Experience"]
  node_workbench["Audit Workbench<br/>[page.tsx]"]
  node_submission_views["Submission Views<br/>[page.tsx]"]
  node_diff_viewer["Surgical Diff Viewer<br/>[DiffViewer.tsx]"]
end

subgraph group_workflow["Submission and Review"]
  node_submission_api["Submission API<br/>[route.ts]"]
  node_findings_api["Finding Management<br/>[route.ts]"]
  node_approvals["Approval Queue<br/>[page.tsx]"]
  node_approval_api["Approval Actions<br/>[route.ts]"]
  node_notifications["Notifications<br/>[route.ts]"]
end

subgraph group_analysis["Compliance Analysis"]
  node_pipeline["Governance Pipeline<br/>[pipeline.ts]"]
  node_segmentation["Content Segmentation<br/>[pipeline.ts]"]
  node_rule_engine["Deterministic Rules<br/>[rules.ts]"]
  node_retrieval["Scoped Knowledge Retrieval<br/>[retrieval.ts]"]
  node_context_analysis["Contextual AI Analysis<br/>[gemini.ts]"]
end

subgraph group_governance["Brand Governance"]
  node_claims_library["Claims Library<br/>[page.tsx]"]
  node_guidelines["Guidelines and Terminology<br/>[page.tsx]"]
  node_cascade["Cascade Re-review<br/>[route.ts]"]
  node_disputes["Finding Disputes<br/>[route.ts]"]
  node_analytics["Governance Analytics<br/>[page.tsx]"]
end

subgraph group_persistence["Persistence"]
  node_tenant_store[("Tenant Data Store<br/>[store.ts]")]
end

node_creator(("Creator or Reviewer"))

node_creator -->|"submits copy"| node_workbench
node_workbench -.->|"starts audit"| node_submission_api
node_submission_api -->|"creates submission"| node_tenant_store
node_submission_api -->|"runs analysis"| node_pipeline
node_submission_api -->|"records findings"| node_tenant_store
node_pipeline -->|"segments content"| node_segmentation
node_pipeline -->|"checks rules"| node_rule_engine
node_pipeline -->|"retrieves context"| node_retrieval
node_pipeline -->|"analyzes context"| node_context_analysis
node_retrieval -.->|"loads tenant knowledge"| node_tenant_store
node_pipeline -->|"routes high risk"| node_approvals
node_submission_views -.->|"shows revisions"| node_diff_viewer
node_creator -->|"manages claims"| node_claims_library
node_claims_library -->|"triggers re-review"| node_cascade
node_creator -->|"contests findings"| node_disputes
node_approvals -.->|"submits decision"| node_approval_api
node_approval_api -->|"records decision"| node_tenant_store
node_creator -->|"reviews brand rules"| node_guidelines
node_creator -->|"reviews performance"| node_analytics
node_submission_api -->|"records audit event"| node_tenant_store

click node_workbench "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/page.tsx"
click node_submission_views "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/submissions/%5Bid%5D/page.tsx"
click node_diff_viewer "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/components/ui/DiffViewer.tsx"
click node_submission_api "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/route.ts"
click node_findings_api "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/%5Bid%5D/findings/route.ts"
click node_approvals "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/approvals/page.tsx"
click node_approval_api "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/approvals/route.ts"
click node_pipeline "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/pipeline.ts"
click node_segmentation "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/pipeline.ts"
click node_rule_engine "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/rules.ts"
click node_retrieval "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/retrieval.ts"
click node_context_analysis "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/gemini.ts"
click node_claims_library "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/knowledge-base/claims/page.tsx"
click node_guidelines "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/knowledge-base/guidelines/page.tsx"
click node_cascade "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/claims/%5Bid%5D/cascade/route.ts"
click node_disputes "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/%5Bid%5D/findings/route.ts"
click node_analytics "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/analytics/page.tsx"
click node_tenant_store "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/db/store.ts"
click node_notifications "https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/notifications/route.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_workbench,node_submission_views,node_diff_viewer,node_creator toneBlue
class node_submission_api,node_findings_api,node_approvals,node_approval_api,node_notifications toneAmber
class node_pipeline,node_segmentation,node_rule_engine,node_retrieval,node_context_analysis toneMint
class node_claims_library,node_guidelines,node_cascade,node_disputes,node_analytics toneRose
class node_tenant_store toneIndigo
```

## Components

### Creator and Reviewer Experience

- [Audit Workbench](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Submission Views](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/submissions/%5Bid%5D/page.tsx): `src/app/submissions/[id]/page.tsx`
- [Surgical Diff Viewer](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/components/ui/DiffViewer.tsx): `src/components/ui/DiffViewer.tsx`

### Submission and Review

- [Submission API](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/route.ts): `src/app/api/submissions/route.ts`
- [Finding Management](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/%5Bid%5D/findings/route.ts): `src/app/api/submissions/[id]/findings/route.ts`
- [Approval Queue](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/approvals/page.tsx): `src/app/approvals/page.tsx`
- [Approval Actions](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/approvals/route.ts): `src/app/api/approvals/route.ts`
- [Notifications](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/notifications/route.ts): `src/app/api/notifications/route.ts`

### Compliance Analysis

- [Governance Pipeline](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/pipeline.ts): `src/lib/ai/pipeline.ts`
- [Content Segmentation](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/pipeline.ts): `src/lib/ai/pipeline.ts`
- [Deterministic Rules](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/rules.ts): `src/lib/ai/rules.ts`
- [Scoped Knowledge Retrieval](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/retrieval.ts): `src/lib/ai/retrieval.ts`
- [Contextual AI Analysis](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/ai/gemini.ts): `src/lib/ai/gemini.ts`

### Brand Governance

- [Claims Library](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/knowledge-base/claims/page.tsx): `src/app/knowledge-base/claims/page.tsx`
- [Guidelines and Terminology](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/knowledge-base/guidelines/page.tsx): `src/app/knowledge-base/guidelines/page.tsx`
- [Cascade Re-review](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/claims/%5Bid%5D/cascade/route.ts): `src/app/api/claims/[id]/cascade/route.ts`
- [Finding Disputes](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/api/submissions/%5Bid%5D/findings/route.ts): `src/app/api/submissions/[id]/findings/route.ts`
- [Governance Analytics](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/app/analytics/page.tsx): `src/app/analytics/page.tsx`

### Persistence

- [Tenant Data Store](https://github.com/intellectdaksh/inkloom-ai-codetitans-2026/blob/main/src/lib/db/store.ts): `src/lib/db/store.ts`

### Other components

- **Creator or Reviewer**

## Connections

- Creator or Reviewer → Audit Workbench: submits copy
- Audit Workbench → Submission API: starts audit
- Submission API → Tenant Data Store: creates submission (evidence: `src/app/api/submissions/route.ts`)
- Submission API → Governance Pipeline: runs analysis (evidence: `src/app/api/submissions/route.ts`)
- Submission API → Tenant Data Store: records findings (evidence: `src/app/api/submissions/route.ts`)
- Governance Pipeline → Content Segmentation: segments content (evidence: `src/lib/ai/pipeline.ts`)
- Governance Pipeline → Deterministic Rules: checks rules (evidence: `src/lib/ai/pipeline.ts`)
- Governance Pipeline → Scoped Knowledge Retrieval: retrieves context (evidence: `src/lib/ai/pipeline.ts`)
- Governance Pipeline → Contextual AI Analysis: analyzes context (evidence: `src/lib/ai/pipeline.ts`)
- Scoped Knowledge Retrieval → Tenant Data Store: loads tenant knowledge
- Governance Pipeline → Approval Queue: routes high risk
- Submission Views → Surgical Diff Viewer: shows revisions
- Creator or Reviewer → Claims Library: manages claims
- Claims Library → Cascade Re-review: triggers re-review
- Creator or Reviewer → Finding Disputes: contests findings
- Approval Queue → Approval Actions: submits decision
- Approval Actions → Tenant Data Store: records decision (evidence: `src/app/api/approvals/route.ts`)
- Creator or Reviewer → Guidelines and Terminology: reviews brand rules
- Creator or Reviewer → Governance Analytics: reviews performance
- Submission API → Tenant Data Store: records audit event (evidence: `src/app/api/submissions/route.ts`)
