@seeka-labs/cli-apps 3.8.2 → 3.8.6
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/dist/ai-context/internal/examples/_index.md +1 -1
- package/dist/ai-context/internal/examples/v1/activecampaign/_ai-summary.md +25 -32
- package/dist/ai-context/internal/examples/v1/complianz/_ai-summary.md +17 -23
- package/dist/ai-context/internal/examples/v1/ivvy/_ai-summary.md +20 -19
- package/dist/ai-context/internal/examples/v1/me-and-u-connect/_ai-summary.md +18 -16
- package/dist/ai-context/internal/examples/v1/me-and-u-manage/_ai-summary.md +22 -34
- package/dist/ai-context/internal/examples/v1/nowbookit/_ai-summary.md +26 -26
- package/dist/ai-context/internal/examples/v1/sevenrooms/_ai-summary.md +22 -21
- package/dist/ai-context/internal/examples/v1/tradable-bits/_ai-summary.md +20 -22
- package/dist/ai-context/internal/examples/v1/transcend/_ai-summary.md +43 -23
- package/dist/ai-context/internal/examples/v2/calendly/_ai-summary.md +19 -16
- package/dist/ai-context/internal/examples/v2/clarity/_ai-summary.md +14 -21
- package/dist/ai-context/internal/examples/v2/google-bigquery/_ai-summary.md +15 -14
- package/dist/ai-context/internal/examples/v2/klaviyo-events/_ai-summary.md +24 -15
- package/dist/ai-context/internal/examples/v2/navitas/_ai-summary.md +16 -28
- package/dist/ai-context/internal/examples/v2/trustarc/_ai-summary.md +14 -16
- package/dist/ai-context/internal/examples/v2/typeform/_ai-summary.md +20 -19
- package/dist/ai-context/internal/examples/v2/webhook/_ai-summary.md +16 -14
- package/dist/ai-context/internal/examples/v2/yeastar/_ai-summary.md +19 -15
- package/dist/ai-context/internal/examples/v3/google-ads/_ai-summary.md +19 -17
- package/dist/index.cjs +2465 -281
- package/dist/index.cjs.map +4 -4
- package/dist/init-template/README.azurefunc.md +1 -1
- package/dist/init-template/app/browser/package.json +1 -1
- package/dist/init-template/app/lib/package.json +1 -1
- package/dist/init-template/app/server-azurefunc/package.json +1 -1
- package/dist/init-template/app/ui/package.json +1 -1
- package/package.json +5 -2
- package/dist/ai-context/internal/architecture/v1-structure.md +0 -192
- package/dist/ai-context/internal/architecture/v2-structure.md +0 -261
- package/dist/ai-context/internal/architecture/v3-structure.md +0 -386
- package/dist/ai-context/internal/examples/v1/_index.md +0 -53
- package/dist/ai-context/internal/examples/v2/_index.md +0 -66
- package/dist/ai-context/internal/examples/v3/_index.md +0 -105
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
# V3 App Template Structure (Current)
|
|
2
|
-
|
|
3
|
-
This document describes the current V3 template structure. **Use this structure for all new app implementations.**
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
V3 apps are **monorepos** with four potential packages:
|
|
8
|
-
- `app/lib/` - Shared library (models, validation, utilities)
|
|
9
|
-
- `app/server/` - Azure Functions backend
|
|
10
|
-
- `app/browser/` - Browser plugin (optional)
|
|
11
|
-
- `app/ui/` - React configuration UI (optional)
|
|
12
|
-
|
|
13
|
-
Key V3 improvements over V2:
|
|
14
|
-
- **Dedicated `app/lib/` package** for shared code (instead of `app/server/src/lib/`)
|
|
15
|
-
- **Organized `src/app/` directory** in server for business logic
|
|
16
|
-
- **SDK integration** via `@seeka-labs/sdk-apps-server-host`
|
|
17
|
-
- **CLI configuration** in `.seeka/` directory
|
|
18
|
-
|
|
19
|
-
## Directory Structure
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
your-app-name/
|
|
23
|
-
├── .seeka/
|
|
24
|
-
│ ├── init.app.seeka.cli.config.json # CLI init configuration
|
|
25
|
-
│ └── init.app.secrets.seeka.cli.config.json # Secrets (gitignored)
|
|
26
|
-
├── .github/
|
|
27
|
-
│ └── workflows/
|
|
28
|
-
│ └── deploy-azurefunc.yml # GitHub Actions deployment
|
|
29
|
-
├── app/
|
|
30
|
-
│ ├── browser/ # Browser plugin (optional)
|
|
31
|
-
│ │ ├── src/
|
|
32
|
-
│ │ │ ├── browser.ts # Browser entry point
|
|
33
|
-
│ │ │ └── plugin/
|
|
34
|
-
│ │ │ └── index.ts # Plugin implementation
|
|
35
|
-
│ │ ├── scripts/
|
|
36
|
-
│ │ │ └── esbuild/
|
|
37
|
-
│ │ │ └── build-browser-plugin.mjs
|
|
38
|
-
│ │ ├── package.json
|
|
39
|
-
│ │ ├── tsconfig.json
|
|
40
|
-
│ │ └── README.md
|
|
41
|
-
│ ├── lib/ # Shared library (V3 key feature)
|
|
42
|
-
│ │ ├── src/
|
|
43
|
-
│ │ │ ├── index.ts # Library exports
|
|
44
|
-
│ │ │ ├── models/
|
|
45
|
-
│ │ │ │ └── index.ts # Shared models/types
|
|
46
|
-
│ │ │ ├── validation/
|
|
47
|
-
│ │ │ │ └── index.ts # Settings validation
|
|
48
|
-
│ │ │ └── utils/
|
|
49
|
-
│ │ │ └── index.ts # Shared utilities (optional)
|
|
50
|
-
│ │ ├── package.json
|
|
51
|
-
│ │ └── tsconfig.json
|
|
52
|
-
│ ├── server/ # Server component (Azure Functions)
|
|
53
|
-
│ │ ├── src/
|
|
54
|
-
│ │ │ ├── functions/ # Azure Function handlers
|
|
55
|
-
│ │ │ │ ├── seekaAppWebhook.ts # Main webhook handler
|
|
56
|
-
│ │ │ │ ├── healthCheck.ts # Health check endpoint
|
|
57
|
-
│ │ │ │ ├── ui.ts # UI static file serving
|
|
58
|
-
│ │ │ │ ├── *QueueHandler.ts # Queue processors
|
|
59
|
-
│ │ │ │ ├── [platform]AuthRedirect.ts # OAuth redirect (optional)
|
|
60
|
-
│ │ │ │ └── [platform]AuthCallback.ts # OAuth callback (optional)
|
|
61
|
-
│ │ │ └── app/ # Application logic (V3 key feature)
|
|
62
|
-
│ │ │ ├── api/
|
|
63
|
-
│ │ │ │ ├── router.ts # API routing
|
|
64
|
-
│ │ │ │ └── routes/
|
|
65
|
-
│ │ │ │ └── *.ts # Individual API route handlers
|
|
66
|
-
│ │ │ ├── jobs/
|
|
67
|
-
│ │ │ │ └── index.ts # Background job definitions
|
|
68
|
-
│ │ │ ├── models/
|
|
69
|
-
│ │ │ │ └── index.ts # Server-specific models
|
|
70
|
-
│ │ │ ├── services/
|
|
71
|
-
│ │ │ │ ├── activities.ts # Activity processing
|
|
72
|
-
│ │ │ │ └── [platform]/ # Platform-specific services
|
|
73
|
-
│ │ │ │ └── *.ts
|
|
74
|
-
│ │ │ └── logging/
|
|
75
|
-
│ │ │ └── index.ts # Logging configuration
|
|
76
|
-
│ │ ├── host.json # Azure Functions host config
|
|
77
|
-
│ │ ├── local.settings.json # Local dev settings (gitignored)
|
|
78
|
-
│ │ ├── local.settings.template.json # Template for local settings
|
|
79
|
-
│ │ ├── package.json
|
|
80
|
-
│ │ ├── tsconfig.json
|
|
81
|
-
│ │ └── README.md
|
|
82
|
-
│ └── ui/ # Configuration UI (optional)
|
|
83
|
-
│ ├── src/
|
|
84
|
-
│ │ ├── main.tsx # React entry point
|
|
85
|
-
│ │ ├── App.tsx # Main App component
|
|
86
|
-
│ │ └── vite-env.d.ts
|
|
87
|
-
│ ├── scripts/
|
|
88
|
-
│ │ └── copy-output.mjs # Build output copy script
|
|
89
|
-
│ ├── package.json
|
|
90
|
-
│ ├── tsconfig.json
|
|
91
|
-
│ ├── tsconfig.node.json
|
|
92
|
-
│ ├── vite.config.ts
|
|
93
|
-
│ └── README.md
|
|
94
|
-
├── .yarnrc.yml # Yarn configuration
|
|
95
|
-
├── package.json # Root package.json (workspaces)
|
|
96
|
-
├── tsconfig.json # Root TypeScript config
|
|
97
|
-
├── AGENTS.md # AI context pointer file
|
|
98
|
-
└── README.md
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Key Components
|
|
102
|
-
|
|
103
|
-
### 1. Server Component (`app/server/`)
|
|
104
|
-
|
|
105
|
-
The main backend, implemented as Azure Functions V4.
|
|
106
|
-
|
|
107
|
-
#### Functions (`src/functions/`)
|
|
108
|
-
|
|
109
|
-
| File | Purpose |
|
|
110
|
-
|------|---------|
|
|
111
|
-
| `seekaAppWebhook.ts` | Main webhook handler for all Seeka events |
|
|
112
|
-
| `healthCheck.ts` | Health check endpoint for monitoring |
|
|
113
|
-
| `ui.ts` | Serves the configuration UI static files |
|
|
114
|
-
| `*QueueHandler.ts` | Queue processors for async operations |
|
|
115
|
-
| `[platform]AuthRedirect.ts` | OAuth redirect handler (optional) |
|
|
116
|
-
| `[platform]AuthCallback.ts` | OAuth callback handler (optional) |
|
|
117
|
-
|
|
118
|
-
#### Application Logic (`src/app/`)
|
|
119
|
-
|
|
120
|
-
V3 organizes business logic in `src/app/` (not `src/lib/` like V2):
|
|
121
|
-
|
|
122
|
-
| Directory | Purpose |
|
|
123
|
-
|-----------|---------|
|
|
124
|
-
| `api/` | REST API routes for UI communication |
|
|
125
|
-
| `api/router.ts` | Central API routing |
|
|
126
|
-
| `api/routes/*.ts` | Individual route handlers |
|
|
127
|
-
| `jobs/` | Background job queue definitions |
|
|
128
|
-
| `models/` | Server-specific TypeScript interfaces |
|
|
129
|
-
| `services/` | Business logic and external API integrations |
|
|
130
|
-
| `services/[platform]/` | Platform-specific service modules |
|
|
131
|
-
| `logging/` | Winston logging configuration |
|
|
132
|
-
|
|
133
|
-
### 2. Shared Library (`app/lib/`) - V3 Key Feature
|
|
134
|
-
|
|
135
|
-
V3 introduces a dedicated shared library package (unlike V2 which kept shared code in `app/server/src/lib/`).
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
// src/index.ts - Exports
|
|
139
|
-
export * from './models';
|
|
140
|
-
export * from './validation';
|
|
141
|
-
export * from './utils'; // Optional utilities
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
#### Models (`src/models/index.ts`)
|
|
145
|
-
|
|
146
|
-
Define your app's TypeScript interfaces:
|
|
147
|
-
|
|
148
|
-
```typescript
|
|
149
|
-
export interface YourAppInstallContext {
|
|
150
|
-
applicationInstallId: string;
|
|
151
|
-
organisationId: string;
|
|
152
|
-
organisationBrandId: string;
|
|
153
|
-
installedAt: string;
|
|
154
|
-
installationState?: {
|
|
155
|
-
grantedPermissions: string[];
|
|
156
|
-
installationSettings: YourAppInstallationSettings;
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface YourAppInstallationSettings {
|
|
161
|
-
apiKey?: string;
|
|
162
|
-
customerId?: string;
|
|
163
|
-
// Add your settings here
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export interface YourAppBrowserSdkPluginConfig {
|
|
167
|
-
appId: string;
|
|
168
|
-
appInstallId: string;
|
|
169
|
-
appUrl: string;
|
|
170
|
-
// Browser plugin configuration
|
|
171
|
-
}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
#### Validation (`src/validation/index.ts`)
|
|
175
|
-
|
|
176
|
-
Validate installation settings:
|
|
177
|
-
|
|
178
|
-
```typescript
|
|
179
|
-
import { Logger } from 'winston';
|
|
180
|
-
|
|
181
|
-
export const validateInstallationSettings = async (
|
|
182
|
-
settings: YourAppInstallationSettings,
|
|
183
|
-
logger: Logger
|
|
184
|
-
): Promise<string | null> => {
|
|
185
|
-
if (!settings.apiKey) {
|
|
186
|
-
return 'API Key is required';
|
|
187
|
-
}
|
|
188
|
-
return null; // null = valid
|
|
189
|
-
};
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### 3. Browser Plugin (`app/browser/`) - Optional
|
|
193
|
-
|
|
194
|
-
For apps that need browser-side functionality (tracking, consent, etc.).
|
|
195
|
-
|
|
196
|
-
```typescript
|
|
197
|
-
// src/plugin/index.ts
|
|
198
|
-
export class YourAppBrowserPlugin {
|
|
199
|
-
constructor(config: YourAppBrowserPluginConfig) {
|
|
200
|
-
// Initialize plugin with config from server
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Plugin methods for browser-side operations
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### 4. Configuration UI (`app/ui/`) - Optional
|
|
208
|
-
|
|
209
|
-
React-based UI for app configuration, built with Vite. Used for:
|
|
210
|
-
- OAuth connection flows
|
|
211
|
-
- Settings configuration
|
|
212
|
-
- Status display
|
|
213
|
-
|
|
214
|
-
## Webhook Handler Pattern
|
|
215
|
-
|
|
216
|
-
The main webhook handler (`seekaAppWebhook.ts`) follows this pattern:
|
|
217
|
-
|
|
218
|
-
```typescript
|
|
219
|
-
import { app, HttpRequest, HttpResponseInit, InvocationContext } from '@azure/functions';
|
|
220
|
-
import { SeekaWebhookCallType, throwOnInvalidWebhookSignature } from '@seeka-labs/sdk-apps-server';
|
|
221
|
-
|
|
222
|
-
app.http('seekaAppWebhook', {
|
|
223
|
-
methods: ['POST'],
|
|
224
|
-
authLevel: 'anonymous',
|
|
225
|
-
route: 'api/webhook/seeka/app',
|
|
226
|
-
handler: seekaAppWebhook
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
export async function seekaAppWebhook(req: HttpRequest, context: InvocationContext): Promise<HttpResponseInit> {
|
|
230
|
-
const bodyStr = await req.text();
|
|
231
|
-
const body = JSON.parse(bodyStr);
|
|
232
|
-
|
|
233
|
-
// 1. Handle probe requests
|
|
234
|
-
if (body.type === SeekaWebhookCallType.Probe) {
|
|
235
|
-
return { status: 204 };
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// 2. Validate webhook signature
|
|
239
|
-
throwOnInvalidWebhookSignature(process.env.SEEKA_APP_SECRET, req.headers, bodyStr);
|
|
240
|
-
|
|
241
|
-
// 3. Handle by webhook type
|
|
242
|
-
switch (body.type) {
|
|
243
|
-
case SeekaWebhookCallType.AppInstalled:
|
|
244
|
-
// Handle installation
|
|
245
|
-
break;
|
|
246
|
-
case SeekaWebhookCallType.AppUninstalled:
|
|
247
|
-
// Handle uninstallation
|
|
248
|
-
break;
|
|
249
|
-
case SeekaWebhookCallType.ActivityAccepted:
|
|
250
|
-
// Handle activity data
|
|
251
|
-
break;
|
|
252
|
-
case SeekaWebhookCallType.IdentityChanged:
|
|
253
|
-
// Handle identity changes
|
|
254
|
-
break;
|
|
255
|
-
case SeekaWebhookCallType.BrowserSdkPlugin:
|
|
256
|
-
// Return browser plugin config
|
|
257
|
-
break;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
return { status: 204 };
|
|
261
|
-
}
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
## Background Job Pattern
|
|
265
|
-
|
|
266
|
-
For async processing, use the queue pattern:
|
|
267
|
-
|
|
268
|
-
```typescript
|
|
269
|
-
// jobs/index.ts
|
|
270
|
-
export const queueNames = {
|
|
271
|
-
trackActivity: 'track-activity-queue'
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
export const triggerBackgroundJob = async <T>(
|
|
275
|
-
queueName: string,
|
|
276
|
-
item: T,
|
|
277
|
-
logger: Logger
|
|
278
|
-
) => {
|
|
279
|
-
// Queue the job
|
|
280
|
-
};
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
```typescript
|
|
284
|
-
// functions/trackActivityQueueHandler.ts
|
|
285
|
-
app.storageQueue('trackActivityQueueHandler', {
|
|
286
|
-
queueName: queueNames.trackActivity,
|
|
287
|
-
connection: 'AzureWebJobsStorage',
|
|
288
|
-
handler: async (item, context) => {
|
|
289
|
-
// Process the queued item
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## SDK Dependencies
|
|
295
|
-
|
|
296
|
-
V3 apps use these Seeka SDK packages:
|
|
297
|
-
|
|
298
|
-
| Package | Purpose |
|
|
299
|
-
|---------|---------|
|
|
300
|
-
| `@seeka-labs/sdk-apps-server` | Core SDK types, webhook payloads, signature validation |
|
|
301
|
-
| `@seeka-labs/sdk-apps-server-host` | Server hosting utilities (installation management, logging, browser plugin) |
|
|
302
|
-
|
|
303
|
-
### Key SDK Utilities from `@seeka-labs/sdk-apps-server-host`
|
|
304
|
-
|
|
305
|
-
V3 apps leverage SDK utilities instead of custom implementations (unlike V1/V2):
|
|
306
|
-
|
|
307
|
-
```typescript
|
|
308
|
-
import {
|
|
309
|
-
tryGetInstallation,
|
|
310
|
-
createOrUpdateInstallation,
|
|
311
|
-
deleteInstallation,
|
|
312
|
-
getSeekaBrowserPlugin,
|
|
313
|
-
startServices,
|
|
314
|
-
webhookLogger,
|
|
315
|
-
childLogger,
|
|
316
|
-
} from '@seeka-labs/sdk-apps-server-host';
|
|
317
|
-
|
|
318
|
-
// Installation management
|
|
319
|
-
const installation = await tryGetInstallation(installId, false, logger);
|
|
320
|
-
await createOrUpdateInstallation(installationData, logger);
|
|
321
|
-
await deleteInstallation(installId, logger);
|
|
322
|
-
|
|
323
|
-
// Logging
|
|
324
|
-
const logger = webhookLogger(webhookBody, context);
|
|
325
|
-
const childLog = childLogger(metadata, installation, logger, context);
|
|
326
|
-
|
|
327
|
-
// Browser plugin
|
|
328
|
-
const plugin = await getSeekaBrowserPlugin<PluginConfig>(
|
|
329
|
-
'PluginClassName',
|
|
330
|
-
browserPluginBasePath,
|
|
331
|
-
pluginConfig,
|
|
332
|
-
logger
|
|
333
|
-
);
|
|
334
|
-
|
|
335
|
-
// Service initialization
|
|
336
|
-
await startServices(logger);
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### Key SDK Types from `@seeka-labs/sdk-apps-server`
|
|
340
|
-
|
|
341
|
-
```typescript
|
|
342
|
-
import {
|
|
343
|
-
SeekaWebhookCallType,
|
|
344
|
-
SeekaWebhookPayload,
|
|
345
|
-
SeekaAppInstalledWebhookPayload,
|
|
346
|
-
SeekaAppUninstalledWebhookPayload,
|
|
347
|
-
SeekaActivityAcceptedWebhookPayload,
|
|
348
|
-
SeekaIdentityChangedWebhookPayload,
|
|
349
|
-
throwOnInvalidWebhookSignature,
|
|
350
|
-
} from '@seeka-labs/sdk-apps-server';
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
## Environment Variables
|
|
354
|
-
|
|
355
|
-
Required environment variables for V3 apps:
|
|
356
|
-
|
|
357
|
-
| Variable | Description |
|
|
358
|
-
|----------|-------------|
|
|
359
|
-
| `SEEKA_APP_ID` | Your app's unique identifier |
|
|
360
|
-
| `SEEKA_APP_SECRET` | Secret for webhook validation |
|
|
361
|
-
| `DATA_ENCRYPTION_KEY` | 32-character key for encrypting sensitive data |
|
|
362
|
-
| `AZURE_STORAGE_CONNECTION_STRING` | Azure Storage connection string |
|
|
363
|
-
| `SELF_HOST_BASEURL` | Public URL of your deployed app |
|
|
364
|
-
|
|
365
|
-
## Package.json Scripts
|
|
366
|
-
|
|
367
|
-
Standard scripts in root `package.json`:
|
|
368
|
-
|
|
369
|
-
```json
|
|
370
|
-
{
|
|
371
|
-
"scripts": {
|
|
372
|
-
"build": "yarn workspaces foreach -A run build",
|
|
373
|
-
"build:server": "yarn workspace @your-org/your-app-server run build",
|
|
374
|
-
"build:ui": "yarn workspace @your-org/your-app-ui run build",
|
|
375
|
-
"build:browser": "yarn workspace @your-org/your-app-browser run build",
|
|
376
|
-
"dev": "yarn workspace @your-org/your-app-server run dev",
|
|
377
|
-
"test": "yarn workspaces foreach -A run test"
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
## Next Steps
|
|
383
|
-
|
|
384
|
-
- See `../guides/getting-started.md` for extending your app
|
|
385
|
-
- See `../guides/common-patterns.md` for implementation patterns
|
|
386
|
-
- See `../examples/v3/` for complete example implementations
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# V1 Example Apps
|
|
2
|
-
|
|
3
|
-
> **⚠️ Legacy Version**: V1 apps use an older structure. Reference these for feature implementation patterns, but use V3 structure for new apps.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
V1 example apps demonstrate feature implementations using the original Seeka app template structure.
|
|
8
|
-
|
|
9
|
-
## Available Examples
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### activecampaign
|
|
13
|
-
- **Template**: azurefunc
|
|
14
|
-
- **Components**: server
|
|
15
|
-
- **Description**: ActiveCampaign CRM integration for syncing contacts and activity data.
|
|
16
|
-
- **Tags**: CRM, email marketing, marketing automation, contacts
|
|
17
|
-
- **Path**: `./activecampaign/`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<!-- Example entries will be added here by the import script:
|
|
21
|
-
|
|
22
|
-
### google-ads-v1
|
|
23
|
-
- **Template**: azurefunc
|
|
24
|
-
- **Components**: server
|
|
25
|
-
- **Description**: Google Ads conversion tracking integration
|
|
26
|
-
- **Tags**: conversion-api, ads-platform
|
|
27
|
-
- **Path**: `./google-ads-v1/`
|
|
28
|
-
|
|
29
|
-
-->
|
|
30
|
-
|
|
31
|
-
## When to Reference V1 Apps
|
|
32
|
-
|
|
33
|
-
V1 apps are useful for understanding:
|
|
34
|
-
|
|
35
|
-
- **Legacy integration patterns**: How older integrations were built
|
|
36
|
-
- **Data transformation logic**: Business logic that may still be relevant
|
|
37
|
-
- **External API patterns**: API integration approaches
|
|
38
|
-
|
|
39
|
-
## Adapting V1 Code to V3
|
|
40
|
-
|
|
41
|
-
When using V1 code as reference:
|
|
42
|
-
|
|
43
|
-
1. Update to Azure Functions V4 programming model
|
|
44
|
-
2. Move shared types to `app/lib/src/models/`
|
|
45
|
-
3. Use SDK utilities from `@seeka-labs/sdk-apps-server-host`
|
|
46
|
-
4. Add structured logging with Winston
|
|
47
|
-
|
|
48
|
-
See `../../architecture/v1-structure.md` for detailed migration guidance.
|
|
49
|
-
|
|
50
|
-
## See Also
|
|
51
|
-
|
|
52
|
-
- `../v3/` - Current template examples (use for new apps)
|
|
53
|
-
- `../../architecture/v1-structure.md` - V1 structure documentation
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# V2 Example Apps
|
|
2
|
-
|
|
3
|
-
> **⚠️ Legacy Version**: V2 apps use an older Azure Functions model. Reference these for feature implementation patterns, but use V3 structure for new apps.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
V2 example apps demonstrate feature implementations using the monorepo structure with Azure Functions V3 programming model.
|
|
8
|
-
|
|
9
|
-
## Available Examples
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### calendly
|
|
13
|
-
- **Template**: azurefunc
|
|
14
|
-
- **Components**: browser, ui, server
|
|
15
|
-
- **Description**: Calendly integration app for tracking meeting bookings and scheduling events from Calendly.
|
|
16
|
-
- **Tags**: scheduling, meetings, webhooks, CRM
|
|
17
|
-
- **Path**: `./calendly/`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<!-- Example entries will be added here by the import script:
|
|
21
|
-
|
|
22
|
-
### meta-capi-v2
|
|
23
|
-
- **Template**: azurefunc
|
|
24
|
-
- **Components**: server, browser
|
|
25
|
-
- **Description**: Meta Conversions API integration
|
|
26
|
-
- **Tags**: conversion-api, ads-platform
|
|
27
|
-
- **Path**: `./meta-capi-v2/`
|
|
28
|
-
|
|
29
|
-
-->
|
|
30
|
-
|
|
31
|
-
## When to Reference V2 Apps
|
|
32
|
-
|
|
33
|
-
V2 apps are useful for understanding:
|
|
34
|
-
|
|
35
|
-
- **Monorepo patterns**: Workspace organization (similar to V3)
|
|
36
|
-
- **Shared library usage**: How `app/lib` is structured
|
|
37
|
-
- **UI component patterns**: React-based configuration UIs
|
|
38
|
-
- **Browser plugin architecture**: Plugin structure and communication
|
|
39
|
-
- **Complex integrations**: Multi-component app patterns
|
|
40
|
-
|
|
41
|
-
## Key Differences from V3
|
|
42
|
-
|
|
43
|
-
| Aspect | V2 | V3 |
|
|
44
|
-
|--------|----|----|
|
|
45
|
-
| Azure Functions | V3 programming model | V4 programming model |
|
|
46
|
-
| Function exports | Default exports | Named exports with `app.http()` |
|
|
47
|
-
| Bindings | `function.json` files | Code-based configuration |
|
|
48
|
-
| Logging | Basic console/context | Winston structured logging |
|
|
49
|
-
|
|
50
|
-
## Adapting V2 Code to V3
|
|
51
|
-
|
|
52
|
-
When using V2 code as reference:
|
|
53
|
-
|
|
54
|
-
1. Remove `function.json` files - V3 uses code-based configuration
|
|
55
|
-
2. Update function signatures to return `HttpResponseInit`
|
|
56
|
-
3. Convert default exports to named exports with `app.http()`
|
|
57
|
-
4. Replace `context.log` with Winston logger
|
|
58
|
-
5. Update SDK packages to latest versions
|
|
59
|
-
|
|
60
|
-
See `../../architecture/v2-structure.md` for detailed migration guidance.
|
|
61
|
-
|
|
62
|
-
## See Also
|
|
63
|
-
|
|
64
|
-
- `../v3/` - Current template examples (use for new apps)
|
|
65
|
-
- `../v1/` - V1 legacy examples
|
|
66
|
-
- `../../architecture/v2-structure.md` - V2 structure documentation
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# V3 Example Apps
|
|
2
|
-
|
|
3
|
-
> **✅ Current Version**: V3 is the current template version. Use these examples as the primary reference for new app development.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
V3 example apps demonstrate feature implementations using the current Seeka app template with Azure Functions V4 programming model.
|
|
8
|
-
|
|
9
|
-
## Available Examples
|
|
10
|
-
|
|
11
|
-
*No examples imported yet. Use the `ai:context:generate` script to import example apps.*
|
|
12
|
-
|
|
13
|
-
<!-- Example entries will be added here by the import script:
|
|
14
|
-
|
|
15
|
-
### google-ads-push
|
|
16
|
-
- **Template**: azurefunc
|
|
17
|
-
- **Components**: server
|
|
18
|
-
- **Description**: Pushes conversion data to Google Ads Conversion API
|
|
19
|
-
- **Tags**: conversion-api, ads-platform
|
|
20
|
-
- **Path**: `./google-ads-push/`
|
|
21
|
-
|
|
22
|
-
### tiktok-events
|
|
23
|
-
- **Template**: azurefunc
|
|
24
|
-
- **Components**: server, browser
|
|
25
|
-
- **Description**: TikTok Events API integration with browser pixel
|
|
26
|
-
- **Tags**: conversion-api, ads-platform
|
|
27
|
-
- **Path**: `./tiktok-events/`
|
|
28
|
-
|
|
29
|
-
-->
|
|
30
|
-
|
|
31
|
-
## V3 Template Features
|
|
32
|
-
|
|
33
|
-
V3 apps include:
|
|
34
|
-
|
|
35
|
-
- **Azure Functions V4**: Modern programming model with code-based configuration
|
|
36
|
-
- **Monorepo structure**: Organized workspaces for server, lib, browser, and UI
|
|
37
|
-
- **TypeScript strict mode**: Full type safety
|
|
38
|
-
- **Winston logging**: Structured logging with context
|
|
39
|
-
- **SDK integration**: Full use of `@seeka-labs/sdk-apps-server-host`
|
|
40
|
-
|
|
41
|
-
## Example Structure
|
|
42
|
-
|
|
43
|
-
Each V3 example includes:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
example-name/
|
|
47
|
-
├── _ai-summary.md # AI-generated summary of the app
|
|
48
|
-
├── README.md # Human-readable documentation
|
|
49
|
-
├── app/
|
|
50
|
-
│ ├── server/
|
|
51
|
-
│ │ └── src/
|
|
52
|
-
│ │ ├── functions/ # Azure Function handlers
|
|
53
|
-
│ │ └── app/
|
|
54
|
-
│ │ └── services/ # Business logic
|
|
55
|
-
│ ├── lib/
|
|
56
|
-
│ │ └── src/
|
|
57
|
-
│ │ ├── models/ # Shared types
|
|
58
|
-
│ │ └── validation/ # Settings validation
|
|
59
|
-
│ ├── browser/ # (if applicable)
|
|
60
|
-
│ └── ui/ # (if applicable)
|
|
61
|
-
└── package.json
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Using V3 Examples
|
|
65
|
-
|
|
66
|
-
### For New Feature Development
|
|
67
|
-
|
|
68
|
-
1. Find an example with similar functionality
|
|
69
|
-
2. Review the `_ai-summary.md` for key patterns
|
|
70
|
-
3. Examine the service layer in `app/server/src/app/services/`
|
|
71
|
-
4. Check the models in `app/lib/src/models/`
|
|
72
|
-
5. Adapt the patterns to your app
|
|
73
|
-
|
|
74
|
-
### For Understanding Patterns
|
|
75
|
-
|
|
76
|
-
| Pattern | Where to Look |
|
|
77
|
-
|---------|---------------|
|
|
78
|
-
| Webhook handling | `app/server/src/functions/seekaAppWebhook.ts` |
|
|
79
|
-
| External API calls | `app/server/src/app/services/` |
|
|
80
|
-
| Data transformation | `app/server/src/app/services/` |
|
|
81
|
-
| Settings validation | `app/lib/src/validation/` |
|
|
82
|
-
| Queue processing | `app/server/src/functions/*QueueHandler.ts` |
|
|
83
|
-
| Browser plugins | `app/browser/src/plugin/` |
|
|
84
|
-
|
|
85
|
-
## Common Tags
|
|
86
|
-
|
|
87
|
-
Examples are tagged for easy discovery:
|
|
88
|
-
|
|
89
|
-
| Tag | Description |
|
|
90
|
-
|-----|-------------|
|
|
91
|
-
| `conversion-api` | Conversion API integrations (Meta, Google, TikTok) |
|
|
92
|
-
| `ads-platform` | Advertising platform integrations |
|
|
93
|
-
| `crm` | CRM platform integrations |
|
|
94
|
-
| `telemetry` | Analytics and telemetry |
|
|
95
|
-
| `data-sync` | Data synchronization patterns |
|
|
96
|
-
| `webhook` | Webhook handling patterns |
|
|
97
|
-
| `oauth` | OAuth authentication flows |
|
|
98
|
-
| `batch` | Batch processing patterns |
|
|
99
|
-
|
|
100
|
-
## See Also
|
|
101
|
-
|
|
102
|
-
- `../v1/` - V1 legacy examples (for feature reference)
|
|
103
|
-
- `../v2/` - V2 legacy examples (for feature reference)
|
|
104
|
-
- `../../architecture/v3-structure.md` - V3 structure documentation
|
|
105
|
-
- `../../guides/getting-started.md` - Getting started guide
|