Skip to content

Commit 2ae279f

Browse files
committed
feat: add esign and template-builder demos, unified Cloudflare Pages deploy
Migrate eSign and Template Builder demos from superdoc monorepo as standalone apps with published npm dependencies. All three demos deploy to a single Cloudflare Pages project (superdoc-demos) under path-based routing: /docrag/, /esign/, /template-builder/. Landing page at root.
1 parent 28ef177 commit 2ae279f

28 files changed

Lines changed: 3396 additions & 16 deletions

.github/workflows/deploy-rag.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: Deploy RAG Demo
1+
name: Deploy Demos
22

33
on:
44
workflow_dispatch:
55
push:
66
branches: [main]
77
paths:
88
- "rag/**"
9+
- "esign/**"
10+
- "template-builder/**"
911
- ".github/workflows/deploy-rag.yml"
1012

1113
env:
@@ -41,20 +43,45 @@ jobs:
4143
working-directory: rag/apps/api
4244

4345
deploy-web:
44-
name: Deploy Frontend
46+
name: Deploy All Demos
4547
needs: check
4648
runs-on: ubuntu-latest
47-
defaults:
48-
run:
49-
working-directory: rag
5049
steps:
5150
- uses: actions/checkout@v6
5251
- uses: oven-sh/setup-bun@v2
52+
53+
# Build DocRAG
5354
- run: bun install
55+
working-directory: rag
5456
- run: bunx vite build
5557
working-directory: rag/apps/web
5658
env:
5759
VITE_API_URL: ${{ vars.VITE_API_URL }}
5860
BASE_PATH: /docrag/
59-
- run: mkdir -p dist/docrag && cp -r apps/web/dist/* dist/docrag/
61+
62+
# Build eSign
63+
- run: bun install
64+
working-directory: esign
65+
- run: bunx vite build
66+
working-directory: esign
67+
env:
68+
BASE_PATH: /esign/
69+
70+
# Build Template Builder
71+
- run: bun install
72+
working-directory: template-builder
73+
- run: bunx vite build
74+
working-directory: template-builder
75+
env:
76+
BASE_PATH: /template-builder/
77+
78+
# Assemble dist
79+
- run: |
80+
mkdir -p dist/docrag dist/esign dist/template-builder
81+
cp -r rag/apps/web/dist/* dist/docrag/
82+
cp -r esign/dist/* dist/esign/
83+
cp -r template-builder/dist/* dist/template-builder/
84+
cp dist-landing/index.html dist/
85+
86+
# Deploy
6087
- run: bunx wrangler pages deploy dist --project-name=superdoc-demos --commit-dirty=true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
dist/
2+
node_modules/

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Working demos built with [SuperDoc](https://superdoc.dev) — the document engine for the modern web.
44

5-
Each demo is a standalone app that showcases a real-world use case: extracting document content for AI, building RAG pipelines, editing with tracked changes, and more.
5+
Live at [demos.superdoc.dev](https://demos.superdoc.dev)
66

77
## Demos
88

@@ -12,24 +12,30 @@ Ask your documents. Get cited answers. Upload `.docx` files and get AI-powered a
1212

1313
**Stack**: Cloudflare Workers + R2, PostgreSQL + pgvector, React, SuperDoc, Claude, OpenAI embeddings
1414

15-
**What it shows**:
16-
- Extract text, comments, and tracked changes from `.docx` files using the SuperDoc SDK
17-
- Chunk and embed document content for vector search
18-
- RAG pipeline: semantic search + Claude generates answers with citations
19-
- Click a citation to navigate to the source in the SuperDoc viewer
20-
- Cross-document search across multiple files
15+
### [`esign/`](./esign) — eSign
16+
17+
eSignature orchestration demo. Add signature fields to `.docx` and PDF documents, sign with custom signatures, and manage the signing workflow.
18+
19+
**Stack**: React, SuperDoc, @superdoc-dev/esign
20+
21+
### [`template-builder/`](./template-builder) — Template Builder
22+
23+
Document template engine demo. Build reusable templates with dynamic fields and merge data into `.docx` documents.
24+
25+
**Stack**: React, SuperDoc, @superdoc-dev/template-builder
2126

2227
## Running a Demo
2328

24-
Each demo has its own README with setup instructions. The general pattern:
29+
Each demo is a standalone app. The general pattern:
2530

2631
```bash
27-
cd rag
32+
cd <demo>
2833
bun install
29-
cp .env.example .env # add your API keys
3034
bun run dev
3135
```
3236

37+
See each demo's directory for specific setup instructions.
38+
3339
## License
3440

3541
MIT

dist-landing/index.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>SuperDoc Demos</title>
7+
<style>
8+
* { margin: 0; padding: 0; box-sizing: border-box; }
9+
body { font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif; background: #fafafa; color: #000; height: 100vh; display: flex; align-items: center; justify-content: center; }
10+
.container { text-align: center; }
11+
h1 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
12+
p { font-size: 14px; color: #888; margin-bottom: 32px; }
13+
.demos { display: flex; gap: 16px; }
14+
a { display: block; padding: 20px 32px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; text-decoration: none; color: #000; font-size: 14px; font-weight: 500; transition: border-color 0.15s; }
15+
a:hover { border-color: #0070f3; }
16+
span { display: block; font-size: 12px; color: #888; margin-top: 4px; font-weight: 400; }
17+
</style>
18+
</head>
19+
<body>
20+
<div class="container">
21+
<h1>SuperDoc Demos</h1>
22+
<p>Working demos built with <a href="https://superdoc.dev" style="display:inline;padding:0;border:none;color:#0070f3;background:none;">SuperDoc</a></p>
23+
<div class="demos">
24+
<a href="/docrag/">DocRAG<span>Document Q&A with citations</span></a>
25+
<a href="/esign/">eSign<span>eSignature orchestration</span></a>
26+
<a href="/template-builder/">Template Builder<span>Document template engine</span></a>
27+
</div>
28+
</div>
29+
</body>
30+
</html>

0 commit comments

Comments
 (0)