vg-x07df 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.azure-pipelines/publish-public.yml +37 -0
- package/.azure-pipelines/publish.yml +39 -0
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/AUTO_JOIN_GUIDE.md +411 -0
- package/README.md +215 -0
- package/Screenshot 2025-09-24 at 14.34.48.png +0 -0
- package/Screenshot 2025-10-04 at 12.58.54.png +0 -0
- package/biome.json +48 -0
- package/examples/demo/.env.example +19 -0
- package/examples/demo/CHANGELOG.md +22 -0
- package/examples/demo/README.md +72 -0
- package/examples/demo/eslint.config.js +23 -0
- package/examples/demo/index.html +13 -0
- package/examples/demo/package.json +34 -0
- package/examples/demo/pnpm-lock.yaml +2098 -0
- package/examples/demo/pnpm-workspace.yaml +1 -0
- package/examples/demo/public/vite.svg +1 -0
- package/examples/demo/src/App.css +52 -0
- package/examples/demo/src/App.tsx +176 -0
- package/examples/demo/src/assets/react.svg +1 -0
- package/examples/demo/src/components/auth/LoginForm.css +144 -0
- package/examples/demo/src/components/auth/LoginForm.tsx +80 -0
- package/examples/demo/src/components/calling/AutoJoinSettings.tsx +213 -0
- package/examples/demo/src/components/calling/AutoJoinStatus.tsx +72 -0
- package/examples/demo/src/components/calling/CallInitiator.css +258 -0
- package/examples/demo/src/components/calling/CallInitiator.tsx +142 -0
- package/examples/demo/src/components/calling/CallNotifications.css +119 -0
- package/examples/demo/src/components/calling/CallNotifications.tsx +108 -0
- package/examples/demo/src/components/calling/IncomingCallModal.css +192 -0
- package/examples/demo/src/components/calling/IncomingCallModal.tsx +78 -0
- package/examples/demo/src/components/calling/MinimizedCall.css +156 -0
- package/examples/demo/src/components/calling/MinimizedCall.tsx +78 -0
- package/examples/demo/src/components/conference/ConferenceHeader.css +265 -0
- package/examples/demo/src/components/conference/ConferenceHeader.tsx +78 -0
- package/examples/demo/src/components/conference/EnhancedControlBar.css +356 -0
- package/examples/demo/src/components/conference/EnhancedControlBar.tsx +262 -0
- package/examples/demo/src/components/conference/PaginationControls.css +67 -0
- package/examples/demo/src/components/conference/PaginationControls.tsx +64 -0
- package/examples/demo/src/components/conference/ParticipantGrid.css +153 -0
- package/examples/demo/src/components/conference/ParticipantGrid.tsx +87 -0
- package/examples/demo/src/components/conference/ParticipantTile.css +210 -0
- package/examples/demo/src/components/conference/ParticipantTile.tsx +114 -0
- package/examples/demo/src/components/conference/VideoConference.css +214 -0
- package/examples/demo/src/components/conference/VideoConference.tsx +93 -0
- package/examples/demo/src/contexts/AuthContext.tsx +105 -0
- package/examples/demo/src/hooks/useAuth.ts +5 -0
- package/examples/demo/src/hooks/useCallTimer.ts +42 -0
- package/examples/demo/src/index.css +68 -0
- package/examples/demo/src/main.tsx +10 -0
- package/examples/demo/src/services/auth.service.ts +153 -0
- package/examples/demo/src/types/auth.types.ts +31 -0
- package/examples/demo/tsconfig.app.json +28 -0
- package/examples/demo/tsconfig.json +7 -0
- package/examples/demo/tsconfig.node.json +26 -0
- package/examples/demo/vite.config.ts +15 -0
- package/images/callpad-without-ai.png +0 -0
- package/package.json +28 -0
- package/packages/sdk/CHANGELOG.md +33 -0
- package/packages/sdk/LICENSE +21 -0
- package/packages/sdk/README.md +97 -0
- package/packages/sdk/documentation.md +1132 -0
- package/packages/sdk/openapi-ts.config.ts +7 -0
- package/packages/sdk/package.json +88 -0
- package/packages/sdk/src/core/auth.manager.ts +52 -0
- package/packages/sdk/src/core/events/event-bus.ts +301 -0
- package/packages/sdk/src/core/events/index.ts +8 -0
- package/packages/sdk/src/core/events/types.ts +165 -0
- package/packages/sdk/src/core/index.ts +3 -0
- package/packages/sdk/src/core/signal/api.config.ts +49 -0
- package/packages/sdk/src/core/signal/index.ts +16 -0
- package/packages/sdk/src/core/signal/signal.client.ts +101 -0
- package/packages/sdk/src/core/signal/types.ts +110 -0
- package/packages/sdk/src/core/socketio/handlers/base.handler.ts +212 -0
- package/packages/sdk/src/core/socketio/handlers/call-accepted.handler.ts +34 -0
- package/packages/sdk/src/core/socketio/handlers/call-canceled.handler.ts +34 -0
- package/packages/sdk/src/core/socketio/handlers/call-declined.handler.ts +29 -0
- package/packages/sdk/src/core/socketio/handlers/call-ended.handler.ts +40 -0
- package/packages/sdk/src/core/socketio/handlers/call-incoming.handler.ts +72 -0
- package/packages/sdk/src/core/socketio/handlers/call-join-info.handler.ts +181 -0
- package/packages/sdk/src/core/socketio/handlers/call-participant-joined.handler.ts +42 -0
- package/packages/sdk/src/core/socketio/handlers/call-participant-joining.handler.ts +42 -0
- package/packages/sdk/src/core/socketio/handlers/call-timeout.handler.ts +31 -0
- package/packages/sdk/src/core/socketio/handlers/handler.registry.ts +62 -0
- package/packages/sdk/src/core/socketio/handlers/index.ts +21 -0
- package/packages/sdk/src/core/socketio/handlers/participant-left.handler.ts +37 -0
- package/packages/sdk/src/core/socketio/handlers/schema.ts +130 -0
- package/packages/sdk/src/core/socketio/index.ts +5 -0
- package/packages/sdk/src/core/socketio/socket.manager.ts +187 -0
- package/packages/sdk/src/core/socketio/types.ts +14 -0
- package/packages/sdk/src/core/types.ts +23 -0
- package/packages/sdk/src/generated/api/core/ApiError.ts +21 -0
- package/packages/sdk/src/generated/api/core/ApiRequestOptions.ts +13 -0
- package/packages/sdk/src/generated/api/core/ApiResult.ts +7 -0
- package/packages/sdk/src/generated/api/core/CancelablePromise.ts +126 -0
- package/packages/sdk/src/generated/api/core/OpenAPI.ts +55 -0
- package/packages/sdk/src/generated/api/core/request.ts +339 -0
- package/packages/sdk/src/generated/api/index.ts +5 -0
- package/packages/sdk/src/generated/api/models.ts +219 -0
- package/packages/sdk/src/generated/api/services.ts +225 -0
- package/packages/sdk/src/hooks/index.ts +21 -0
- package/packages/sdk/src/hooks/useAutoJoin.ts +66 -0
- package/packages/sdk/src/hooks/useCallActions.ts +28 -0
- package/packages/sdk/src/hooks/useCallQuality.ts +416 -0
- package/packages/sdk/src/hooks/useCallState.ts +23 -0
- package/packages/sdk/src/hooks/useConnection.ts +15 -0
- package/packages/sdk/src/hooks/useDevices.ts +296 -0
- package/packages/sdk/src/hooks/useErrorRecovery.ts +299 -0
- package/packages/sdk/src/hooks/useErrors.ts +84 -0
- package/packages/sdk/src/hooks/useEvent.ts +188 -0
- package/packages/sdk/src/hooks/useMediaControls.ts +215 -0
- package/packages/sdk/src/hooks/useParticipantStatus.ts +318 -0
- package/packages/sdk/src/hooks/useParticipants.ts +111 -0
- package/packages/sdk/src/index.ts +66 -0
- package/packages/sdk/src/livekit/constants.ts +76 -0
- package/packages/sdk/src/livekit/device.manager.ts +172 -0
- package/packages/sdk/src/livekit/error-classifier.ts +155 -0
- package/packages/sdk/src/livekit/events/eventBridge.ts +371 -0
- package/packages/sdk/src/livekit/events/trackRegistry.ts +114 -0
- package/packages/sdk/src/livekit/index.ts +49 -0
- package/packages/sdk/src/livekit/livekit.service.ts +110 -0
- package/packages/sdk/src/livekit/media.controls.ts +315 -0
- package/packages/sdk/src/livekit/room.manager.ts +79 -0
- package/packages/sdk/src/livekit/track.utils.ts +230 -0
- package/packages/sdk/src/livekit/types.ts +135 -0
- package/packages/sdk/src/provider/RtcProvider.tsx +78 -0
- package/packages/sdk/src/services/call-actions.ts +260 -0
- package/packages/sdk/src/services/error-recovery.ts +461 -0
- package/packages/sdk/src/services/index.ts +2 -0
- package/packages/sdk/src/services/sdk-builder.ts +104 -0
- package/packages/sdk/src/state/errors.ts +163 -0
- package/packages/sdk/src/state/selectors.ts +28 -0
- package/packages/sdk/src/state/store.ts +36 -0
- package/packages/sdk/src/state/types.ts +151 -0
- package/packages/sdk/src/utils/logger.ts +183 -0
- package/packages/sdk/tsconfig.json +49 -0
- package/packages/sdk/tsup.config.ts +51 -0
- package/pnpm-workspace.yaml +4 -0
- package/tsconfig.base.json +19 -0
- package/turbo.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# CallPad Web SDK
|
|
2
|
+
|
|
3
|
+
A Turborepo monorepo containing the CallPad Web SDK and related packages.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
This monorepo includes the following packages:
|
|
8
|
+
|
|
9
|
+
### Packages
|
|
10
|
+
|
|
11
|
+
- `packages/sdk` - CallPad SDK (`vg-x07df`) - Production-ready headless SDK for CallPad audio/video calls
|
|
12
|
+
- `examples/demo` - Demo application showcasing CallPad SDK features
|
|
13
|
+
|
|
14
|
+
### Tools & Configuration
|
|
15
|
+
|
|
16
|
+
- **Turborepo** for build orchestration and monorepo management
|
|
17
|
+
- **pnpm** as the package manager
|
|
18
|
+
- **TypeScript** for type checking
|
|
19
|
+
- **Biome** for code linting and formatting
|
|
20
|
+
- **Changesets** for version management and publishing
|
|
21
|
+
|
|
22
|
+
## Getting Started
|
|
23
|
+
|
|
24
|
+
### Prerequisites
|
|
25
|
+
|
|
26
|
+
- Node.js ≥18
|
|
27
|
+
- pnpm ≥9.0.0
|
|
28
|
+
|
|
29
|
+
### Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Install dependencies
|
|
33
|
+
pnpm install
|
|
34
|
+
|
|
35
|
+
# Build all packages
|
|
36
|
+
pnpm build
|
|
37
|
+
|
|
38
|
+
# Run type checking
|
|
39
|
+
pnpm check-types
|
|
40
|
+
|
|
41
|
+
# Run linting
|
|
42
|
+
pnpm lint
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Development
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Start development mode
|
|
49
|
+
pnpm dev
|
|
50
|
+
|
|
51
|
+
# Start development for SDK only
|
|
52
|
+
pnpm dev --filter=vg-x07df
|
|
53
|
+
|
|
54
|
+
# Start demo application
|
|
55
|
+
pnpm dev --filter=callpad-demo
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Building
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Build all packages
|
|
62
|
+
pnpm build
|
|
63
|
+
|
|
64
|
+
# Build SDK only
|
|
65
|
+
pnpm build --filter=vg-x07df
|
|
66
|
+
|
|
67
|
+
# Build with type checking
|
|
68
|
+
pnpm build && pnpm check-types
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Publishing Packages
|
|
72
|
+
|
|
73
|
+
This project uses [Changesets](https://github.com/changesets/changesets) for version management and publishing. The main publishable package is the CallPad SDK (`vg-x07df`).
|
|
74
|
+
|
|
75
|
+
### Prerequisites for Publishing
|
|
76
|
+
|
|
77
|
+
1. **NPM Authentication**: Ensure you have npm access and authentication configured
|
|
78
|
+
```bash
|
|
79
|
+
npm login
|
|
80
|
+
# or set NPM_TOKEN in your .env file
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
2. **Environment Setup**: Create a `.env` file in the root with your npm token:
|
|
84
|
+
```bash
|
|
85
|
+
NPM_TOKEN=your_npm_token_here
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Publishing Workflow
|
|
89
|
+
|
|
90
|
+
#### 1. Create a Changeset
|
|
91
|
+
|
|
92
|
+
When you make changes that should be included in the next release, create a changeset:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Create a new changeset (interactive)
|
|
96
|
+
pnpm changeset
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This will:
|
|
100
|
+
- Prompt you to select which packages to include
|
|
101
|
+
- Ask for the type of change (major, minor, patch)
|
|
102
|
+
- Request a summary of the changes
|
|
103
|
+
|
|
104
|
+
#### 2. Version Packages
|
|
105
|
+
|
|
106
|
+
When you're ready to release, update package versions based on changesets:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Process changesets and bump versions
|
|
110
|
+
pnpm version
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
This will:
|
|
114
|
+
- Update package.json versions according to changesets
|
|
115
|
+
- Update CHANGELOG.md files
|
|
116
|
+
- Remove processed changeset files
|
|
117
|
+
|
|
118
|
+
#### 3. Publish to npm
|
|
119
|
+
|
|
120
|
+
Publish the updated packages:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Build, type-check, and publish to npm
|
|
124
|
+
pnpm publish
|
|
125
|
+
|
|
126
|
+
# Or test the publishing process first
|
|
127
|
+
pnpm publish:dry
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This command:
|
|
131
|
+
- Builds only the SDK package (`--filter=vg-x07df`)
|
|
132
|
+
- Runs type checking to ensure code quality
|
|
133
|
+
- Publishes to npm registry with proper authentication
|
|
134
|
+
|
|
135
|
+
### Changeset Types
|
|
136
|
+
|
|
137
|
+
- **Patch** (`1.0.0 → 1.0.1`): Bug fixes, small updates
|
|
138
|
+
- **Minor** (`1.0.0 → 1.1.0`): New features, backward-compatible changes
|
|
139
|
+
- **Major** (`1.0.0 → 2.0.0`): Breaking changes
|
|
140
|
+
|
|
141
|
+
### Example Publishing Flow
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# 1. Make your changes to the SDK
|
|
145
|
+
# 2. Create a changeset
|
|
146
|
+
pnpm changeset
|
|
147
|
+
# Select packages: vg-x07df
|
|
148
|
+
# Change type: patch/minor/major
|
|
149
|
+
# Summary: "Add new useCallQuality hook"
|
|
150
|
+
|
|
151
|
+
# 3. Commit your changes
|
|
152
|
+
git add .
|
|
153
|
+
git commit -m "feat: add useCallQuality hook"
|
|
154
|
+
|
|
155
|
+
# 4. When ready to release, process changesets
|
|
156
|
+
pnpm version
|
|
157
|
+
|
|
158
|
+
# 5. Publish to npm
|
|
159
|
+
pnpm publish
|
|
160
|
+
|
|
161
|
+
# 6. Push the version changes
|
|
162
|
+
git push && git push --tags
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### CI/CD Publishing
|
|
166
|
+
|
|
167
|
+
The Azure pipeline (`.azure-pipelines/publish.yml`) automatically publishes when:
|
|
168
|
+
- Changes are pushed to the `main` branch
|
|
169
|
+
- The `NPM_TOKEN` environment variable is configured in Azure DevOps
|
|
170
|
+
|
|
171
|
+
### Remote Caching
|
|
172
|
+
|
|
173
|
+
> [!TIP]
|
|
174
|
+
> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache).
|
|
175
|
+
|
|
176
|
+
Turborepo can use a technique known as [Remote Caching](https://turborepo.com/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
|
177
|
+
|
|
178
|
+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup?utm_source=turborepo-examples), then enter the following commands:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
cd my-turborepo
|
|
182
|
+
|
|
183
|
+
# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
|
|
184
|
+
turbo login
|
|
185
|
+
|
|
186
|
+
# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
|
|
187
|
+
npx turbo login
|
|
188
|
+
yarn exec turbo login
|
|
189
|
+
pnpm exec turbo login
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
|
|
193
|
+
|
|
194
|
+
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
|
|
198
|
+
turbo link
|
|
199
|
+
|
|
200
|
+
# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
|
|
201
|
+
npx turbo link
|
|
202
|
+
yarn exec turbo link
|
|
203
|
+
pnpm exec turbo link
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Useful Links
|
|
207
|
+
|
|
208
|
+
Learn more about the power of Turborepo:
|
|
209
|
+
|
|
210
|
+
- [Tasks](https://turborepo.com/docs/crafting-your-repository/running-tasks)
|
|
211
|
+
- [Caching](https://turborepo.com/docs/crafting-your-repository/caching)
|
|
212
|
+
- [Remote Caching](https://turborepo.com/docs/core-concepts/remote-caching)
|
|
213
|
+
- [Filtering](https://turborepo.com/docs/crafting-your-repository/running-tasks#using-filters)
|
|
214
|
+
- [Configuration Options](https://turborepo.com/docs/reference/configuration)
|
|
215
|
+
- [CLI Usage](https://turborepo.com/docs/reference/command-line-reference)
|
|
Binary file
|
|
Binary file
|
package/biome.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
|
|
3
|
+
"files": {
|
|
4
|
+
"include": [
|
|
5
|
+
"packages/**/*.ts",
|
|
6
|
+
"packages/**/*.tsx",
|
|
7
|
+
"packages/**/*.js",
|
|
8
|
+
"packages/**/*.jsx"
|
|
9
|
+
],
|
|
10
|
+
"ignore": [
|
|
11
|
+
"node_modules/**/*",
|
|
12
|
+
"**/dist/**/*",
|
|
13
|
+
"**/.turbo/**/*",
|
|
14
|
+
"**/generated/**/*"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"linter": {
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"rules": {
|
|
20
|
+
"recommended": true,
|
|
21
|
+
"style": {
|
|
22
|
+
"noUnusedTemplateLiteral": "error"
|
|
23
|
+
},
|
|
24
|
+
"correctness": {
|
|
25
|
+
"useExhaustiveDependencies": "warn"
|
|
26
|
+
},
|
|
27
|
+
"suspicious": {
|
|
28
|
+
"noExplicitAny": "off"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"formatter": {
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"formatWithErrors": false,
|
|
35
|
+
"indentStyle": "space",
|
|
36
|
+
"indentWidth": 2,
|
|
37
|
+
"lineWidth": 80
|
|
38
|
+
},
|
|
39
|
+
"organizeImports": {
|
|
40
|
+
"enabled": true
|
|
41
|
+
},
|
|
42
|
+
"javascript": {
|
|
43
|
+
"formatter": {
|
|
44
|
+
"semicolons": "always",
|
|
45
|
+
"trailingCommas": "es5"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# CallPad SDK Demo Configuration
|
|
2
|
+
# Copy this file to .env.local and update with your actual values
|
|
3
|
+
|
|
4
|
+
# API Configuration
|
|
5
|
+
VITE_API_BASE_URL=http://localhost:8080
|
|
6
|
+
|
|
7
|
+
# Socket.IO Configuration
|
|
8
|
+
VITE_SOCKET_URL=http://localhost:3001/
|
|
9
|
+
|
|
10
|
+
# LiveKit Configuration
|
|
11
|
+
VITE_LIVEKIT_URL=ws://localhost:7880
|
|
12
|
+
|
|
13
|
+
# Optional: Enable debug logging
|
|
14
|
+
VITE_DEBUG=true
|
|
15
|
+
|
|
16
|
+
# Demo Authentication (for testing)
|
|
17
|
+
# These are sample credentials - replace with actual test accounts
|
|
18
|
+
VITE_DEMO_EMAIL=samuel.mashok@voyatekgroup.com
|
|
19
|
+
VITE_DEMO_PASSWORD=Holi$day1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# callpad-demo
|
|
2
|
+
|
|
3
|
+
## 0.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- vg-x07df@1.0.2
|
|
9
|
+
|
|
10
|
+
## 0.0.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- vg-x07df@1.0.1
|
|
16
|
+
|
|
17
|
+
## 0.0.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- vg-x07df@1.0.0
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# CallPad SDK Demo
|
|
2
|
+
|
|
3
|
+
A simple React demo application showcasing the CallPad SDK features.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
This demo includes placeholder components for:
|
|
8
|
+
|
|
9
|
+
- **Video Call Interface**: Main video container for call display
|
|
10
|
+
- **Participant Management**: List of call participants with status indicators
|
|
11
|
+
- **Call Controls**: Mute, camera, screen share, and leave call buttons
|
|
12
|
+
- **Connection Status**: Real-time connection quality monitoring
|
|
13
|
+
|
|
14
|
+
## Getting Started
|
|
15
|
+
|
|
16
|
+
### Prerequisites
|
|
17
|
+
|
|
18
|
+
- Node.js 18+ (compatible with current Node.js 21.6.2)
|
|
19
|
+
- pnpm
|
|
20
|
+
|
|
21
|
+
### Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Development
|
|
28
|
+
|
|
29
|
+
Start the development server:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pnpm dev
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The demo will be available at http://localhost:3000
|
|
36
|
+
|
|
37
|
+
### Build
|
|
38
|
+
|
|
39
|
+
Build the production version:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Type Checking
|
|
46
|
+
|
|
47
|
+
Run TypeScript type checking:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm check-types
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Next Steps
|
|
54
|
+
|
|
55
|
+
Once the CallPad SDK is ready, you can:
|
|
56
|
+
|
|
57
|
+
1. Install the SDK: `pnpm add callpad-sdk`
|
|
58
|
+
2. Replace placeholder components with actual SDK integration
|
|
59
|
+
3. Connect to real video calls and test SDK functionality
|
|
60
|
+
|
|
61
|
+
## Project Structure
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
src/
|
|
65
|
+
├── components/
|
|
66
|
+
│ ├── Header.tsx # App header with branding
|
|
67
|
+
│ ├── CallDemo.tsx # Main video call interface
|
|
68
|
+
│ ├── ParticipantsPanel.tsx # Participant list and status
|
|
69
|
+
│ └── ControlsPanel.tsx # Call control buttons
|
|
70
|
+
├── App.tsx # Main app component
|
|
71
|
+
└── main.tsx # App entry point
|
|
72
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
globalIgnores(['dist']),
|
|
10
|
+
{
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
extends: [
|
|
13
|
+
js.configs.recommended,
|
|
14
|
+
tseslint.configs.recommended,
|
|
15
|
+
reactHooks.configs['recommended-latest'],
|
|
16
|
+
reactRefresh.configs.vite,
|
|
17
|
+
],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
ecmaVersion: 2020,
|
|
20
|
+
globals: globals.browser,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>CallPad SDK Demo</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "callpad-demo",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.3",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Demo application showcasing CallPad SDK features",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "tsc -b && vite build",
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"check-types": "tsc --noEmit"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"react": "^18.3.1",
|
|
16
|
+
"react-dom": "^18.3.1",
|
|
17
|
+
"vg-x07df": "workspace:*",
|
|
18
|
+
"livekit-client": "^2.8.0",
|
|
19
|
+
"socket.io-client": "^4.7.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@eslint/js": "^9.36.0",
|
|
23
|
+
"@types/react": "^18.2.0",
|
|
24
|
+
"@types/react-dom": "^18.2.0",
|
|
25
|
+
"@vitejs/plugin-react": "^5.0.3",
|
|
26
|
+
"eslint": "^9.36.0",
|
|
27
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
28
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
29
|
+
"globals": "^16.4.0",
|
|
30
|
+
"typescript": "~5.8.3",
|
|
31
|
+
"typescript-eslint": "^8.44.0",
|
|
32
|
+
"vite": "^6.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|