Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit afb066f

Browse files
docs: update README with demo integration details and setup instructions
1 parent 73610f4 commit afb066f

1 file changed

Lines changed: 32 additions & 7 deletions

File tree

demo/README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,51 @@
11
# Demo
22

3+
This demo shows how to integrate `@superdoc-dev/esign` into a React application. The frontend sends signing and download requests to a proxy server, which securely communicates with the SuperDoc Services API.
4+
5+
## Prerequisites
6+
7+
You'll need a SuperDoc Services API key. [Get your API key here](https://docs.superdoc.dev/api-reference/authentication/register).
8+
39
## Setup
410

5-
1. Build the main package first (from root):
11+
1. Build the main package (from repo root):
612
```bash
713
pnpm build
814
```
915

10-
2. Install demo dependencies:
16+
2. Install dependencies:
1117
```bash
1218
cd demo
1319
pnpm install
20+
cd server
21+
pnpm install
1422
```
1523

16-
3. Create `.env` file with your API key:
24+
3. Create `.env` file in `demo/server/`:
1725
```
18-
VITE_SUPERDOC_SERVICES_API_KEY=your_key_here
26+
SUPERDOC_SERVICES_API_KEY=your_key_here
1927
```
2028

21-
4. Run the demo:
22-
```bash
23-
pnpm run dev
29+
4. Update `demo/vite.config.ts` to proxy to localhost:
30+
```ts
31+
proxy: {
32+
'/v1': {
33+
target: 'http://localhost:3001',
34+
changeOrigin: true,
35+
},
36+
},
2437
```
2538

39+
## Running
40+
41+
Start the proxy server:
42+
```bash
43+
cd demo/server
44+
pnpm start
45+
```
2646

47+
In a separate terminal, start the frontend:
48+
```bash
49+
cd demo
50+
pnpm dev
51+
```

0 commit comments

Comments
 (0)