Skip to content

Commit 7fdc6e5

Browse files
committed
DOC-3498: tinymceai on-prem documentation.
1 parent 1c20286 commit 7fdc6e5

49 files changed

Lines changed: 5297 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

-scripts/render-mermaid.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Re-renders all .mmd Mermaid sources to .svg in the on-premises images folder.
4+
#
5+
# Usage (from repo root):
6+
# ./-scripts/render-mermaid.sh
7+
#
8+
# Requirements:
9+
# Node.js (npx downloads @mermaid-js/mermaid-cli automatically)
10+
#
11+
set -euo pipefail
12+
13+
DIAGRAM_DIR="modules/ROOT/images/tinymceai-on-premises"
14+
CONFIG_FILE=$(mktemp)
15+
16+
cat > "$CONFIG_FILE" << 'JSON'
17+
{
18+
"htmlLabels": false,
19+
"flowchart": { "htmlLabels": false, "useMaxWidth": true },
20+
"sequence": { "useMaxWidth": true },
21+
"theme": "default"
22+
}
23+
JSON
24+
25+
trap 'rm -f "$CONFIG_FILE"' EXIT
26+
27+
count=0
28+
for mmd in "$DIAGRAM_DIR"/*.mmd; do
29+
[ -f "$mmd" ] || continue
30+
svg="${mmd%.mmd}.svg"
31+
name=$(basename "$mmd")
32+
printf " Rendering %s\n" "$name"
33+
npx -y @mermaid-js/mermaid-cli -i "$mmd" -o "$svg" \
34+
-c "$CONFIG_FILE" --backgroundColor white 2>/dev/null
35+
36+
# Mermaid outputs width="100%" which has no intrinsic size in <img> tags.
37+
# Replace with the actual pixel width from the viewBox so browsers can
38+
# calculate the correct aspect ratio when the page scales the image.
39+
vb_width=$(grep -o 'viewBox="[^"]*"' "$svg" | head -1 | awk -F'[ "]' '{print $4}')
40+
if [ -n "$vb_width" ]; then
41+
vb_int=$(printf "%.0f" "$vb_width")
42+
perl -i -pe "s/width=\"100%\"/width=\"${vb_int}\"/" "$svg"
43+
fi
44+
45+
count=$((count + 1))
46+
done
47+
48+
printf "\nRendered %d diagrams in %s\n" "$count" "$DIAGRAM_DIR"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
flowchart LR
2+
Editor[TinyMCE editor] <-->|chat / quick actions| AI[AI Service]
3+
AI -->|MCP tools/call| MCP[MCP Server<br>knowledge-hub]
4+
MCP -->|read| KB[Confluence ·<br>Notion ·<br>GitBook ·<br>internal wiki]
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
flowchart LR
2+
subgraph Tenants[Your SaaS customers]
3+
CA[Customer A users]
4+
CB[Customer B users]
5+
CC[Customer C users]
6+
end
7+
subgraph AISvc[Single AI service deployment]
8+
EA[Environment A<br>access keys A<br>isolated conversations]
9+
EB[Environment B<br>access keys B<br>isolated conversations]
10+
EC[Environment C<br>access keys C<br>isolated conversations]
11+
end
12+
CA --> EA --> OpenAI[OpenAI]
13+
CB --> EB --> Anthropic[Anthropic]
14+
CC --> EC --> Azure[Azure OpenAI]

modules/ROOT/images/tinymceai-on-premises/advanced-scenarios-fig-2.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
flowchart LR
2+
Lawyer[TinyMCE editor<br>used by lawyer] <--> AI[AI Service]
3+
AI -->|tools/call| MCP1[MCP: contract-db]
4+
AI -->|tools/call| MCP2[MCP: compliance-checker]
5+
AI -->|tools/call| MCP3[MCP: precedent-search]
6+
MCP1 --> ContractDB[(Contract clause<br>repository)]
7+
MCP2 --> ComplianceRules[(Regulatory<br>rule sets)]
8+
MCP3 --> PrecedentIdx[(Precedent<br>search index)]

modules/ROOT/images/tinymceai-on-premises/advanced-scenarios-fig-3.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
flowchart TB
2+
Browser["Browser<br>TinyMCE editor + tinymceai plugin"]
3+
TokenEP["Your token endpoint<br>signs HS256 JWTs"]
4+
Browser -->|"fetch JWT"| TokenEP
5+
Browser -->|"HTTPS + Bearer JWT"| LB
6+
7+
subgraph App["Application layer (stateless, N replicas)"]
8+
LB["Reverse proxy / Load balancer<br>nginx · ALB · K8s Ingress<br>TLS termination · SSE pass-through"]
9+
AI1["ai-service replica 1"]
10+
AI2["ai-service replica 2"]
11+
AIN["ai-service replica N"]
12+
LB --> AI1
13+
LB --> AI2
14+
LB --> AIN
15+
end
16+
17+
subgraph Data["Shared data layer"]
18+
DB[("SQL database<br>MySQL 8.0+ or<br>PostgreSQL 13+")]
19+
Cache[("Redis 3.2.6+<br>single node or cluster")]
20+
Storage[("File storage<br>database · filesystem ·<br>S3 · Azure Blob")]
21+
end
22+
23+
AI1 --> DB
24+
AI1 --> Cache
25+
AI1 --> Storage
26+
AI2 --> DB
27+
AI2 --> Cache
28+
AI2 --> Storage
29+
AIN --> DB
30+
AIN --> Cache
31+
AIN --> Storage
32+
33+
AI1 -->|HTTPS| LLM["LLM provider<br>OpenAI · Anthropic · Google ·<br>Azure · Bedrock · Vertex · self-hosted"]
34+
AI2 -->|HTTPS| LLM
35+
AIN -->|HTTPS| LLM
36+
37+
AI1 -.-> Obs["OpenTelemetry · Langfuse ·<br>log aggregator"]
38+
AI2 -.-> Obs
39+
AIN -.-> Obs
40+
41+
AI1 -.->|tool calls| MCP["MCP servers<br>internal knowledge bases"]
42+
AI2 -.-> MCP

modules/ROOT/images/tinymceai-on-premises/complete-guide-fig-1.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)